Made p3identity compile. (but won't run yet!)

- Lots of tweaks to rsidentity & rsgixs interfaces to make them match.
 - added "mask" to gxs flag set operations.
 - added dummy RsMsgMetaData print functions.
 - enable compilation of code in .pro.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5702 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-10-21 15:48:18 +00:00
parent 02f8d27b6e
commit 57a99d1aa3
13 changed files with 341 additions and 234 deletions

View file

@ -441,8 +441,9 @@ void RsGenExchange::publishMsg(uint32_t& token, RsGxsMsgItem *msgItem)
mMsgsToPublish.insert(std::make_pair(token, msgItem)); mMsgsToPublish.insert(std::make_pair(token, msgItem));
} }
void RsGenExchange::setGroupSubscribeFlag(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& flag) void RsGenExchange::setGroupSubscribeFlags(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& flag, const uint32_t& mask)
{ {
/* TODO APPLY MASK TO FLAGS */
RsStackMutex stack(mGenMtx); RsStackMutex stack(mGenMtx);
token = mDataAccess->generatePublicToken(); token = mDataAccess->generatePublicToken();
@ -452,8 +453,9 @@ void RsGenExchange::setGroupSubscribeFlag(uint32_t& token, const RsGxsGroupId& g
mGrpLocMetaMap.insert(std::make_pair(token, g)); mGrpLocMetaMap.insert(std::make_pair(token, g));
} }
void RsGenExchange::setGroupStatusFlag(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status) void RsGenExchange::setGroupStatusFlags(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status, const uint32_t& mask)
{ {
/* TODO APPLY MASK TO FLAGS */
RsStackMutex stack(mGenMtx); RsStackMutex stack(mGenMtx);
token = mDataAccess->generatePublicToken(); token = mDataAccess->generatePublicToken();
@ -475,8 +477,9 @@ void RsGenExchange::setGroupServiceString(uint32_t& token, const RsGxsGroupId& g
mGrpLocMetaMap.insert(std::make_pair(token, g)); mGrpLocMetaMap.insert(std::make_pair(token, g));
} }
void RsGenExchange::setMsgStatusFlag(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const uint32_t& status) void RsGenExchange::setMsgStatusFlags(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const uint32_t& status, const uint32_t& mask)
{ {
/* TODO APPLY MASK TO FLAGS */
RsStackMutex stack(mGenMtx); RsStackMutex stack(mGenMtx);
token = mDataAccess->generatePublicToken(); token = mDataAccess->generatePublicToken();

View file

@ -257,13 +257,13 @@ public:
* @param token this is set to token value associated to this request * @param token this is set to token value associated to this request
* @param * @param
*/ */
void setGroupSubscribeFlag(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status); void setGroupSubscribeFlags(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status, const uint32_t& mask);
void setGroupStatusFlag(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status); void setGroupStatusFlags(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status, const uint32_t& mask);
void setGroupServiceString(uint32_t& token, const RsGxsGroupId& grpId, const std::string& servString); void setGroupServiceString(uint32_t& token, const RsGxsGroupId& grpId, const std::string& servString);
void setMsgStatusFlag(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const uint32_t& status); void setMsgStatusFlags(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const uint32_t& status, const uint32_t& mask);
void setMsgServiceString(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const std::string& servString ); void setMsgServiceString(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, const std::string& servString );

View file

@ -27,9 +27,12 @@
*/ */
#include "gxs/rsgxs.h" #include "gxs/rsgxs.h"
#include "gxs/rsgenexchange.h"
#include <openssl/ssl.h> #include "serialiser/rstlvkeys.h"
#include <set>
//#include <openssl/ssl.h>
//#include <set>
/*! /*!
* GIXP: General Identity Exchange Service. * GIXP: General Identity Exchange Service.
@ -94,25 +97,27 @@
* as these will be used very frequently. * as these will be used very frequently.
*****/ *****/
typedef std::string GxsId; //typedef std::string GxsId;
typedef std::string PeerId; typedef std::string PeerId;
// External Interface - //
class RsIdentityService //// External Interface -
{ //class RsIdentityService
enum IdentityType { Pseudonym, Signed, Anonymous }; //{
// enum IdentityType { Pseudonym, Signed, Anonymous };
virtual bool loadId(const GxsId &id) = 0; //
// virtual bool loadId(const GxsId &id) = 0;
virtual bool getNickname(const GxsId &id, std::string &nickname) = 0; //
// virtual bool getNickname(const GxsId &id, std::string &nickname) = 0;
virtual bool createKey(RsGixsProfile& profile, uint32_t type) = 0; /* fills in mKeyId, and signature */ //
// virtual bool createKey(RsGixsProfile& profile, uint32_t type) = 0; /* fills in mKeyId, and signature */
virtual RsGixsProfile* getProfile(const KeyRef& keyref) = 0; //
// virtual RsGixsProfile* getProfile(const KeyRef& keyref) = 0;
// modify reputation. //
// // modify reputation.
}; //
//};
/* Identity Interface for GXS Message Verification. /* Identity Interface for GXS Message Verification.
@ -127,14 +132,14 @@ public:
* @param keyref the keyref of key that is being checked for * @param keyref the keyref of key that is being checked for
* @return true if available, false otherwise * @return true if available, false otherwise
*/ */
virtual bool haveKey(const GxsId &id) = 0; virtual bool haveKey(const RsGxsId &id) = 0;
/*! /*!
* Use to query whether private key member of the given key reference is available * Use to query whether private key member of the given key reference is available
* @param keyref the KeyRef of the key being checked for * @param keyref the KeyRef of the key being checked for
* @return true if private key is held here, false otherwise * @return true if private key is held here, false otherwise
*/ */
virtual bool havePrivateKey(const GxsId &id) = 0; virtual bool havePrivateKey(const RsGxsId &id) = 0;
// The fetchKey has an optional peerList.. this is people that had the msg with the signature. // The fetchKey has an optional peerList.. this is people that had the msg with the signature.
// These same people should have the identity - so we ask them first. // These same people should have the identity - so we ask them first.
@ -143,7 +148,7 @@ public:
* @param keyref the KeyRef of the key being requested * @param keyref the KeyRef of the key being requested
* @return will * @return will
*/ */
virtual bool requestKey(const GxsId &id, const std::list<PeerId> &peers) = 0; virtual bool requestKey(const RsGxsId &id, const std::list<PeerId> &peers) = 0;
/*! /*!
* Retrieves a key identity * Retrieves a key identity
@ -151,18 +156,25 @@ public:
* @return a pointer to a valid profile if successful, otherwise NULL * @return a pointer to a valid profile if successful, otherwise NULL
* *
*/ */
virtual int getKey(const GxsId &id, TlvSecurityKey &key) = 0; virtual int getKey(const RsGxsId &id, RsTlvSecurityKey &key) = 0;
virtual int getPrivateKey(const GxsId &id, TlvSecurityKey &key) = 0; // For signing outgoing messages. virtual int getPrivateKey(const RsGxsId &id, RsTlvSecurityKey &key) = 0; // For signing outgoing messages.
}; };
class GixsReputation
{
public:
RsGxsId id;
int score;
};
class RsGixsReputation class RsGixsReputation
{ {
public: public:
// get Reputation. // get Reputation.
virtual bool getReputation(const GxsId &id, const GixsReputation &rep) = 0; virtual bool getReputation(const RsGxsId &id, const GixsReputation &rep) = 0;
}; };
@ -171,7 +183,8 @@ public:
class RsGxsIdExchange: public RsGenExchange, public RsGixsReputation, public RsGixs class RsGxsIdExchange: public RsGenExchange, public RsGixsReputation, public RsGixs
{ {
public: public:
RsGxsIdExchange() { return; } RsGxsIdExchange(RsGeneralDataService* gds, RsNetworkExchangeService* ns, RsSerialType* serviceSerialiser, uint16_t mServType)
:RsGenExchange(gds,ns,serviceSerialiser,mServType) { return; }
virtual ~RsGxsIdExchange() { return; } virtual ~RsGxsIdExchange() { return; }
}; };

View file

@ -138,9 +138,9 @@ bool RsGxsIfaceImpl::getMsgSummary(const uint32_t &token,
bool RsGxsIfaceImpl::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe) bool RsGxsIfaceImpl::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe)
{ {
if(subscribe) if(subscribe)
mGxs->setGroupSubscribeFlag(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED); mGxs->setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED, GXS_SERV::GROUP_SUBSCRIBE_MASK);
else else
mGxs->setGroupSubscribeFlag(token, grpId, ~GXS_SERV::GROUP_SUBSCRIBE_MASK); mGxs->setGroupSubscribeFlags(token, grpId, 0, GXS_SERV::GROUP_SUBSCRIBE_MASK);
return true; return true;
} }

View file

@ -623,13 +623,13 @@ HEADERS += retroshare/rsgame.h \
services/p3posted.cc \ services/p3posted.cc \
# Identity Service # Identity Service
#HEADERS += retroshare/rsidentity.h \ HEADERS += retroshare/rsidentity.h \
# gxs/rsgixs.h \ gxs/rsgixs.h \
# services/p3idservice.h \ services/p3idservice.h \
# serialiser/rsiditems.h \ serialiser/rsgxsiditems.h \
#SOURCES += services/p3idservice.cc \ SOURCES += services/p3idservice.cc \
# serialiser/rsiditems.cc \ # serialiser/rsgxsiditems.cc \
# Wiki Service # Wiki Service
HEADERS += retroshare/rswiki.h \ HEADERS += retroshare/rswiki.h \

View file

@ -29,7 +29,9 @@
#include <inttypes.h> #include <inttypes.h>
#include <string> #include <string>
#include <list> #include <list>
#include "rsgxsservice.h"
#include "gxs/rstokenservice.h"
#include "gxs/rsgxsifaceimpl.h"
/* The Main Interface Class - for information about your Peers */ /* The Main Interface Class - for information about your Peers */
class RsIdentity; class RsIdentity;
@ -49,7 +51,7 @@ extern RsIdentity *rsIdentity;
std::string rsIdTypeToString(uint32_t idtype); std::string rsIdTypeToString(uint32_t idtype);
class RsIdGroup class RsGxsIdGroup
{ {
public: public:
@ -80,7 +82,7 @@ class RsIdGroup
class RsIdMsg class RsGxsIdOpinion
{ {
public: public:
@ -98,12 +100,18 @@ class RsIdMsg
}; };
// This will probably be dropped.
class RsGxsIdComment
{
public:
std::ostream &operator<<(std::ostream &out, const RsIdGroup &meta); RsMsgMetaData mMeta;
std::ostream &operator<<(std::ostream &out, const RsIdMsg &meta); std::string mComment;
};
typedef std::map<RsGxsGroupId, std::vector<RsIdMsg> > IdMsgResult;
std::ostream &operator<<(std::ostream &out, const RsGxsIdGroup &group);
std::ostream &operator<<(std::ostream &out, const RsGxsIdOpinion &msg);
#if 0 #if 0
class RsIdReputation class RsIdReputation
@ -134,6 +142,39 @@ class RsIdOpinion
#endif #endif
// DATA TYPE FOR EXTERNAL INTERFACE.
typedef std::string RsGxsId; // TMP. =>
class RsIdentityDetails
{
public:
RsGxsId id;
// identity details.
// reputation details.
};
class RsIdOpinion
{
public:
RsGxsId id;
int rating;
};
class RsIdentityParameters
{
public:
int IdType;
};
class RsIdentity: public RsGxsIfaceImpl class RsIdentity: public RsGxsIfaceImpl
{ {
@ -208,23 +249,19 @@ public:
// We cache all identities, and provide alternative (instantaneous) // We cache all identities, and provide alternative (instantaneous)
// functions to extract info, rather than the standard Token system. // functions to extract info, rather than the standard Token system.
virtual bool getNickname(const RsId &id, std::string &nickname) = 0; virtual bool getNickname(const RsGxsId &id, std::string &nickname) = 0;
virtual bool getIdDetails(const RsId &id, RsIdentityDetails &details) = 0; virtual bool getIdDetails(const RsGxsId &id, RsIdentityDetails &details) = 0;
virtual bool getOwnIds(std::list<RsId> &ownIds) = 0; virtual bool getOwnIds(std::list<RsGxsId> &ownIds) = 0;
// //
virtual bool submitOpinion(uint32_t& token, RsIdOpinion &opinion) = 0; virtual bool submitOpinion(uint32_t& token, RsIdOpinion &opinion) = 0;
virtual bool createIdentity(uint32_t& token, RsIdentityParameters &params) = 0; virtual bool createIdentity(uint32_t& token, RsIdentityParameters &params) = 0;
// Specific RsIdentity Functions.... // Specific RsIdentity Functions....
/* Specific Service Data */ /* Specific Service Data */
//virtual bool getGroupData(const uint32_t &token, RsIdGroup &group) = 0; /* We expose these initially for testing / GUI purposes.
//virtual bool getMsgData(const uint32_t &token, RsIdMsg &msg) = 0; */
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup> &groups) = 0;
//virtual bool createGroup(uint32_t &token, RsIdGroup &group, bool isNew) = 0;
//virtual bool createMsg(uint32_t &token, RsIdMsg &msg, bool isNew) = 0;
/* In the Identity System - You don't access the Messages Directly. /* In the Identity System - You don't access the Messages Directly.
* as they represent idividuals opinions.... * as they represent idividuals opinions....

View file

@ -293,8 +293,8 @@ class RsTokReqOptionsVEG
// //
//}; //};
std::ostream &operator<<(std::ostream &out, const RsGroupMetaData &meta); //std::ostream &operator<<(std::ostream &out, const RsGroupMetaData &meta);
std::ostream &operator<<(std::ostream &out, const RsMsgMetaData &meta); //std::ostream &operator<<(std::ostream &out, const RsMsgMetaData &meta);
class RsTokenServiceVEG class RsTokenServiceVEG
{ {

View file

@ -8,6 +8,7 @@
#include "rsgxsitems.h" #include "rsgxsitems.h"
#include "gxs/rsgxsdata.h" #include "gxs/rsgxsdata.h"
#include <iostream>
void RsMsgMetaData::operator =(const RsGxsMsgMetaData& rGxsMeta) void RsMsgMetaData::operator =(const RsGxsMsgMetaData& rGxsMeta)
{ {
@ -42,3 +43,18 @@
this->mServiceString = rGxsMeta.mServiceString; this->mServiceString = rGxsMeta.mServiceString;
this->mSignFlags = rGxsMeta.mSignFlags; this->mSignFlags = rGxsMeta.mSignFlags;
} }
std::ostream &operator<<(std::ostream &out, const RsGroupMetaData &meta)
{
out << "RsGroupMetaData(TODO PRINT)";
return out;
}
std::ostream &operator<<(std::ostream &out, const RsMsgMetaData &meta)
{
out << "RsMsgMetaData(TODO PRINT)";
return out;
}

View file

@ -114,6 +114,9 @@ class RsMsgMetaData
}; };
std::ostream &operator<<(std::ostream &out, const RsGroupMetaData &meta);
std::ostream &operator<<(std::ostream &out, const RsMsgMetaData &meta);
class RsGxsGrpItem : public RsItem class RsGxsGrpItem : public RsItem
{ {

View file

@ -131,7 +131,7 @@ const uint16_t RS_SERVICE_TYPE_GAME_POKER = 0xf214;
/* Rs Network Exchange Service */ /* Rs Network Exchange Service */
const uint16_t RS_SERVICE_TYPE_NXS = 0xf300; const uint16_t RS_SERVICE_TYPE_NXS = 0xf300;
const uint16_t RS_SERVICE_GXSV1_TYPE_IDENTITY = 0xf301; const uint16_t RS_SERVICE_GXSV1_TYPE_GXSID = 0xf301;
const uint16_t RS_SERVICE_GXSV1_TYPE_PHOTO = 0xf302; const uint16_t RS_SERVICE_GXSV1_TYPE_PHOTO = 0xf302;
const uint16_t RS_SERVICE_GXSV1_TYPE_WIKI = 0xf303; const uint16_t RS_SERVICE_GXSV1_TYPE_WIKI = 0xf303;
const uint16_t RS_SERVICE_GXSV1_TYPE_WIRE = 0xf304; const uint16_t RS_SERVICE_GXSV1_TYPE_WIRE = 0xf304;
@ -139,7 +139,7 @@ const uint16_t RS_SERVICE_GXSV1_TYPE_FORUMS = 0xf305;
const uint16_t RS_SERVICE_GXSV1_TYPE_POSTED = 0xf306; const uint16_t RS_SERVICE_GXSV1_TYPE_POSTED = 0xf306;
const uint16_t RS_SERVICE_GXSV1_TYPE_CHANNELS = 0xf307; const uint16_t RS_SERVICE_GXSV1_TYPE_CHANNELS = 0xf307;
const uint16_t RS_SERVICE_GXSV2_TYPE_IDENTITY = 0xf311; const uint16_t RS_SERVICE_GXSV2_TYPE_GXSID = 0xf311;
const uint16_t RS_SERVICE_GXSV2_TYPE_PHOTO = 0xf312; const uint16_t RS_SERVICE_GXSV2_TYPE_PHOTO = 0xf312;
const uint16_t RS_SERVICE_GXSV2_TYPE_WIKI = 0xf313; const uint16_t RS_SERVICE_GXSV2_TYPE_WIKI = 0xf313;
const uint16_t RS_SERVICE_GXSV2_TYPE_WIRE = 0xf314; const uint16_t RS_SERVICE_GXSV2_TYPE_WIRE = 0xf314;

View file

@ -24,9 +24,11 @@
*/ */
#include "services/p3idservice.h" #include "services/p3idservice.h"
#include "serialiser/rsgxsiditems.h"
#include "util/rsrandom.h" #include "util/rsrandom.h"
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include <sstream> #include <sstream>
#include <stdio.h> #include <stdio.h>
@ -41,27 +43,19 @@
RsIdentity *rsIdentity = NULL; RsIdentity *rsIdentity = NULL;
#define RSGXSID_MAX_SERVICE_STRING 1024
/********************************************************************************/ /********************************************************************************/
/******************* Startup / Tick ******************************************/ /******************* Startup / Tick ******************************************/
/********************************************************************************/ /********************************************************************************/
p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes) p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
: RsIdentity(this), RsGenExchange(gds, nes, NULL, RS_SERVICE_GXSV1_TYPE_IDENTITY), : RsGxsIdExchange(gds, nes, NULL, RS_SERVICE_GXSV1_TYPE_GXSID), RsIdentity(this),
mIdMtx("p3IdService") mIdMtx("p3IdService")
{ {
} }
p3IdService::p3IdService(uint16_t type)
:p3GxsDataService(type, new IdDataProxy()), mIdMtx("p3IdService"), mUpdated(true)
{
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
mIdProxy = (IdDataProxy *) mProxy;
return;
}
int p3IdService::internal_tick() int p3IdService::internal_tick()
{ {
std::cerr << "p3IdService::internal_tick()"; std::cerr << "p3IdService::internal_tick()";
@ -78,17 +72,17 @@ int p3IdService::internal_tick()
/******************* RsIdentity Interface ***************************************/ /******************* RsIdentity Interface ***************************************/
/********************************************************************************/ /********************************************************************************/
bool p3IdService:: getNickname(const RsId &id, std::string &nickname) bool p3IdService:: getNickname(const RsGxsId &id, std::string &nickname)
{ {
return false; return false;
} }
bool p3IdService:: getIdDetails(const RsId &id, RsIdentityDetails &details) bool p3IdService:: getIdDetails(const RsGxsId &id, RsIdentityDetails &details)
{ {
return false; return false;
} }
bool p3IdService:: getOwnIds(std::list<RsId> &ownIds) bool p3IdService:: getOwnIds(std::list<RsGxsId> &ownIds)
{ {
return false; return false;
} }
@ -110,27 +104,27 @@ bool p3IdService::createIdentity(uint32_t& token, RsIdentityParameters &params)
/******************* RsGixs Interface ***************************************/ /******************* RsGixs Interface ***************************************/
/********************************************************************************/ /********************************************************************************/
bool p3IdService::haveKey(const GxsId &id) bool p3IdService::haveKey(const RsGxsId &id)
{ {
return false; return false;
} }
bool p3IdService::havePrivateKey(const GxsId &id) bool p3IdService::havePrivateKey(const RsGxsId &id)
{ {
return false; return false;
} }
bool p3IdService::requestKey(const GxsId &id, const std::list<PeerId> &peers) bool p3IdService::requestKey(const RsGxsId &id, const std::list<PeerId> &peers)
{ {
return false; return false;
} }
int p3IdService::getKey(const GxsId &id, TlvSecurityKey &key) int p3IdService::getKey(const RsGxsId &id, RsTlvSecurityKey &key)
{ {
return -1; return -1;
} }
int p3IdService::getPrivateKey(const GxsId &id, TlvSecurityKey &key) int p3IdService::getPrivateKey(const RsGxsId &id, RsTlvSecurityKey &key)
{ {
return -1; return -1;
} }
@ -140,7 +134,7 @@ int p3IdService::getPrivateKey(const GxsId &id, TlvSecurityKey &key)
/******************* RsGixsReputation ***************************************/ /******************* RsGixsReputation ***************************************/
/********************************************************************************/ /********************************************************************************/
bool p3IdService::getReputation(const GxsId &id, const GixsReputation &rep) bool p3IdService::getReputation(const RsGxsId &id, const GixsReputation &rep)
{ {
return false; return false;
} }
@ -150,11 +144,9 @@ bool p3IdService::getReputation(const GxsId &id, const GixsReputation &rep)
/******************* Get/Set Data ******************************************/ /******************* Get/Set Data ******************************************/
/********************************************************************************/ /********************************************************************************/
bool p3IdService::getGroupData(const uint32_t &token, RsIdGroup &group) bool p3IdService::getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup> &groups)
{ {
// MISMATCH BETWEEN RsGenExchange (vector) and individual result here.
#if 0
std::vector<RsGxsGrpItem*> grpData; std::vector<RsGxsGrpItem*> grpData;
bool ok = RsGenExchange::getGroupData(token, grpData); bool ok = RsGenExchange::getGroupData(token, grpData);
@ -165,23 +157,18 @@ bool p3IdService::getGroupData(const uint32_t &token, RsIdGroup &group)
for(; vit != grpData.end(); vit++) for(; vit != grpData.end(); vit++)
{ {
RsGxsIdGroupItem* item = dynamic_cast<RsGxsIdGroupItem*>(*vit); RsGxsIdGroupItem* item = dynamic_cast<RsGxsIdGroupItem*>(*vit);
RsIdGroup group = item->group; RsGxsIdGroup group = item->group;
group.mMeta = item->meta group.mMeta = item->meta;
groups.push_back(group); groups.push_back(group);
} }
} }
return ok; return ok;
#endif
return false;
} }
bool p3IdService::getMsgData(const uint32_t &token, RsIdMsg &msg) bool p3IdService::getMsgData(const uint32_t &token, std::vector<RsGxsIdOpinion> &opinions)
{ {
// MISMATCH BETWEEN RsGenExchange (vector) and individual result here.
#if 0
GxsMsgDataMap msgData; GxsMsgDataMap msgData;
bool ok = RsGenExchange::getMsgData(token, msgData); bool ok = RsGenExchange::getMsgData(token, msgData);
@ -197,33 +184,31 @@ bool p3IdService::getMsgData(const uint32_t &token, RsIdMsg &msg)
for(; vit != msgItems.end(); vit++) for(; vit != msgItems.end(); vit++)
{ {
RsGxsIdMsgItem* item = dynamic_cast<RsGxsIdMsgItem*>(*vit); RsGxsIdOpinionItem* item = dynamic_cast<RsGxsIdOpinionItem*>(*vit);
if(item) if (item)
{ {
RsIdMsg msg = item->msg; RsGxsIdOpinion opinion = item->opinion;
msg.mMeta = item->meta; opinion.mMeta = item->meta;
msgs[grpId].push_back(msg); opinions.push_back(opinion);
delete item; delete item;
} }
else else
{ {
std::cerr << "Not a IdMsg Item, deleting!" << std::endl; std::cerr << "Not a IdOpinion Item, deleting!" << std::endl;
delete *vit; delete *vit;
} }
} }
} }
} }
return ok; return ok;
#endif
return false;
} }
/********************************************************************************/ /********************************************************************************/
/********************************************************************************/ /********************************************************************************/
/********************************************************************************/ /********************************************************************************/
bool p3IdService::createGroup(uint32_t& token, RsIdGroup &group) bool p3IdService::createGroup(uint32_t& token, RsGxsIdGroup &group)
{ {
RsGxsIdGroupItem* item = new RsGxsIdGroupItem(); RsGxsIdGroupItem* item = new RsGxsIdGroupItem();
item->group = group; item->group = group;
@ -232,11 +217,11 @@ bool p3IdService::createGroup(uint32_t& token, RsIdGroup &group)
return true; return true;
} }
bool p3IdService::createMsg(uint32_t& token, RsIdMsg &msg) bool p3IdService::createMsg(uint32_t& token, RsGxsIdOpinion &opinion)
{ {
RsGxsIdMsgItem* item = new RsGxsIdMsgItem(); RsGxsIdOpinionItem* item = new RsGxsIdOpinionItem();
item->msg = msg; item->opinion = opinion;
item->meta = msg.mMeta; item->meta = opinion.mMeta;
RsGenExchange::publishMsg(token, item); RsGenExchange::publishMsg(token, item);
return true; return true;
} }
@ -279,7 +264,7 @@ void p3IdService::generateDummyData()
int nIds = 1 + (RSRandom::random_u32() % 2); int nIds = 1 + (RSRandom::random_u32() % 2);
for(i = 0; i < nIds; i++) for(i = 0; i < nIds; i++)
{ {
RsIdGroup id; RsGxsIdGroup id;
RsPeerDetails details; RsPeerDetails details;
@ -328,7 +313,10 @@ void p3IdService::generateDummyData()
} }
//mIds[id.mKeyId] = id; //mIds[id.mKeyId] = id;
mIdProxy->addGroup(id); //mIdProxy->addGroup(id);
// STORE
uint32_t dummyToken = 0;
createGroup(dummyToken, id);
} }
} }
@ -341,7 +329,7 @@ void p3IdService::generateDummyData()
/* make some fake gpg ids */ /* make some fake gpg ids */
for(i = 0; i < nFakeGPGs; i++) for(i = 0; i < nFakeGPGs; i++)
{ {
RsIdGroup id; RsGxsIdGroup id;
RsPeerDetails details; RsPeerDetails details;
@ -359,13 +347,16 @@ void p3IdService::generateDummyData()
id.mGpgEmail = ""; id.mGpgEmail = "";
//mIds[id.mKeyId] = id; //mIds[id.mKeyId] = id;
mIdProxy->addGroup(id); //mIdProxy->addGroup(id);
// STORE
uint32_t dummyToken = 0;
createGroup(dummyToken, id);
} }
/* make lots of pseudo ids */ /* make lots of pseudo ids */
for(i = 0; i < nFakePseudoIds; i++) for(i = 0; i < nFakePseudoIds; i++)
{ {
RsIdGroup id; RsGxsIdGroup id;
RsPeerDetails details; RsPeerDetails details;
@ -382,10 +373,13 @@ void p3IdService::generateDummyData()
id.mGpgEmail = ""; id.mGpgEmail = "";
//mIds[id.mKeyId] = id; //mIds[id.mKeyId] = id;
mIdProxy->addGroup(id); //mIdProxy->addGroup(id);
// STORE
uint32_t dummyToken = 0;
createGroup(dummyToken, id);
} }
mUpdated = true; //mUpdated = true;
return; return;
} }
@ -566,9 +560,12 @@ bool p3IdService::background_checkTokenRequest()
uint32_t reqtype; uint32_t reqtype;
uint32_t anstype; uint32_t anstype;
time_t ts; time_t ts;
checkRequestStatus(token, status, reqtype, anstype, ts);
if (status == GXS_REQUEST_STATUS_COMPLETE)
status = RsGenExchange::getTokenService()->requestStatus(token);
//checkRequestStatus(token, status, reqtype, anstype, ts);
if (status == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE)
{ {
switch(phase) switch(phase)
{ {
@ -613,13 +610,16 @@ bool p3IdService::background_requestGroups()
} }
uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY; uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY;
RsTokReqOptions opts; RsTokReqOptionsV2 opts;
std::list<std::string> groupIds; std::list<std::string> groupIds;
/**
TODO
opts.mStatusFilter = RSGXS_GROUP_STATUS_NEWMSG; opts.mStatusFilter = RSGXS_GROUP_STATUS_NEWMSG;
opts.mStatusMask = RSGXS_GROUP_STATUS_NEWMSG; opts.mStatusMask = RSGXS_GROUP_STATUS_NEWMSG;
**/
requestGroupInfo(token, ansType, opts, groupIds); RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts, groupIds);
{ {
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
mBgToken = token; mBgToken = token;
@ -662,7 +662,10 @@ bool p3IdService::background_requestNewMessages()
/* now we process the modGroupList -> a map so we can use it easily later, and create id list too */ /* now we process the modGroupList -> a map so we can use it easily later, and create id list too */
for(it = modGroupList.begin(); it != modGroupList.end(); it++) for(it = modGroupList.begin(); it != modGroupList.end(); it++)
{ {
setGroupStatus(it->mGroupId, 0, RSGXS_GROUP_STATUS_NEWMSG); /*** TODO
uint32_t dummyToken = 0;
setGroupStatusFlags(dummyToken, it->mGroupId, 0, RSGXS_GROUP_STATUS_NEWMSG);
***/
mBgGroupMap[it->mGroupId] = *it; mBgGroupMap[it->mGroupId] = *it;
groupIds.push_back(it->mGroupId); groupIds.push_back(it->mGroupId);
@ -670,13 +673,15 @@ bool p3IdService::background_requestNewMessages()
} }
uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY; uint32_t ansType = RS_TOKREQ_ANSTYPE_SUMMARY;
RsTokReqOptions opts; RsTokReqOptionsV2 opts;
token = 0; token = 0;
/* TODO
opts.mStatusFilter = RSGXS_MSG_STATUS_UNPROCESSED; opts.mStatusFilter = RSGXS_MSG_STATUS_UNPROCESSED;
opts.mStatusMask = RSGXS_MSG_STATUS_UNPROCESSED; opts.mStatusMask = RSGXS_MSG_STATUS_UNPROCESSED;
*/
requestMsgInfo(token, ansType, opts, groupIds); RsGenExchange::getTokenService()->requestMsgInfo(token, ansType, opts, groupIds);
{ {
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
@ -691,8 +696,8 @@ bool p3IdService::background_processNewMessages()
std::cerr << "p3IdService::background_processNewMessages()"; std::cerr << "p3IdService::background_processNewMessages()";
std::cerr << std::endl; std::cerr << std::endl;
std::list<RsMsgMetaData> newMsgList; GxsMsgMetaMap newMsgMap;
std::list<RsMsgMetaData>::iterator it; GxsMsgMetaMap::iterator it;
uint32_t token = 0; uint32_t token = 0;
{ {
@ -700,7 +705,7 @@ bool p3IdService::background_processNewMessages()
token = mBgToken; token = mBgToken;
} }
if (!getMsgSummary(token, newMsgList)) if (!getMsgSummary(token, newMsgMap))
{ {
std::cerr << "p3IdService::background_processNewMessages() ERROR No New Msgs"; std::cerr << "p3IdService::background_processNewMessages() ERROR No New Msgs";
std::cerr << std::endl; std::cerr << std::endl;
@ -708,7 +713,6 @@ bool p3IdService::background_processNewMessages()
return false; return false;
} }
/* iterate through the msgs.. update the mBgGroupMap with new data, /* iterate through the msgs.. update the mBgGroupMap with new data,
* and flag these items as modified - so we rewrite them to the db later. * and flag these items as modified - so we rewrite them to the db later.
* *
@ -716,21 +720,29 @@ bool p3IdService::background_processNewMessages()
*/ */
std::map<std::string, RsGroupMetaData>::iterator mit; std::map<std::string, RsGroupMetaData>::iterator mit;
for(it = newMsgList.begin(); it != newMsgList.end(); it++)
for (it = newMsgMap.begin(); it != newMsgMap.end(); it++)
{ {
std::cerr << "p3IdService::background_processNewMessages() new MsgId: " << it->mMsgId; std::vector<RsMsgMetaData>::iterator vit;
for(vit = it->second.begin(); vit != it->second.end(); vit++)
{
std::cerr << "p3IdService::background_processNewMessages() new MsgId: " << vit->mMsgId;
std::cerr << std::endl; std::cerr << std::endl;
/* flag each new vote as processed */ /* flag each new vote as processed */
setMessageStatus(it->mMsgId, 0, RSGXS_MSG_STATUS_UNPROCESSED); /**
TODO
uint32_t dummyToken = 0;
setMsgStatusFlags(dummyToken, it->mMsgId, 0, RSGXS_MSG_STATUS_UNPROCESSED);
**/
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
mit = mBgGroupMap.find(it->mGroupId); mit = mBgGroupMap.find(it->first);
if (mit == mBgGroupMap.end()) if (mit == mBgGroupMap.end())
{ {
std::cerr << "p3IdService::background_processNewMessages() ERROR missing GroupId: "; std::cerr << "p3IdService::background_processNewMessages() ERROR missing GroupId: ";
std::cerr << it->mGroupId; std::cerr << vit->mGroupId;
std::cerr << std::endl; std::cerr << std::endl;
/* error */ /* error */
@ -746,7 +758,7 @@ bool p3IdService::background_processNewMessages()
continue; continue;
} }
if (it->mMsgId != it->mOrigMsgId) if (vit->mMsgId != vit->mOrigMsgId)
{ {
/* /*
* not original -> hard, redo calc (alt: could substract previous score) * not original -> hard, redo calc (alt: could substract previous score)
@ -797,6 +809,7 @@ bool p3IdService::background_processNewMessages()
} }
} }
} }
}
/* now iterate through groups again /* now iterate through groups again
@ -827,7 +840,8 @@ bool p3IdService::background_processNewMessages()
std::cerr << std::endl; std::cerr << std::endl;
/* set Cache */ /* set Cache */
setGroupServiceString(mit->second.mGroupId, mit->second.mServiceString); uint32_t dummyToken = 0;
setGroupServiceString(dummyToken, mit->second.mGroupId, mit->second.mServiceString);
} }
else else
{ {
@ -845,9 +859,9 @@ bool p3IdService::background_processNewMessages()
bool p3IdService::encodeIdGroupCache(std::string &str, const IdGroupServiceStrData &data) bool p3IdService::encodeIdGroupCache(std::string &str, const IdGroupServiceStrData &data)
{ {
char line[RSGXS_MAX_SERVICE_STRING]; char line[RSGXSID_MAX_SERVICE_STRING];
snprintf(line, RSGXS_MAX_SERVICE_STRING, "v1 {%s} {Y:%d O:%d %d %f %f R:%d %d %f %f}", snprintf(line, RSGXSID_MAX_SERVICE_STRING, "v1 {%s} {Y:%d O:%d %d %f %f R:%d %d %f %f}",
data.pgpId.c_str(), data.ownScore, data.pgpId.c_str(), data.ownScore,
data.opinion.count, data.opinion.nullcount, data.opinion.sum, data.opinion.sumsq, data.opinion.count, data.opinion.nullcount, data.opinion.sum, data.opinion.sumsq,
data.reputation.count, data.reputation.nullcount, data.reputation.sum, data.reputation.sumsq); data.reputation.count, data.reputation.nullcount, data.reputation.sum, data.reputation.sumsq);
@ -859,8 +873,8 @@ bool p3IdService::encodeIdGroupCache(std::string &str, const IdGroupServiceStrDa
bool p3IdService::extractIdGroupCache(std::string &str, IdGroupServiceStrData &data) bool p3IdService::extractIdGroupCache(std::string &str, IdGroupServiceStrData &data)
{ {
char pgpline[RSGXS_MAX_SERVICE_STRING]; char pgpline[RSGXSID_MAX_SERVICE_STRING];
char scoreline[RSGXS_MAX_SERVICE_STRING]; char scoreline[RSGXSID_MAX_SERVICE_STRING];
uint32_t iOwnScore; uint32_t iOwnScore;
IdRepCumulScore iOpin; IdRepCumulScore iOpin;
@ -944,10 +958,10 @@ bool p3IdService::background_FullCalcRequest()
/* request the summary info from the parents */ /* request the summary info from the parents */
uint32_t ansType = RS_TOKREQ_ANSTYPE_DATA; uint32_t ansType = RS_TOKREQ_ANSTYPE_DATA;
uint32_t token = 0; uint32_t token = 0;
RsTokReqOptions opts; RsTokReqOptionsV2 opts;
opts.mOptions = RS_TOKREQOPT_MSG_LATEST; opts.mOptions = RS_TOKREQOPT_MSG_LATEST;
requestMsgInfo(token, ansType, opts, groupIds); RsGenExchange::getTokenService()->requestMsgInfo(token, ansType, opts, groupIds);
{ {
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
@ -967,7 +981,6 @@ bool p3IdService::background_processFullCalc()
std::list<RsMsgMetaData> msgList; std::list<RsMsgMetaData> msgList;
std::list<RsMsgMetaData>::iterator it; std::list<RsMsgMetaData>::iterator it;
RsIdMsg msg;
bool validmsgs = false; bool validmsgs = false;
@ -982,20 +995,40 @@ bool p3IdService::background_processFullCalc()
double rep_sum = 0; double rep_sum = 0;
double rep_sumsq = 0; double rep_sumsq = 0;
while(getMsgData(mBgToken, msg)) std::vector<RsGxsIdOpinion> opinions;
std::vector<RsGxsIdOpinion>::iterator vit;
if (!getMsgData(mBgToken, opinions))
{ {
std::cerr << "p3IdService::background_processFullCalc() ERROR Failed to get Opinions";
std::cerr << std::endl;
return false;
}
std::string groupId;
for(vit = opinions.begin(); vit != opinions.end(); vit++)
{
RsGxsIdOpinion &opinion = *vit;
/* These should all be same group - should check for sanity! */
if (groupId == "")
{
groupId = opinion.mMeta.mGroupId;
}
std::cerr << "p3IdService::background_processFullCalc() Msg:"; std::cerr << "p3IdService::background_processFullCalc() Msg:";
std::cerr << msg; std::cerr << opinion;
std::cerr << std::endl; std::cerr << std::endl;
validmsgs = true; validmsgs = true;
/* for each msg ... extract score, and reputation */ /* for each opinion.... extract score, and reputation */
if (msg.mOpinion != 0) if (opinion.mOpinion != 0)
{ {
opinion_count++; opinion_count++;
opinion_sum += msg.mOpinion; opinion_sum += opinion.mOpinion;
opinion_sum += (msg.mOpinion * msg.mOpinion); opinion_sum += (opinion.mOpinion * opinion.mOpinion);
} }
else else
{ {
@ -1003,12 +1036,12 @@ bool p3IdService::background_processFullCalc()
} }
/* for each msg ... extract score, and reputation */ /* for each opinion.... extract score, and reputation */
if (msg.mReputation != 0) if (opinion.mReputation != 0)
{ {
rep_nullcount++; rep_nullcount++;
rep_sum += msg.mReputation; rep_sum += opinion.mReputation;
rep_sum += (msg.mReputation * msg.mReputation); rep_sum += (opinion.mReputation * opinion.mReputation);
} }
else else
{ {
@ -1042,8 +1075,6 @@ bool p3IdService::background_processFullCalc()
if (validmsgs) if (validmsgs)
{ {
std::string groupId = msg.mMeta.mGroupId;
std::string serviceString; std::string serviceString;
IdGroupServiceStrData ssData; IdGroupServiceStrData ssData;
@ -1058,7 +1089,8 @@ bool p3IdService::background_processFullCalc()
std::cerr << "p3IdService::background_updateVoteCounts() Encoded String: " << serviceString; std::cerr << "p3IdService::background_updateVoteCounts() Encoded String: " << serviceString;
std::cerr << std::endl; std::cerr << std::endl;
/* store new result */ /* store new result */
setGroupServiceString(it->mMsgId, serviceString); uint32_t dummyToken = 0;
setGroupServiceString(dummyToken, groupId, serviceString);
} }
} }
@ -1090,9 +1122,9 @@ bool p3IdService::background_cleanup()
} }
std::ostream &operator<<(std::ostream &out, const RsIdGroup &grp) std::ostream &operator<<(std::ostream &out, const RsGxsIdGroup &grp)
{ {
out << "RsIdGroup: Meta: " << grp.mMeta; out << "RsGxsIdGroup: Meta: " << grp.mMeta;
out << " IdType: " << grp.mIdType << " GpgIdHash: " << grp.mGpgIdHash; out << " IdType: " << grp.mIdType << " GpgIdHash: " << grp.mGpgIdHash;
out << "(((Unusable: ( GpgIdKnown: " << grp.mGpgIdKnown << " GpgId: " << grp.mGpgId; out << "(((Unusable: ( GpgIdKnown: " << grp.mGpgIdKnown << " GpgId: " << grp.mGpgId;
out << " GpgName: " << grp.mGpgName << " GpgEmail: " << grp.mGpgEmail << ") )))"; out << " GpgName: " << grp.mGpgName << " GpgEmail: " << grp.mGpgEmail << ") )))";
@ -1101,10 +1133,9 @@ std::ostream &operator<<(std::ostream &out, const RsIdGroup &grp)
return out; return out;
} }
std::ostream &operator<<(std::ostream &out, const RsIdMsg &msg) std::ostream &operator<<(std::ostream &out, const RsGxsIdOpinion &opinion)
{ {
out << "RsIdMsg: Meta: " << msg.mMeta; out << "RsGxsIdOpinion: Meta: " << opinion.mMeta;
//out << " IdType: " << grp.mIdType << " GpgIdHash: " << grp.mGpgIdHash;
out << std::endl; out << std::endl;
return out; return out;

View file

@ -26,10 +26,10 @@
#ifndef P3_IDENTITY_SERVICE_HEADER #ifndef P3_IDENTITY_SERVICE_HEADER
#define P3_IDENTITY_SERVICE_HEADER #define P3_IDENTITY_SERVICE_HEADER
#include "services/p3service.h"
#include "services/p3gxsservice.h"
#include "retroshare/rsidentity.h" #include "retroshare/rsidentity.h" // External Interfaces.
#include "gxs/rsgenexchange.h" // GXS service.
#include "gxs/rsgixs.h" // Internal Interfaces.
#include <map> #include <map>
#include <string> #include <string>
@ -74,7 +74,7 @@ public:
// Not sure exactly what should be inherited here? // Not sure exactly what should be inherited here?
// Chris - please correct as necessary. // Chris - please correct as necessary.
class p3IdService: public RsIdentity, public RsGxsIdExchange class p3IdService: public RsGxsIdExchange, public RsIdentity
{ {
public: public:
p3IdService(RsGeneralDataService* gds, RsNetworkExchangeService* nes); p3IdService(RsGeneralDataService* gds, RsNetworkExchangeService* nes);
@ -86,17 +86,21 @@ class p3IdService: public RsIdentity, public RsGxsIdExchange
/* Data Specific Interface */ /* Data Specific Interface */
/* TODO */ // These are exposed via RsIdentity.
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup> &groups);
// These are local - and not exposed via RsIdentity.
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsIdOpinion> &opinions);
virtual bool createGroup(uint32_t& token, RsGxsIdGroup &group);
virtual bool createMsg(uint32_t& token, RsGxsIdOpinion &opinion);
/**************** RsIdentity External Interface. /**************** RsIdentity External Interface.
* Notes: * Notes:
*/ */
virtual bool getNickname(const RsGxsId &id, std::string &nickname);
virtual bool getNickname(const RsId &id, std::string &nickname); virtual bool getIdDetails(const RsGxsId &id, RsIdentityDetails &details);
virtual bool getIdDetails(const RsId &id, RsIdentityDetails &details); virtual bool getOwnIds(std::list<RsGxsId> &ownIds);
virtual bool getOwnIds(std::list<RsId> &ownIds);
// //
virtual bool submitOpinion(uint32_t& token, RsIdOpinion &opinion); virtual bool submitOpinion(uint32_t& token, RsIdOpinion &opinion);
@ -109,11 +113,11 @@ virtual bool createIdentity(uint32_t& token, RsIdentityParameters &params);
* Results should be cached / preloaded for maximum speed. * Results should be cached / preloaded for maximum speed.
* *
*/ */
virtual bool haveKey(const GxsId &id); virtual bool haveKey(const RsGxsId &id);
virtual bool havePrivateKey(const GxsId &id); virtual bool havePrivateKey(const RsGxsId &id);
virtual bool requestKey(const GxsId &id, const std::list<PeerId> &peers); virtual bool requestKey(const RsGxsId &id, const std::list<PeerId> &peers);
virtual int getKey(const GxsId &id, TlvSecurityKey &key); virtual int getKey(const RsGxsId &id, RsTlvSecurityKey &key);
virtual int getPrivateKey(const GxsId &id, TlvSecurityKey &key); virtual int getPrivateKey(const RsGxsId &id, RsTlvSecurityKey &key);
/**************** RsGixsReputation Implementation /**************** RsGixsReputation Implementation
* Notes: * Notes:
@ -121,7 +125,7 @@ virtual int getPrivateKey(const GxsId &id, TlvSecurityKey &key);
*/ */
// get Reputation. // get Reputation.
virtual bool getReputation(const GxsId &id, const GixsReputation &rep); virtual bool getReputation(const RsGxsId &id, const GixsReputation &rep);
private: private:

View file

@ -354,9 +354,9 @@ bool p3PhotoServiceV2::acknowledgeGrp(const uint32_t& token,
bool p3PhotoServiceV2::subscribeToAlbum(uint32_t &token, const RsGxsGroupId &grpId, bool subscribe) bool p3PhotoServiceV2::subscribeToAlbum(uint32_t &token, const RsGxsGroupId &grpId, bool subscribe)
{ {
if(subscribe) if(subscribe)
RsGenExchange::setGroupSubscribeFlag(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED); RsGenExchange::setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED, GXS_SERV::GROUP_SUBSCRIBE_MASK);
else else
RsGenExchange::setGroupSubscribeFlag(token, grpId, ~GXS_SERV::GROUP_SUBSCRIBE_MASK); RsGenExchange::setGroupSubscribeFlags(token, grpId, 0, GXS_SERV::GROUP_SUBSCRIBE_MASK);
return true; return true;
} }