mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
* Moved DataRate interface from rsiface (old) -> rsConfig.
* Internally moved storage of data rate from pqipersongroup -> p3serverconfig * made DataRate + Operating Mode work together. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5889 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0fa8d55062
commit
de80f2aa3e
10 changed files with 113 additions and 130 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "pqi/p3linkmgr.h"
|
||||
#include "pqi/p3netmgr.h"
|
||||
#include "pqi/p3cfgmgr.h"
|
||||
#include "pqi/pqihandler.h"
|
||||
|
||||
|
||||
#define RS_CONFIG_ADVANCED_STRING "AdvMode"
|
||||
|
@ -42,9 +43,11 @@ class p3ServerConfig: public RsServerConfig
|
|||
{
|
||||
public:
|
||||
|
||||
p3ServerConfig(p3PeerMgr *peerMgr, p3LinkMgr *linkMgr, p3NetMgr *netMgr, p3GeneralConfig *genCfg);
|
||||
p3ServerConfig(p3PeerMgr *peerMgr, p3LinkMgr *linkMgr, p3NetMgr *netMgr, pqihandler *pqih, p3GeneralConfig *genCfg);
|
||||
virtual ~p3ServerConfig();
|
||||
|
||||
void load_config();
|
||||
|
||||
/* From RsIface::RsConfig */
|
||||
|
||||
virtual int getConfigNetStatus(RsConfigNetStatus &status);
|
||||
|
@ -88,8 +91,9 @@ virtual bool setConfigurationOption(uint32_t key, const std::string &opt);
|
|||
virtual uint32_t getOperatingMode();
|
||||
virtual bool setOperatingMode(uint32_t opMode);
|
||||
|
||||
virtual int SetDataRates( int downKb, int upKb );
|
||||
virtual int GetDataRates( float &inKb, float &outKb );
|
||||
virtual int SetMaxDataRates( int downKb, int upKb );
|
||||
virtual int GetMaxDataRates( int &downKb, int &upKb );
|
||||
virtual int GetCurrentDataRates( float &inKb, float &outKb );
|
||||
|
||||
/********************* ABOVE is RsConfig Interface *******/
|
||||
|
||||
|
@ -102,10 +106,13 @@ bool findConfigurationOption(uint32_t key, std::string &keystr);
|
|||
p3PeerMgr *mPeerMgr;
|
||||
p3LinkMgr *mLinkMgr;
|
||||
p3NetMgr *mNetMgr;
|
||||
pqihandler *mPqiHandler;
|
||||
p3GeneralConfig *mGeneralConfig;
|
||||
|
||||
RsMutex configMtx;
|
||||
uint32_t mUserLevel; // store last one... will later be a config Item too.
|
||||
float mRateDownload;
|
||||
float mRateUpload;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue