|
Public Member Functions |
| | MDFS () |
| virtual | ~MDFS () |
| void | Init (const std::string &initfilepath) |
| | Init the dfs given a xml init file path.
|
| MServer * | AddServer (const std::string &host, int port=5050) |
| | Before a msg can be sent, the server has to be in the server list.
|
| int | SendMsg (const std::string &host, const 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 | SendConnections (const std::string &ip) |
| | Send active connections to peer.
|
| bool | IsConnected (const std::string &ip) |
| | Goes through all the servers and clients to see if the ip is there.
|
| 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 (MDFSUpdate *u) |
| void | AddConnection (MConnection &c) |
| | Add and connect.
|
| void | RemoveConnection (const std::string &ip) |
| | Remove but do not disconnect.
|
| void | SaveConnections () |
Public Attributes |
| MDFSDB * | DB |
| | Remote file DB.
|
| MShareList | Shares |
| | Local shares.
|
| MOptions | Options |
| MPNL::MTransferManager * | TransferManager |
| unsigned char | ClearStamp |
Protected Types |
| typedef std::vector< MConnection > | MConnectionList |
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 | CancelDL (MDFSPeerBase *c, TiXmlElement *cur, std::string &rv) |
| void | ParseUpdate (TiXmlElement *cur, std::string &rv) |
| void | ParseFile (MFileType ft, TiXmlElement *cur, std::string &rv) |
| void | SendInfos (const std::string &ip, const std::string &localip) |
| void | NewInfo (MDFSPeerBase *c, TiXmlElement *cur) |
| 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) |
| void | DeleteDownload (const std::string &url) |
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.
|
| MDFSTCPServer * | TCPServer |
| | Main server.
|
| std::string | Name |
| MStringList | ServerHosts |
| MStats | Stats |
| MUpdateList | Updates |
| MDownloadList | Downloads |
| MUpdateScanner * | UpdateScanner |
| MConnectionList | Connections |
This class is virtual, you have to implemented some method in a derivated class. mdfs::MFileDFS implements them.