mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
Add support for GxsChanges as RsEvents
This commit is contained in:
parent
de0dd63e3f
commit
13ba26251c
@ -3,7 +3,8 @@
|
|||||||
* *
|
* *
|
||||||
* libretroshare: retroshare core library *
|
* libretroshare: retroshare core library *
|
||||||
* *
|
* *
|
||||||
* Copyright 2012-2012 by Robert Fernie, Evi-Parker Christopher *
|
* Copyright (C) 2012 Christopher Evi-Parker *
|
||||||
|
* Copyright (C) 2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||||
* *
|
* *
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU Lesser General Public License as *
|
* it under the terms of the GNU Lesser General Public License as *
|
||||||
@ -36,6 +37,7 @@
|
|||||||
#include "rsgixs.h"
|
#include "rsgixs.h"
|
||||||
#include "rsgxsutil.h"
|
#include "rsgxsutil.h"
|
||||||
#include "rsserver/p3face.h"
|
#include "rsserver/p3face.h"
|
||||||
|
#include "retroshare/rsevents.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -64,10 +66,11 @@ static const uint32_t INDEX_AUTHEN_ADMIN = 0x00000040; // admin key
|
|||||||
static const uint32_t MSG_CLEANUP_PERIOD = 60*59; // 59 minutes
|
static const uint32_t MSG_CLEANUP_PERIOD = 60*59; // 59 minutes
|
||||||
static const uint32_t INTEGRITY_CHECK_PERIOD = 60*31; // 31 minutes
|
static const uint32_t INTEGRITY_CHECK_PERIOD = 60*31; // 31 minutes
|
||||||
|
|
||||||
RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService *ns,
|
RsGenExchange::RsGenExchange(
|
||||||
RsSerialType *serviceSerialiser, uint16_t servType, RsGixs* gixs,
|
RsGeneralDataService* gds, RsNetworkExchangeService* ns,
|
||||||
uint32_t authenPolicy)
|
RsSerialType* serviceSerialiser, uint16_t servType, RsGixs* gixs,
|
||||||
: mGenMtx("GenExchange"),
|
uint32_t authenPolicy ) :
|
||||||
|
mGenMtx("GenExchange"),
|
||||||
mDataStore(gds),
|
mDataStore(gds),
|
||||||
mNetService(ns),
|
mNetService(ns),
|
||||||
mSerialiser(serviceSerialiser),
|
mSerialiser(serviceSerialiser),
|
||||||
@ -1097,7 +1100,10 @@ void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
|||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << "RsGenExchange::receiveChanges()" << std::endl;
|
std::cerr << "RsGenExchange::receiveChanges()" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
RsGxsChanges out;
|
std::unique_ptr<RsGxsChanges> evt(new RsGxsChanges);
|
||||||
|
evt->mServiceType = static_cast<RsServiceType>(mServType);
|
||||||
|
|
||||||
|
RsGxsChanges& out = *evt;
|
||||||
out.mService = getTokenService();
|
out.mService = getTokenService();
|
||||||
|
|
||||||
// collect all changes in one GxsChanges object
|
// collect all changes in one GxsChanges object
|
||||||
@ -1109,7 +1115,7 @@ void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
|||||||
RsGxsMsgChange* mc;
|
RsGxsMsgChange* mc;
|
||||||
RsGxsDistantSearchResultChange *gt;
|
RsGxsDistantSearchResultChange *gt;
|
||||||
|
|
||||||
if((mc = dynamic_cast<RsGxsMsgChange*>(n)) != NULL)
|
if((mc = dynamic_cast<RsGxsMsgChange*>(n)) != nullptr)
|
||||||
{
|
{
|
||||||
if (mc->metaChange())
|
if (mc->metaChange())
|
||||||
{
|
{
|
||||||
@ -1120,7 +1126,7 @@ void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
|||||||
addMessageChanged(out.mMsgs, mc->msgChangeMap);
|
addMessageChanged(out.mMsgs, mc->msgChangeMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if((gc = dynamic_cast<RsGxsGroupChange*>(n)) != NULL)
|
else if((gc = dynamic_cast<RsGxsGroupChange*>(n)) != nullptr)
|
||||||
{
|
{
|
||||||
if(gc->metaChange())
|
if(gc->metaChange())
|
||||||
{
|
{
|
||||||
@ -1131,18 +1137,20 @@ void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
|||||||
out.mGrps.splice(out.mGrps.end(), gc->mGrpIdList);
|
out.mGrps.splice(out.mGrps.end(), gc->mGrpIdList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if((gt = dynamic_cast<RsGxsDistantSearchResultChange*>(n)) != NULL)
|
else if(( gt =
|
||||||
|
dynamic_cast<RsGxsDistantSearchResultChange*>(n) ) != nullptr)
|
||||||
{
|
{
|
||||||
out.mDistantSearchReqs.push_back(gt->mRequestId);
|
out.mDistantSearchReqs.push_back(gt->mRequestId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
std::cerr << "(EE) Unknown changes type!!" << std::endl;
|
RsErr() << __PRETTY_FUNCTION__ << " Unknown changes type!"
|
||||||
|
<< std::endl;
|
||||||
delete n;
|
delete n;
|
||||||
}
|
}
|
||||||
changes.clear() ;
|
changes.clear() ;
|
||||||
|
|
||||||
RsServer::notify()->notifyGxsChange(out);
|
RsServer::notify()->notifyGxsChange(out);
|
||||||
|
if(rsEvents) rsEvents->postEvent(std::move(evt));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsGenExchange::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe)
|
bool RsGenExchange::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe)
|
||||||
@ -1154,8 +1162,7 @@ bool RsGenExchange::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId,
|
|||||||
setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED,
|
setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED,
|
||||||
(GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED | GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED));
|
(GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED | GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED));
|
||||||
|
|
||||||
if(mNetService != NULL)
|
if(mNetService) mNetService->subscribeStatusChanged(grpId,subscribe);
|
||||||
mNetService->subscribeStatusChanged(grpId,subscribe) ;
|
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
else
|
else
|
||||||
std::cerr << "(EE) No mNetService in RsGenExchange for service 0x" << std::hex << mServType << std::dec << std::endl;
|
std::cerr << "(EE) No mNetService in RsGenExchange for service 0x" << std::hex << mServType << std::dec << std::endl;
|
||||||
@ -3437,3 +3444,7 @@ bool RsGenExchange::localSearch( const std::string& matchString,
|
|||||||
{
|
{
|
||||||
return mNetService->search(matchString, results);
|
return mNetService->search(matchString, results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RsGxsChanges::RsGxsChanges() :
|
||||||
|
RsEvent(RsEventType::GXS_CHANGES), mServiceType(RsServiceType::NONE),
|
||||||
|
mService(nullptr) {}
|
||||||
|
@ -113,7 +113,10 @@ public:
|
|||||||
* @param gixs This is used for verification of msgs and groups received by Gen Exchange using identities.
|
* @param gixs This is used for verification of msgs and groups received by Gen Exchange using identities.
|
||||||
* @param authenPolicy This determines the authentication used for verfying authorship of msgs and groups
|
* @param authenPolicy This determines the authentication used for verfying authorship of msgs and groups
|
||||||
*/
|
*/
|
||||||
RsGenExchange(RsGeneralDataService* gds, RsNetworkExchangeService* ns, RsSerialType* serviceSerialiser, uint16_t mServType, RsGixs* gixs, uint32_t authenPolicy);
|
RsGenExchange(
|
||||||
|
RsGeneralDataService* gds, RsNetworkExchangeService* ns,
|
||||||
|
RsSerialType* serviceSerialiser, uint16_t mServType, RsGixs* gixs,
|
||||||
|
uint32_t authenPolicy );
|
||||||
|
|
||||||
virtual ~RsGenExchange();
|
virtual ~RsGenExchange();
|
||||||
|
|
||||||
|
@ -60,6 +60,9 @@ enum class RsEventType : uint32_t
|
|||||||
/// @see pqissl
|
/// @see pqissl
|
||||||
REMOTE_PEER_REFUSED_CONNECTION = 4,
|
REMOTE_PEER_REFUSED_CONNECTION = 4,
|
||||||
|
|
||||||
|
/// @see RsGxsChanges
|
||||||
|
GXS_CHANGES = 5,
|
||||||
|
|
||||||
MAX /// Used to detect invalid event type passed
|
MAX /// Used to detect invalid event type passed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
* *
|
* *
|
||||||
* libretroshare: retroshare core library *
|
* libretroshare: retroshare core library *
|
||||||
* *
|
* *
|
||||||
* Copyright 2012 by Christopher Evi-Parker *
|
* Copyright (C) 2012 Christopher Evi-Parker *
|
||||||
|
* Copyright (C) 2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||||
* *
|
* *
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU Lesser General Public License as *
|
* it under the terms of the GNU Lesser General Public License as *
|
||||||
@ -19,9 +20,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
#pragma once
|
||||||
#ifndef RSGXSIFACE_H_
|
|
||||||
#define RSGXSIFACE_H_
|
|
||||||
|
|
||||||
#include "retroshare/rsreputations.h"
|
#include "retroshare/rsreputations.h"
|
||||||
#include "retroshare/rsgxsservice.h"
|
#include "retroshare/rsgxsservice.h"
|
||||||
@ -29,6 +28,8 @@
|
|||||||
#include "retroshare/rsgxsifacetypes.h"
|
#include "retroshare/rsgxsifacetypes.h"
|
||||||
#include "util/rsdeprecate.h"
|
#include "util/rsdeprecate.h"
|
||||||
#include "serialiser/rsserializable.h"
|
#include "serialiser/rsserializable.h"
|
||||||
|
#include "rsitems/rsserviceids.h"
|
||||||
|
#include "retroshare/rsevents.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This structure is used to transport group summary information when a GXS
|
* This structure is used to transport group summary information when a GXS
|
||||||
@ -71,17 +72,34 @@ struct RsGxsGroupSummary : RsSerializable
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Stores ids of changed gxs groups and messages. It is used to notify the GUI about changes.
|
* Stores ids of changed gxs groups and messages.
|
||||||
|
* It is used to notify about GXS changes.
|
||||||
*/
|
*/
|
||||||
struct RsGxsChanges
|
struct RsGxsChanges : RsEvent
|
||||||
{
|
{
|
||||||
RsGxsChanges(): mService(nullptr){}
|
RsGxsChanges();
|
||||||
RsTokenService *mService;
|
|
||||||
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgs;
|
/// Type of the service
|
||||||
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgsMeta;
|
RsServiceType mServiceType;
|
||||||
std::list<RsGxsGroupId> mGrps;
|
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgs;
|
||||||
std::list<RsGxsGroupId> mGrpsMeta;
|
std::map<RsGxsGroupId, std::set<RsGxsMessageId> > mMsgsMeta;
|
||||||
std::list<TurtleRequestId> mDistantSearchReqs;
|
std::list<RsGxsGroupId> mGrps;
|
||||||
|
std::list<RsGxsGroupId> mGrpsMeta;
|
||||||
|
std::list<TurtleRequestId> mDistantSearchReqs;
|
||||||
|
|
||||||
|
/// @see RsSerializable
|
||||||
|
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||||
|
RsGenericSerializer::SerializeContext& ctx) override
|
||||||
|
{
|
||||||
|
RS_SERIAL_PROCESS(mServiceType);
|
||||||
|
RS_SERIAL_PROCESS(mMsgs);
|
||||||
|
RS_SERIAL_PROCESS(mMsgsMeta);
|
||||||
|
RS_SERIAL_PROCESS(mGrps);
|
||||||
|
RS_SERIAL_PROCESS(mGrpsMeta);
|
||||||
|
RS_SERIAL_PROCESS(mDistantSearchReqs);
|
||||||
|
}
|
||||||
|
|
||||||
|
RsTokenService* mService; // Weak pointer, not serialized
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -220,7 +238,3 @@ struct RsGxsIface
|
|||||||
virtual RsReputationLevel minReputationForForwardingMessages(
|
virtual RsReputationLevel minReputationForForwardingMessages(
|
||||||
uint32_t group_sign_flags,uint32_t identity_flags ) = 0;
|
uint32_t group_sign_flags,uint32_t identity_flags ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* RSGXSIFACE_H_ */
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
* *
|
* *
|
||||||
* libretroshare: retroshare core library *
|
* libretroshare: retroshare core library *
|
||||||
* *
|
* *
|
||||||
* Copyright 2007-2008 by Robert Fernie <retroshare@lunamutt.com> *
|
* Copyright (C) 2007-2008 Robert Fernie <retroshare@lunamutt.com> *
|
||||||
|
* Copyright (C) 2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||||
* *
|
* *
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU Lesser General Public License as *
|
* it under the terms of the GNU Lesser General Public License as *
|
||||||
@ -19,144 +20,129 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#ifndef RS_SERVICE_IDS_H
|
#pragma once
|
||||||
#define RS_SERVICE_IDS_H
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include "util/rsdeprecate.h"
|
||||||
|
|
||||||
/* Single place for Cache/Service Ids (uint16_t)
|
#include <cstdint>
|
||||||
* to 64K of them....
|
|
||||||
*
|
|
||||||
* Some Services/Caches are only msgs or caches...
|
|
||||||
* but they need to be combined so that the messages/caches
|
|
||||||
* can easily be aligned.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* These are Cache Only */
|
enum class RsServiceType : uint16_t
|
||||||
const uint16_t RS_SERVICE_TYPE_FILE_INDEX = 0x0001;
|
{
|
||||||
|
NONE = 0, /// To detect non-initialized reads
|
||||||
|
GOSSIP_DISCOVERY = 0x0011,
|
||||||
|
CHAT = 0x0012,
|
||||||
|
MSG = 0x0013,
|
||||||
|
TURTLE = 0x0014,
|
||||||
|
TUNNEL = 0x0015,
|
||||||
|
HEARTBEAT = 0x0016,
|
||||||
|
FILE_TRANSFER = 0x0017,
|
||||||
|
GROUTER = 0x0018,
|
||||||
|
FILE_DATABASE = 0x0019,
|
||||||
|
SERVICEINFO = 0x0020,
|
||||||
|
BANDWIDTH_CONTROL = 0x0021,
|
||||||
|
MAIL = 0x0022,
|
||||||
|
DIRECT_MAIL = 0x0023,
|
||||||
|
DISTANT_MAIL = 0x0024,
|
||||||
|
GWEMAIL_MAIL = 0x0025,
|
||||||
|
SERVICE_CONTROL = 0x0026,
|
||||||
|
DISTANT_CHAT = 0x0027,
|
||||||
|
GXS_TUNNEL = 0x0028,
|
||||||
|
BANLIST = 0x0101,
|
||||||
|
STATUS = 0x0102,
|
||||||
|
NXS = 0x0200,
|
||||||
|
GXSID = 0x0211,
|
||||||
|
PHOTO = 0x0212,
|
||||||
|
WIKI = 0x0213,
|
||||||
|
WIRE = 0x0214,
|
||||||
|
FORUMS = 0x0215,
|
||||||
|
POSTED = 0x0216,
|
||||||
|
CHANNELS = 0x0217,
|
||||||
|
GXSCIRCLE = 0x0218,
|
||||||
|
/// not gxs, but used with identities.
|
||||||
|
REPUTATION = 0x0219,
|
||||||
|
GXS_RECOGN = 0x0220,
|
||||||
|
GXS_TRANS = 0x0230,
|
||||||
|
JSONAPI = 0x0240,
|
||||||
|
FORUMS_CONFIG = 0x0315,
|
||||||
|
CHANNELS_CONFIG = 0x0317,
|
||||||
|
RTT = 0x1011, /// Round Trip Time
|
||||||
|
|
||||||
/* These are Services only */
|
|
||||||
const uint16_t RS_SERVICE_TYPE_DISC = 0x0011;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_CHAT = 0x0012;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_MSG = 0x0013;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_TURTLE = 0x0014;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_TUNNEL = 0x0015;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_HEARTBEAT = 0x0016;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_FILE_TRANSFER = 0x0017;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_GROUTER = 0x0018;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_FILE_DATABASE = 0x0019;
|
|
||||||
|
|
||||||
const uint16_t RS_SERVICE_TYPE_SERVICEINFO = 0x0020;
|
/***************** IDS ALLOCATED FOR PLUGINS ******************/
|
||||||
/* Bandwidth Control */
|
// 2000+
|
||||||
const uint16_t RS_SERVICE_TYPE_BWCTRL = 0x0021;
|
PLUGIN_ARADO_ID = 0x2001,
|
||||||
// New Mail Service (replace old Msg Service)
|
PLUGIN_QCHESS_ID = 0x2002,
|
||||||
const uint16_t RS_SERVICE_TYPE_MAIL = 0x0022;
|
PLUGIN_FEEDREADER = 0x2003,
|
||||||
const uint16_t RS_SERVICE_TYPE_DIRECT_MAIL = 0x0023;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_DISTANT_MAIL = 0x0024;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_GWEMAIL_MAIL = 0x0025;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_SERVICE_CONTROL= 0x0026;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_DISTANT_CHAT = 0x0027;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_GXS_TUNNEL = 0x0028;
|
|
||||||
|
|
||||||
// Non essential services.
|
/// Reserved for packet slicing probes.
|
||||||
const uint16_t RS_SERVICE_TYPE_BANLIST = 0x0101;
|
PACKET_SLICING_PROBE = 0xAABB,
|
||||||
const uint16_t RS_SERVICE_TYPE_STATUS = 0x0102;
|
|
||||||
|
|
||||||
/* New Cache Services */
|
// Nabu's experimental services.
|
||||||
/* Rs Network Exchange Service */
|
PLUGIN_FIDO_GW = 0xF1D0,
|
||||||
const uint16_t RS_SERVICE_TYPE_NXS = 0x0200;
|
PLUGIN_ZERORESERVE = 0xBEEF
|
||||||
|
};
|
||||||
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_GXSID = 0x0211;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_PHOTO = 0x0212;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_WIKI = 0x0213;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_WIRE = 0x0214;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_FORUMS = 0x0215;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_POSTED = 0x0216;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_GXSCIRCLE = 0x0218;
|
|
||||||
// not gxs, but used with identities.
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION = 0x0219;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230;
|
|
||||||
const uint16_t RS_SERVICE_TYPE_JSONAPI = 0x0240;
|
|
||||||
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315;
|
|
||||||
const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317;
|
// TODO: Port all services types to RsServiceType
|
||||||
|
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_FILE_INDEX = 0x0001;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_DISC = 0x0011;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_CHAT = 0x0012;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_MSG = 0x0013;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_TURTLE = 0x0014;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_TUNNEL = 0x0015;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_HEARTBEAT = 0x0016;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_FILE_TRANSFER = 0x0017;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GROUTER = 0x0018;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_FILE_DATABASE = 0x0019;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_SERVICEINFO = 0x0020;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_BWCTRL = 0x0021; /// Bandwidth Control
|
||||||
|
/// New Mail Service (replace old Msg Service)
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_MAIL = 0x0022;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_DIRECT_MAIL = 0x0023;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_DISTANT_MAIL = 0x0024;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GWEMAIL_MAIL = 0x0025;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_SERVICE_CONTROL= 0x0026;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_DISTANT_CHAT = 0x0027;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_TUNNEL = 0x0028;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_BANLIST = 0x0101;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_STATUS = 0x0102;
|
||||||
|
/// Rs Network Exchange Service
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_NXS = 0x0200;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_GXSID = 0x0211;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_PHOTO = 0x0212;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_WIKI = 0x0213;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_WIRE = 0x0214;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_FORUMS = 0x0215;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_POSTED = 0x0216;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_GXSCIRCLE = 0x0218;
|
||||||
|
/// not gxs, but used with identities.
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION = 0x0219;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_JSONAPI = 0x0240;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315;
|
||||||
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317;
|
||||||
|
|
||||||
// Experimental Services.
|
// Experimental Services.
|
||||||
/* DSDV Testing at the moment - Service Only */
|
/* DSDV Testing at the moment - Service Only */
|
||||||
const uint16_t RS_SERVICE_TYPE_DSDV = 0x1010;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_DSDV = 0x1010;
|
||||||
/* Latency RTT Measurements */
|
/* Latency RTT Measurements */
|
||||||
const uint16_t RS_SERVICE_TYPE_RTT = 0x1011;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_RTT = 0x1011;
|
||||||
|
|
||||||
|
|
||||||
/***************** IDS ALLOCATED FOR PLUGINS ******************/
|
/***************** IDS ALLOCATED FOR PLUGINS ******************/
|
||||||
// 2000+
|
// 2000+
|
||||||
|
|
||||||
const uint16_t RS_SERVICE_TYPE_PLUGIN_ARADO_ID = 0x2001;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PLUGIN_ARADO_ID = 0x2001;
|
||||||
const uint16_t RS_SERVICE_TYPE_PLUGIN_QCHESS_ID = 0x2002;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PLUGIN_QCHESS_ID = 0x2002;
|
||||||
const uint16_t RS_SERVICE_TYPE_PLUGIN_FEEDREADER = 0x2003;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PLUGIN_FEEDREADER = 0x2003;
|
||||||
|
|
||||||
// Reserved for packet slicing probes.
|
// Reserved for packet slicing probes.
|
||||||
const uint16_t RS_SERVICE_TYPE_PACKET_SLICING_PROBE = 0xAABB;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PACKET_SLICING_PROBE = 0xAABB;
|
||||||
|
|
||||||
// Nabu's services.
|
// Nabu's services.
|
||||||
const uint16_t RS_SERVICE_TYPE_PLUGIN_FIDO_GW = 0xF1D0;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PLUGIN_FIDO_GW = 0xF1D0;
|
||||||
const uint16_t RS_SERVICE_TYPE_PLUGIN_ZERORESERVE = 0xBEEF;
|
RS_DEPRECATED_FOR(RsServiceType) const uint16_t RS_SERVICE_TYPE_PLUGIN_ZERORESERVE = 0xBEEF;
|
||||||
|
|
||||||
/****************** BELOW ARE ONLY THEORETICAL (CAN BE CHANGED) *****/
|
|
||||||
/*
|
|
||||||
* If you are planning on making a new service....
|
|
||||||
* Test it out with an ID in the range from 0xf000 - 0xffff
|
|
||||||
* And Change the ID everytime you make significant changes to the
|
|
||||||
* data structures...
|
|
||||||
*
|
|
||||||
* eg.
|
|
||||||
* const uint16_t RS_SERVICE_TYPE_DISTRIB_O1 = 0xf110; // First Revision.
|
|
||||||
* const uint16_t RS_SERVICE_TYPE_DISTRIB_O2 = 0xf111; // Second Revision.
|
|
||||||
* const uint16_t RS_SERVICE_TYPE_DISTRIB = 0xf112; // Final Revision.
|
|
||||||
*
|
|
||||||
* This minimises the chances of your new serialisers messing with
|
|
||||||
* other existing, older, or proposed services.
|
|
||||||
*
|
|
||||||
* ONLY MOVE your Id once the service has been finalised.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! for Qblog service (Cache Only) */
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_QBLOG = 0xf010;
|
|
||||||
|
|
||||||
/* TEST VOIP - Service only */
|
|
||||||
// NOT SURE WHATS HAPPENING WITH THIS ONE?
|
|
||||||
// SHOULD BE DEFINED IN PLUGIN SECTION!
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_VOIP = 0xf011;
|
|
||||||
|
|
||||||
/* Proxy - Service only */
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_PROXY = 0xf030;
|
|
||||||
|
|
||||||
/* Games/External Apps - Service Only */
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_GAME_LAUNCHER = 0xf200;
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_PORT = 0xf201;
|
|
||||||
|
|
||||||
/* Example Games (NOT USED YET!) */
|
|
||||||
/* Board Games */
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_GAME_QTCHESS = 0xf211;
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_GAME_QGO = 0xf212;
|
|
||||||
|
|
||||||
/* Card Games */
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_GAME_BIGTWO = 0xf213;
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_GAME_POKER = 0xf214;
|
|
||||||
|
|
||||||
/***************** IDS ALLOCATED FOR PLUGINS ******************/
|
|
||||||
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_PLUGIN_ARADO_TEST_ID1 = 0xf401;
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_PLUGIN_QCHESS_TEST_ID1 = 0xf402;
|
|
||||||
|
|
||||||
// test
|
|
||||||
//const uint16_t RS_SERVICE_TYPE_PLUGIN_SIMPLE_FORUM = 0xf403;
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* RS_SERVICE_IDS_H */
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user