Ivesvdf / Bacsy

A powerful backup system capable of operating on a distributed P2P basis
GNU General Public License v3.0
5 stars 2 forks source link

Bacsy::Source constructor #42

Closed nathansamson closed 13 years ago

nathansamson commented 13 years ago

the Bacsy::Source constructor should accept a SourceConfigInterface (or something similar) parameter instead of the CascadingSourceFile.

The (public) class interface of CascadingSourceFile would look like this

class CascadingSourceFile { bool isOpened()

std::vectorstd::string getSources();

CascadingSourceSection getSection(std::string); }

class CascadingSourceSection : public ISourceConfiguration { // implement the pure virtual methods from ISourceConfiguration }

and class ISourceConfiguration { virtual std::string getName() = 0; virtual unsigned int getPriority() = 0; }

Source itself could also inherit from ISourceConfiguration.