mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge branch 'master' into webui
This commit is contained in:
commit
c7cbd257a5
File diff suppressed because it is too large
Load Diff
@ -46,8 +46,7 @@ class ServiceNotifications
|
|||||||
class ServicePeerFilter
|
class ServicePeerFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ServicePeerFilter()
|
ServicePeerFilter() : mDenyAll(true), mAllowAll(false) {}
|
||||||
:mDenyAll(true), mAllowAll(false) {}
|
|
||||||
|
|
||||||
bool mDenyAll;
|
bool mDenyAll;
|
||||||
bool mAllowAll;
|
bool mAllowAll;
|
||||||
@ -61,9 +60,6 @@ class ServiceControlSerialiser ;
|
|||||||
class p3ServiceControl: public RsServiceControl, public pqiMonitor, public p3Config
|
class p3ServiceControl: public RsServiceControl, public pqiMonitor, public p3Config
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
p3ServiceControl(p3LinkMgr *linkMgr);
|
p3ServiceControl(p3LinkMgr *linkMgr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,13 +73,11 @@ public:
|
|||||||
* from ServiceControl.
|
* from ServiceControl.
|
||||||
* @see rsserver
|
* @see rsserver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual const RsPeerId& getOwnId();
|
virtual const RsPeerId& getOwnId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* External Interface (RsServiceControl).
|
* External Interface (RsServiceControl).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual bool getOwnServices(RsPeerServiceInfo &info);
|
virtual bool getOwnServices(RsPeerServiceInfo &info);
|
||||||
|
|
||||||
// This is what is passed to peers, can be displayed by GUI too.
|
// This is what is passed to peers, can be displayed by GUI too.
|
||||||
@ -103,22 +97,16 @@ virtual bool isPeerConnected(const uint32_t serviceId, const RsPeerId &peerId);
|
|||||||
/**
|
/**
|
||||||
* Registration for all Services.
|
* Registration for all Services.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual bool registerService(const RsServiceInfo &info, bool defaultOn);
|
virtual bool registerService(const RsServiceInfo &info, bool defaultOn);
|
||||||
virtual bool deregisterService(uint32_t serviceId);
|
virtual bool deregisterService(uint32_t serviceId);
|
||||||
|
|
||||||
virtual bool registerServiceMonitor(pqiServiceMonitor *monitor, uint32_t serviceId);
|
virtual bool registerServiceMonitor(pqiServiceMonitor *monitor, uint32_t serviceId);
|
||||||
virtual bool deregisterServiceMonitor(pqiServiceMonitor *monitor);
|
virtual bool deregisterServiceMonitor(pqiServiceMonitor *monitor);
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Filter for services.
|
// Filter for services.
|
||||||
virtual bool checkFilter(uint32_t serviceId, const RsPeerId &peerId);
|
virtual bool checkFilter(uint32_t serviceId, const RsPeerId &peerId);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Interface for ServiceInfo service.
|
* Interface for ServiceInfo service.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -138,7 +126,6 @@ virtual bool loadList(std::list<RsItem *>& load);
|
|||||||
virtual RsSerialiser *setupSerialiser() ;
|
virtual RsSerialiser *setupSerialiser() ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void notifyServices();
|
void notifyServices();
|
||||||
void notifyAboutFriends();
|
void notifyAboutFriends();
|
||||||
|
|
||||||
@ -157,7 +144,8 @@ bool updateFilterByPeer_locked(const RsPeerId &peerId);
|
|||||||
|
|
||||||
|
|
||||||
void recordFilterChanges_locked(const RsPeerId &peerId,
|
void recordFilterChanges_locked(const RsPeerId &peerId,
|
||||||
ServicePeerFilter &originalFilter, ServicePeerFilter &updatedFilter);
|
ServicePeerFilter &originalFilter,
|
||||||
|
ServicePeerFilter &updatedFilter);
|
||||||
|
|
||||||
// Called from recordFilterChanges.
|
// Called from recordFilterChanges.
|
||||||
void filterChangeAdded_locked(const RsPeerId &peerId, uint32_t serviceId);
|
void filterChangeAdded_locked(const RsPeerId &peerId, uint32_t serviceId);
|
||||||
@ -190,11 +178,8 @@ bool peerHasPermissionForService_locked(const RsPeerId &peerId, uint32_t service
|
|||||||
RsMutex mMonitorMtx; /* below is protected */
|
RsMutex mMonitorMtx; /* below is protected */
|
||||||
std::multimap<uint32_t, pqiServiceMonitor *> mMonitors;
|
std::multimap<uint32_t, pqiServiceMonitor *> mMonitors;
|
||||||
|
|
||||||
ServiceControlSerialiser *mSerialiser ;
|
|
||||||
|
|
||||||
// Below here is saved in Configuration.
|
// Below here is saved in Configuration.
|
||||||
std::map<uint32_t, RsServicePermissions> mServicePermissionMap;
|
std::map<uint32_t, RsServicePermissions> mServicePermissionMap;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user