diff --git a/libretroshare/src/gxstrans/p3gxstrans.h b/libretroshare/src/gxstrans/p3gxstrans.h index af79679d9..ff617e264 100644 --- a/libretroshare/src/gxstrans/p3gxstrans.h +++ b/libretroshare/src/gxstrans/p3gxstrans.h @@ -85,7 +85,7 @@ struct MsgSizeCount * @see GxsTransClient::receiveGxsTransMail(...), * @see GxsTransClient::notifyGxsTransSendStatus(...). */ -class p3GxsTrans : public RsGenExchange, public GxsTokenQueue, public p3Config, public RsGxsTrans +struct p3GxsTrans : RsGenExchange, GxsTokenQueue, p3Config, RsGxsTrans { public: p3GxsTrans( RsGeneralDataService* gds, RsNetworkExchangeService* nes, @@ -94,17 +94,16 @@ public: RS_SERVICE_TYPE_GXS_TRANS, &identities, AuthenPolicy()), GxsTokenQueue(this), - RsGxsTrans(this), - mIdService(identities), + RsGxsTrans(static_cast(*this)), + // always check 30 secs after start) + mLastMsgCleanup(time(NULL) - MAX_DELAY_BETWEEN_CLEANUPS + 30), + mIdService(identities), mServClientsMutex("p3GxsTrans client services map mutex"), mOutgoingMutex("p3GxsTrans outgoing queue map mutex"), mIngoingMutex("p3GxsTrans ingoing queue map mutex"), + mCleanupThread(nullptr), mPerUserStatsMutex("p3GxsTrans user stats mutex"), - mDataMutex("p3GxsTrans data mutex") - { - mLastMsgCleanup = time(NULL) - MAX_DELAY_BETWEEN_CLEANUPS + 30; // always check 30 secs after start - mCleanupThread = NULL ; - } + mDataMutex("p3GxsTrans data mutex") {} virtual ~p3GxsTrans(); diff --git a/libretroshare/src/retroshare/rsgxschannels.h b/libretroshare/src/retroshare/rsgxschannels.h index ce394778d..fb8ce8f06 100644 --- a/libretroshare/src/retroshare/rsgxschannels.h +++ b/libretroshare/src/retroshare/rsgxschannels.h @@ -105,8 +105,7 @@ class RsGxsChannels: public RsGxsIfaceHelper, public RsGxsCommentService { public: - explicit RsGxsChannels(RsGxsIface *gxs) - :RsGxsIfaceHelper(gxs) {} + explicit RsGxsChannels(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} virtual ~RsGxsChannels() {} /* Specific Service Data */ diff --git a/libretroshare/src/retroshare/rsgxscircles.h b/libretroshare/src/retroshare/rsgxscircles.h index 8ce446200..4147f8637 100644 --- a/libretroshare/src/retroshare/rsgxscircles.h +++ b/libretroshare/src/retroshare/rsgxscircles.h @@ -127,8 +127,8 @@ class RsGxsCircles: public RsGxsIfaceHelper { public: - RsGxsCircles(RsGxsIface *gxs) :RsGxsIfaceHelper(gxs) { return; } - virtual ~RsGxsCircles() { return; } + RsGxsCircles(RsGxsIface& gxs) :RsGxsIfaceHelper(gxs) {} + virtual ~RsGxsCircles() {} /* External Interface (Cached stuff) */ virtual bool getCircleDetails(const RsGxsCircleId &id, RsGxsCircleDetails &details) = 0; diff --git a/libretroshare/src/retroshare/rsgxsforums.h b/libretroshare/src/retroshare/rsgxsforums.h index 28558d4ce..1fd2feee2 100644 --- a/libretroshare/src/retroshare/rsgxsforums.h +++ b/libretroshare/src/retroshare/rsgxsforums.h @@ -63,8 +63,7 @@ class RsGxsForums: public RsGxsIfaceHelper { public: - explicit RsGxsForums(RsGxsIface *gxs) - :RsGxsIfaceHelper(gxs) {} + explicit RsGxsForums(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} virtual ~RsGxsForums() {} /* Specific Service Data */ diff --git a/libretroshare/src/retroshare/rsgxsiface.h b/libretroshare/src/retroshare/rsgxsiface.h index 36c660ef8..79474c189 100644 --- a/libretroshare/src/retroshare/rsgxsiface.h +++ b/libretroshare/src/retroshare/rsgxsiface.h @@ -35,9 +35,8 @@ /*! * Stores ids of changed gxs groups and messages. It is used to notify the GUI about changes. */ -class RsGxsChanges +struct RsGxsChanges { -public: RsGxsChanges(): mService(0){} RsTokenService *mService; std::map > mMsgs; @@ -49,13 +48,9 @@ public: /*! * All implementations must offer thread safety */ -class RsGxsIface +struct RsGxsIface { -public: - - virtual ~RsGxsIface(){}; - -public: + virtual ~RsGxsIface() {} /*! * Gxs services should call this for automatic handling of diff --git a/libretroshare/src/retroshare/rsgxsifacehelper.h b/libretroshare/src/retroshare/rsgxsifacehelper.h index fbe12570e..0899c5205 100644 --- a/libretroshare/src/retroshare/rsgxsifacehelper.h +++ b/libretroshare/src/retroshare/rsgxsifacehelper.h @@ -7,6 +7,7 @@ * RetroShare GXS. Convenience interface implementation * * Copyright 2012 by Christopher Evi-Parker + * Copyright (C) 2018 Gioacchino Mazzurco * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -29,26 +30,24 @@ #include "retroshare/rsgxsiface.h" #include "retroshare/rsreputations.h" #include "rsgxsflags.h" +#include "util/rsdeprecate.h" /*! - * The simple idea of this class is to implement the simple interface functions - * of gen exchange. - * This class provides convenience implementations of: - * - Handle msg and group changes (client class must pass changes sent by RsGenExchange to it) - * - subscription to groups - * - retrieval of msgs and group ids and meta info + * This class only make method of internal members visible tu upper level to + * offer a more friendly API. + * This is just a workaround to awkward GXS API design, do not take it as an + * example for your coding. + * To properly fix the API design many changes with the implied chain reactions + * are necessary, so at this point this workaround seems acceptable. */ -class RsGxsIfaceHelper +struct RsGxsIfaceHelper { -public: - - /*! - * - * @param gxs handle to RsGenExchange instance of service (Usually the service class itself) - */ - RsGxsIfaceHelper(RsGxsIface* gxs) - : mGxs(gxs) - {} + /*! + * @param gxs handle to RsGenExchange instance of service (Usually the + * service class itself) + */ + RsGxsIfaceHelper(RsGxsIface& gxs) : + mGxs(gxs), mTokenService(*gxs.getTokenService()) {} ~RsGxsIfaceHelper(){} @@ -59,15 +58,7 @@ public: */ void receiveChanges(std::vector &changes) { - mGxs->receiveChanges(changes); - } - - /*! - * @return handle to token service for this GXS service - */ - RsTokenService* getTokenService() - { - return mGxs->getTokenService(); + mGxs.receiveChanges(changes); } /* Generic Lists */ @@ -81,7 +72,7 @@ public: bool getGroupList(const uint32_t &token, std::list &groupIds) { - return mGxs->getGroupList(token, groupIds); + return mGxs.getGroupList(token, groupIds); } /*! @@ -93,7 +84,7 @@ public: bool getMsgList(const uint32_t &token, GxsMsgIdResult& msgIds) { - return mGxs->getMsgList(token, msgIds); + return mGxs.getMsgList(token, msgIds); } /*! @@ -104,7 +95,7 @@ public: */ bool getMsgRelatedList(const uint32_t &token, MsgRelatedIdResult &msgIds) { - return mGxs->getMsgRelatedList(token, msgIds); + return mGxs.getMsgRelatedList(token, msgIds); } /*! @@ -115,7 +106,7 @@ public: bool getGroupSummary(const uint32_t &token, std::list &groupInfo) { - return mGxs->getGroupMeta(token, groupInfo); + return mGxs.getGroupMeta(token, groupInfo); } /*! @@ -126,7 +117,7 @@ public: bool getMsgSummary(const uint32_t &token, GxsMsgMetaMap &msgInfo) { - return mGxs->getMsgMeta(token, msgInfo); + return mGxs.getMsgMeta(token, msgInfo); } /*! @@ -136,7 +127,7 @@ public: */ bool getMsgRelatedSummary(const uint32_t &token, GxsMsgRelatedMetaMap &msgInfo) { - return mGxs->getMsgRelatedMeta(token, msgInfo); + return mGxs.getMsgRelatedMeta(token, msgInfo); } /*! @@ -147,7 +138,7 @@ public: */ bool subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe) { - return mGxs->subscribeToGroup(token, grpId, subscribe); + return mGxs.subscribeToGroup(token, grpId, subscribe); } /*! @@ -159,7 +150,7 @@ public: */ bool acknowledgeMsg(const uint32_t& token, std::pair& msgId) { - return mGxs->acknowledgeTokenMsg(token, msgId); + return mGxs.acknowledgeTokenMsg(token, msgId); } /*! @@ -171,7 +162,7 @@ public: */ bool acknowledgeGrp(const uint32_t& token, RsGxsGroupId& grpId) { - return mGxs->acknowledgeTokenGrp(token, grpId); + return mGxs.acknowledgeTokenGrp(token, grpId); } /*! @@ -182,7 +173,7 @@ public: */ bool getServiceStatistic(const uint32_t& token, GxsServiceStatistic& stats) { - return mGxs->getServiceStatistic(token, stats); + return mGxs.getServiceStatistic(token, stats); } /*! @@ -193,7 +184,7 @@ public: */ bool getGroupStatistic(const uint32_t& token, GxsGroupStatistic& stats) { - return mGxs->getGroupStatistic(token, stats); + return mGxs.getGroupStatistic(token, stats); } /*! @@ -206,7 +197,7 @@ public: */ void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff) { - return mGxs->setGroupReputationCutOff(token, grpId, CutOff); + return mGxs.setGroupReputationCutOff(token, grpId, CutOff); } /*! @@ -214,36 +205,86 @@ public: */ uint32_t getDefaultStoragePeriod() { - return mGxs->getDefaultStoragePeriod(); + return mGxs.getDefaultStoragePeriod(); } uint32_t getStoragePeriod(const RsGxsGroupId& grpId) { - return mGxs->getStoragePeriod(grpId); + return mGxs.getStoragePeriod(grpId); } void setStoragePeriod(const RsGxsGroupId& grpId,uint32_t age_in_secs) { - mGxs->setStoragePeriod(grpId,age_in_secs); + mGxs.setStoragePeriod(grpId,age_in_secs); } uint32_t getDefaultSyncPeriod() { - return mGxs->getDefaultSyncPeriod(); + return mGxs.getDefaultSyncPeriod(); } uint32_t getSyncPeriod(const RsGxsGroupId& grpId) { - return mGxs->getSyncPeriod(grpId); + return mGxs.getSyncPeriod(grpId); } void setSyncPeriod(const RsGxsGroupId& grpId,uint32_t age_in_secs) { - mGxs->setSyncPeriod(grpId,age_in_secs); + mGxs.setSyncPeriod(grpId,age_in_secs); } RsReputations::ReputationLevel minReputationForForwardingMessages(uint32_t group_sign_flags,uint32_t identity_flags) { - return mGxs->minReputationForForwardingMessages(group_sign_flags,identity_flags); + return mGxs.minReputationForForwardingMessages(group_sign_flags,identity_flags); } -private: - RsGxsIface* mGxs; + /// @see RsTokenService::requestGroupInfo + bool requestGroupInfo( uint32_t& token, const RsTokReqOptions& opts, + const std::list &groupIds ) + { return mTokenService.requestGroupInfo(token, 0, opts, groupIds); } + + /// @see RsTokenService::requestGroupInfo + bool requestGroupInfo(uint32_t& token, const RsTokReqOptions& opts) + { return mTokenService.requestGroupInfo(token, 0, opts); } + + /// @see RsTokenService::requestMsgInfo + bool requestMsgInfo( uint32_t& token, + const RsTokReqOptions& opts, const GxsMsgReq& msgIds ) + { return mTokenService.requestMsgInfo(token, 0, opts, msgIds); } + + /// @see RsTokenService::requestMsgInfo + bool requestMsgInfo( + uint32_t& token, const RsTokReqOptions& opts, + const std::list& grpIds ) + { return mTokenService.requestMsgInfo(token, 0, opts, grpIds); } + + /// @see RsTokenService::requestMsgRelatedInfo + bool requestMsgRelatedInfo( + uint32_t& token, const RsTokReqOptions& opts, + const std::vector& msgIds ) + { return mTokenService.requestMsgRelatedInfo(token, 0, opts, msgIds); } + + /// @see RsTokenService::requestStatus + RsTokenService::GxsRequestStatus requestStatus(uint32_t token) + { return mTokenService.requestStatus(token); } + + /// @see RsTokenService::requestServiceStatistic + void requestServiceStatistic(uint32_t& token) + { mTokenService.requestServiceStatistic(token); } + + /// @see RsTokenService::requestGroupStatistic + void requestGroupStatistic(uint32_t& token, const RsGxsGroupId& grpId) + { mTokenService.requestGroupStatistic(token, grpId); } + + /// @see RsTokenService::cancelRequest + bool cancelRequest(uint32_t token) + { return mTokenService.cancelRequest(token); } + + /** + * @deprecated + * Token service methods are already exposed by this helper, so you should + * not need to get token service pointer directly anymore. + */ + RS_DEPRECATED RsTokenService* getTokenService() { return &mTokenService; } + +private: + RsGxsIface& mGxs; + RsTokenService& mTokenService; }; #endif // RSGXSIFACEIMPL_H diff --git a/libretroshare/src/retroshare/rsgxstrans.h b/libretroshare/src/retroshare/rsgxstrans.h index b78191d97..bee1e11ec 100644 --- a/libretroshare/src/retroshare/rsgxstrans.h +++ b/libretroshare/src/retroshare/rsgxstrans.h @@ -91,7 +91,7 @@ public: std::vector outgoing_records; }; - RsGxsTrans(RsGxsIface *gxs) : RsGxsIfaceHelper(gxs) {} + RsGxsTrans(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} virtual ~RsGxsTrans() {} diff --git a/libretroshare/src/retroshare/rsidentity.h b/libretroshare/src/retroshare/rsidentity.h index 47da42de4..aa4734fc0 100644 --- a/libretroshare/src/retroshare/rsidentity.h +++ b/libretroshare/src/retroshare/rsidentity.h @@ -343,7 +343,7 @@ struct RsIdentityDetails : RsSerializable struct RsIdentity : RsGxsIfaceHelper { - explicit RsIdentity(RsGxsIface *gxs): RsGxsIfaceHelper(gxs) {} + explicit RsIdentity(RsGxsIface& gxs): RsGxsIfaceHelper(gxs) {} virtual ~RsIdentity() {} /********************************************************************************************/ diff --git a/libretroshare/src/retroshare/rsposted.h b/libretroshare/src/retroshare/rsposted.h index 586449a47..801ef37fa 100644 --- a/libretroshare/src/retroshare/rsposted.h +++ b/libretroshare/src/retroshare/rsposted.h @@ -78,7 +78,7 @@ class RsPosted : public RsGxsIfaceHelper, public RsGxsCommentService //static const uint32_t FLAG_MSGTYPE_POST; //static const uint32_t FLAG_MSGTYPE_MASK; - explicit RsPosted(RsGxsIface* gxs) : RsGxsIfaceHelper(gxs) {} + explicit RsPosted(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} virtual ~RsPosted() {} /* Specific Service Data */ diff --git a/libretroshare/src/retroshare/rstokenservice.h b/libretroshare/src/retroshare/rstokenservice.h index ceefe28ad..604bd87d2 100644 --- a/libretroshare/src/retroshare/rstokenservice.h +++ b/libretroshare/src/retroshare/rstokenservice.h @@ -220,19 +220,14 @@ public: */ virtual void requestGroupStatistic(uint32_t& token, const RsGxsGroupId& grpId) = 0; - - /* Cancel Request */ - - /*! - * If this function returns false, it may be that the request has completed - * already. Useful for very expensive request. This is a blocking operation - * @param token the token of the request to cancel - * @return false if unusuccessful in cancelling request, true if successful - */ - virtual bool cancelRequest(const uint32_t &token) = 0; - - - + /*! + * @brief Cancel Request + * If this function returns false, it may be that the request has completed + * already. Useful for very expensive request. + * @param token the token of the request to cancel + * @return false if unusuccessful in cancelling request, true if successful + */ + virtual bool cancelRequest(const uint32_t &token) = 0; }; #endif // RSTOKENSERVICE_H diff --git a/libretroshare/src/retroshare/rswiki.h b/libretroshare/src/retroshare/rswiki.h index 9db3ff7e6..3baeeb5cb 100644 --- a/libretroshare/src/retroshare/rswiki.h +++ b/libretroshare/src/retroshare/rswiki.h @@ -115,10 +115,10 @@ std::ostream &operator<<(std::ostream &out, const RsWikiComment &comment); class RsWiki: public RsGxsIfaceHelper { - public: +public: - RsWiki(RsGxsIface *gxs): RsGxsIfaceHelper(gxs) { return; } -virtual ~RsWiki() { return; } + RsWiki(RsGxsIface& gxs): RsGxsIfaceHelper(gxs) {} + virtual ~RsWiki() {} /* Specific Service Data */ virtual bool getCollections(const uint32_t &token, std::vector &collections) = 0; diff --git a/libretroshare/src/retroshare/rswire.h b/libretroshare/src/retroshare/rswire.h index d9cdb7832..b01da9919 100644 --- a/libretroshare/src/retroshare/rswire.h +++ b/libretroshare/src/retroshare/rswire.h @@ -108,7 +108,7 @@ class RsWire: public RsGxsIfaceHelper { public: - explicit RsWire(RsGxsIface *gxs): RsGxsIfaceHelper(gxs) {} + explicit RsWire(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} virtual ~RsWire() {} /* Specific Service Data */ diff --git a/libretroshare/src/services/p3gxschannels.cc b/libretroshare/src/services/p3gxschannels.cc index 74fc9d080..ee6c4d2eb 100644 --- a/libretroshare/src/services/p3gxschannels.cc +++ b/libretroshare/src/services/p3gxschannels.cc @@ -68,8 +68,12 @@ RsGxsChannels *rsGxsChannels = NULL; /******************* Startup / Tick ******************************************/ /********************************************************************************/ -p3GxsChannels::p3GxsChannels(RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs) - : RsGenExchange(gds, nes, new RsGxsChannelSerialiser(), RS_SERVICE_GXS_TYPE_CHANNELS, gixs, channelsAuthenPolicy()), RsGxsChannels(this), GxsTokenQueue(this) +p3GxsChannels::p3GxsChannels( + RsGeneralDataService *gds, RsNetworkExchangeService *nes, + RsGixs* gixs ) : + RsGenExchange( gds, nes, new RsGxsChannelSerialiser(), + RS_SERVICE_GXS_TYPE_CHANNELS, gixs, channelsAuthenPolicy() ), + RsGxsChannels(static_cast(*this)), GxsTokenQueue(this) { // For Dummy Msgs. mGenActive = false; diff --git a/libretroshare/src/services/p3gxscircles.cc b/libretroshare/src/services/p3gxscircles.cc index 5593250f7..54959ddb6 100644 --- a/libretroshare/src/services/p3gxscircles.cc +++ b/libretroshare/src/services/p3gxscircles.cc @@ -111,16 +111,16 @@ RsGxsCircles *rsGxsCircles = NULL; /******************* Startup / Tick ******************************************/ /********************************************************************************/ -p3GxsCircles::p3GxsCircles(RsGeneralDataService *gds, RsNetworkExchangeService *nes, - p3IdService *identities, PgpAuxUtils *pgpUtils) - : RsGxsCircleExchange(gds, nes, new RsGxsCircleSerialiser(), - RS_SERVICE_GXS_TYPE_GXSCIRCLE, identities, circleAuthenPolicy()), - RsGxsCircles(this), GxsTokenQueue(this), RsTickEvent(), - mIdentities(identities), - mPgpUtils(pgpUtils), - mCircleMtx("p3GxsCircles"), - mCircleCache(DEFAULT_MEM_CACHE_SIZE, "GxsCircleCache") - +p3GxsCircles::p3GxsCircles( + RsGeneralDataService *gds, RsNetworkExchangeService *nes, + p3IdService *identities, PgpAuxUtils *pgpUtils) : + RsGxsCircleExchange( + gds, nes, new RsGxsCircleSerialiser(), RS_SERVICE_GXS_TYPE_GXSCIRCLE, + identities, circleAuthenPolicy() ), + RsGxsCircles(static_cast(*this)), GxsTokenQueue(this), + RsTickEvent(), mIdentities(identities), mPgpUtils(pgpUtils), + mCircleMtx("p3GxsCircles"), + mCircleCache(DEFAULT_MEM_CACHE_SIZE, "GxsCircleCache" ) { // Kick off Cache Testing, + Others. //RsTickEvent::schedule_in(CIRCLE_EVENT_CACHETEST, CACHETEST_PERIOD); diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index 57f129449..e7f41b950 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -55,7 +55,8 @@ p3GxsForums::p3GxsForums( RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs ) : RsGenExchange( gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXS_TYPE_FORUMS, gixs, forumsAuthenPolicy()), - RsGxsForums(this), mGenToken(0), mGenActive(false), mGenCount(0) + RsGxsForums(static_cast(*this)), mGenToken(0), + mGenActive(false), mGenCount(0) { // Test Data disabled in Repo. //RsTickEvent::schedule_in(FORUM_TESTEVENT_DUMMYDATA, DUMMYDATA_PERIOD); diff --git a/libretroshare/src/services/p3idservice.cc b/libretroshare/src/services/p3idservice.cc index 76c43e5bd..9f4f438b6 100644 --- a/libretroshare/src/services/p3idservice.cc +++ b/libretroshare/src/services/p3idservice.cc @@ -156,12 +156,14 @@ RsIdentity *rsIdentity = NULL; /******************* Startup / Tick ******************************************/ /********************************************************************************/ -p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes, PgpAuxUtils *pgpUtils) - : RsGxsIdExchange(gds, nes, new RsGxsIdSerialiser(), RS_SERVICE_GXS_TYPE_GXSID, idAuthenPolicy()), - RsIdentity(this), GxsTokenQueue(this), RsTickEvent(), - mKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdKeyCache"), - mIdMtx("p3IdService"), mNes(nes), - mPgpUtils(pgpUtils) +p3IdService::p3IdService( + RsGeneralDataService *gds, RsNetworkExchangeService *nes, + PgpAuxUtils *pgpUtils ) : + RsGxsIdExchange( gds, nes, new RsGxsIdSerialiser(), + RS_SERVICE_GXS_TYPE_GXSID, idAuthenPolicy() ), + RsIdentity(static_cast(*this)), GxsTokenQueue(this), + RsTickEvent(), mKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdKeyCache"), + mIdMtx("p3IdService"), mNes(nes), mPgpUtils(pgpUtils) { mBgSchedule_Mode = 0; mBgSchedule_Active = false; diff --git a/libretroshare/src/services/p3posted.cc b/libretroshare/src/services/p3posted.cc index 555f2147f..c8fe5a5f9 100644 --- a/libretroshare/src/services/p3posted.cc +++ b/libretroshare/src/services/p3posted.cc @@ -40,13 +40,12 @@ RsPosted *rsPosted = NULL; /******************* Startup / Tick ******************************************/ /********************************************************************************/ -p3Posted::p3Posted(RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs) - :p3PostBase(gds, nes, gixs, new RsGxsPostedSerialiser(), RS_SERVICE_GXS_TYPE_POSTED), - RsPosted(this) -{ - return; -} - +p3Posted::p3Posted( + RsGeneralDataService *gds, RsNetworkExchangeService *nes, + RsGixs* gixs ) : + p3PostBase( gds, nes, gixs, new RsGxsPostedSerialiser(), + RS_SERVICE_GXS_TYPE_POSTED ), + RsPosted(static_cast(*this)) {} const std::string GXS_POSTED_APP_NAME = "gxsposted"; const uint16_t GXS_POSTED_APP_MAJOR_VERSION = 1;