|
Public Member Functions |
| MDistributedFS () |
virtual | ~MDistributedFS () |
void | Init (const std::string &initfilepath) |
| Init the dfs given a xml init file path.
|
void | Start () |
| Thread control.
|
void | Stop () |
MServer * | AddServer (const std::string &host, int port) |
| Before a msg can be sent, the server has to be in the server list.
|
void | SendMsg (const std::string &host, std::string &msg) |
| Given a server host and a msg in xml, send it to the server. This is the main function to send messages.
|
void | BroadcastMsg (const std::string &msg) |
| Send msg to all servers.
|
void | GetStats (MStats &s) |
MUpdateList * | LockUpdates () |
| Request file updates.
|
void | UnlockUpdates () |
void | operator() () |
| Run thread loop. Must be public, but do not call, use Start().
|
void | Download (const std::string &url) |
void | AddUpdate (MUpdate &u) |
Public Attributes |
MDFSDB * | DB |
| Remote file DB.
|
MOptions | Options |
MPNL::MTransferManager * | TransferManager |
Protected Member Functions |
void | Listen (TiXmlElement *cur) |
void | NewServer (TiXmlElement *cur) |
void | ParseNetMsg (MDFSPeerBase *c, std::string &rv) |
| Parse a network msg and gives a response.
|
void | Init (TiXmlElement *cur) |
void | NewShare (TiXmlElement *cur) |
void | ParseNetMsg (MDFSPeerBase *c, TiXmlElement *cur, std::string &rv) |
void | ParseQuery (MDFSPeerBase *c, TiXmlElement *cur, std::string &rv) |
void | ParseDLQuery (MDFSPeerBase *c, TiXmlElement *cur, std::string &rv) |
void | ParseDLResponse (MDFSPeerBase *c, TiXmlElement *cur, std::string &rv) |
void | ParseUpdate (TiXmlElement *cur, std::string &rv) |
void | ParseFile (MFileType ft, TiXmlElement *cur, std::string &rv) |
virtual void | BuildFileQueryResponse (MDFSPeerBase *c, const MQuery &q, std::string &rv)=0 |
| Builds a response (a xml string) that will be sent to the client.
|
virtual bool | Login (const std::string &login, const std::string &pwd, MUser &rv)=0 |
void | AddErrors (std::string &rv) |
Protected Attributes |
std::string | Base |
| URL base. if Base == mdfs://host/ then every path/ will be rewritten as mdfs//host/path/.
|
std::string | DownloadPath |
| Where downloads go.
|
MStringList | Errors |
MServerList | Servers |
| Known servers and related TCPClients.
|
MShareList | Shares |
| Local shares.
|
MDFSTCPServer * | TCPServer |
| Main server.
|
std::string | ServerName |
MStringList | ServerHosts |
MStats | Stats |
MUpdateList | Updates |
boost::thread * | RunThread |
MDownloadList | Downloads |
This MDFS class is virtual, you have to implemented some method in a derivated class. mdfs::MFileDFS implements them.