Refactored GXS interface to remove exposure to RS internals (i.e. only reference types, declaration in retroshare folder)

To achieve this I created second interface RsGxsIface which RsGxsGenExchange derives from, and RsGxsIfaceImpl (renamed RsGxsIfaceHelper) now takes an instance of this instead so these interfaces don't exposed the RsGenExchange and its underlying types. 

The other stuff is simply definitions and type aliases required for the front-ends to work (RsGroupMeta, RsGroupId, etc) and I've moved gxs flags also. 

This is a good idea as it seem much more clear what's available to a GXS service (apart from RsGenExchange public methods).  


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6166 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2013-02-28 21:58:38 +00:00
parent 5ccfed1cf4
commit 50c75de73c
46 changed files with 573 additions and 536 deletions

View file

@ -25,7 +25,7 @@
#include "services/p3gxscircles.h"
#include "serialiser/rsgxscircleitems.h"
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
#include "util/rsrandom.h"
#include "util/rsstring.h"
@ -173,7 +173,7 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
std::cerr << "p3GxsCircles::notifyChanges()";
std::cerr << std::endl;
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
// for new circles we need to add them to the list.
// TODO.

View file

@ -29,7 +29,7 @@
#include <retroshare/rsidentity.h>
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
#include <stdio.h>
// For Dummy Msgs.
@ -82,7 +82,7 @@ uint32_t p3GxsForums::forumsAuthenPolicy()
}
void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
{
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
}
void p3GxsForums::service_tick()

View file

@ -25,7 +25,7 @@
#include "services/p3idservice.h"
#include "serialiser/rsgxsiditems.h"
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
#include "util/rsrandom.h"
#include "util/rsstring.h"
@ -158,7 +158,7 @@ void p3IdService::notifyChanges(std::vector<RsGxsNotify *> &changes)
std::cerr << "p3IdService::notifyChanges()";
std::cerr << std::endl;
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
}
/********************************************************************************/

View file

@ -1,6 +1,6 @@
#include "p3photoservice.h"
#include "serialiser/rsphotoitems.h"
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
RsPhoto *rsPhoto = NULL;
@ -136,7 +136,7 @@ void p3PhotoService::groupsChanged(std::list<RsGxsGroupId>& grpIds)
while(!mGroupChange.empty())
{
RsGxsGroupChange* gc = mGroupChange.back();
std::list<RsGxsGroupId>& gList = gc->grpIdList;
std::list<RsGxsGroupId>& gList = gc->mGrpIdList;
std::list<RsGxsGroupId>::iterator lit = gList.begin();
for(; lit != gList.end(); lit++)
grpIds.push_back(*lit);

View file

@ -5,7 +5,7 @@
#include <stdio.h>
#include "p3posted.h"
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
#include "serialiser/rsposteditems.h"
#define UPDATE_PHASE_GRP_REQUEST 1
@ -58,7 +58,7 @@ p3Posted::p3Posted(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
void p3Posted::notifyChanges(std::vector<RsGxsNotify *> &changes)
{
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
}
void p3Posted::service_tick()

View file

@ -24,7 +24,7 @@
*/
#include "services/p3wiki.h"
#include "gxs/rsgxsflags.h"
#include "retroshare/rsgxsflags.h"
#include "serialiser/rswikiitems.h"
#include "util/rsrandom.h"
@ -110,7 +110,7 @@ void p3Wiki::notifyChanges(std::vector<RsGxsNotify*>& changes)
std::cerr << "p3Wiki::notifyChanges() New stuff";
std::cerr << std::endl;
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
}
/* Specific Service Data */

View file

@ -52,7 +52,7 @@ void p3Wire::notifyChanges(std::vector<RsGxsNotify*>& changes)
std::cerr << "p3Wire::notifyChanges() New stuff";
std::cerr << std::endl;
receiveChanges(changes);
RsGxsIfaceHelper::receiveChanges(changes);
}
/* Specific Service Data */