Changed in Libresapi: Used Doxigen style comments

This commit is contained in:
Konrad 2018-01-06 19:09:44 +01:00
parent d53993c2a0
commit 575a416ee9
2 changed files with 27 additions and 7 deletions

View File

@ -34,8 +34,10 @@ public:
FileSharingHandler(StateTokenServer* sts, RsFiles* files, RsNotify& notify);
~FileSharingHandler();
// from NotifyClient
// note: this may get called from foreign threads
/**
Derived from NotifyClient
This function may be called from foreign thread
*/
virtual void notifyListChange(int list, int type);
private:
@ -55,10 +57,19 @@ private:
void handleDownload(Request& req, Response& resp);
StateToken mLocalDirStateToken; // Token indicating change in local shared files
StateToken mRemoteDirStateToken; // Token indicating change in remote (friends') shared files
/// Token indicating change in local shared files
StateToken mLocalDirStateToken;
/// Token indicating change in remote (friends') shared files
StateToken mLocalDirStateToken;
StateTokenServer* mStateTokenServer;
RsMutex mMtx; // Inherited virtual functions of NotifyClient may be called from foreing thread
/**
Protects mLocalDirStateToken and mLocalDirStateToken that may be changed in foreign thread
@see FileSharingHandler::notifyListChange(...)
*/
RsMutex mMtx;
RsFiles* mRsFiles;
RsNotify& mNotify;

View File

@ -16,11 +16,15 @@ public:
TransfersHandler(StateTokenServer* sts, RsFiles* files, RsPeers *peers, RsNotify& notify);
virtual ~TransfersHandler();
// from NotifyClient
// may be called from foreign thread
/**
Derived from NotifyClient
This function may be called from foreign thread
*/
virtual void notifyListChange(int list, int type);
// from Tickable
virtual void tick();
private:
void handleWildcard(Request& req, Response& resp);
void handleControlDownload(Request& req, Response& resp);
@ -32,7 +36,12 @@ private:
RsPeers* mRsPeers;
RsNotify& mNotify;
/**
Protects mStateToken that may be changed in foreign thread
@see TransfersHandler::notifyListChange(...)
*/
RsMutex mMtx;
StateToken mStateToken;
time_t mLastUpdateTS;