2012-01-11 18:01:29 -05:00
|
|
|
#ifndef RSGXS_H
|
|
|
|
#define RSGXS_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* libretroshare/src/gxs : rsgxs.h
|
|
|
|
*
|
|
|
|
* GXS interface for RetroShare.
|
2012-01-18 18:20:53 -05:00
|
|
|
* Convenience header
|
2012-01-11 18:01:29 -05:00
|
|
|
*
|
|
|
|
* Copyright 2011 Christopher Evi-Parker
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
* This is *THE* auth manager. It provides the web-of-trust via
|
|
|
|
* gpgme, and authenticates the certificates that are managed
|
|
|
|
* by the sublayer AuthSSL.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-01-18 18:20:53 -05:00
|
|
|
#include <inttypes.h>
|
2012-02-24 16:15:08 -05:00
|
|
|
#include <string>
|
|
|
|
#include <list>
|
|
|
|
#include <set>
|
2012-02-12 10:18:05 -05:00
|
|
|
#include <map>
|
2012-01-11 18:01:29 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
#include "rsgixs.h"
|
|
|
|
#include "rsgdp.h"
|
|
|
|
|
|
|
|
#define GXS_STATUS_GRP_NOT_FOUND 1 /* request resulted in grp not found error */
|
|
|
|
#define GXS_STATUS_MSG_NOT_FOUND 2 /* request resulted in msg not found */
|
|
|
|
#define GXS_STATUS_ERROR 3 /* request is in error */
|
|
|
|
#define GXS_STATUS_OK 4 /* request was successful */
|
|
|
|
|
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
typedef time_t RsGxsTime;
|
2012-03-10 19:05:43 -05:00
|
|
|
typedef std::map<std::string, uint32_t> IdVersionM;
|
|
|
|
typedef std::multimap<std::string, std::pair<std::string, uint32_t> > GrpMsgMap;
|
|
|
|
typedef uint64_t RsGroupId ;
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
class RsGxsLink
|
|
|
|
{
|
|
|
|
uint32_t type;
|
|
|
|
std::string msgId;
|
|
|
|
};
|
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
class RsGxsGrpId{
|
|
|
|
|
|
|
|
public:
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
std::string grpId;
|
|
|
|
uint32_t version;
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
class RsGxsGroup {
|
|
|
|
std::set<uint32_t> version;
|
|
|
|
};
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-01-19 18:32:27 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
class RsGxsMsgId {
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::string mMsgId;
|
|
|
|
std::string mGrpId;
|
|
|
|
uint32_t mVersion;
|
2012-02-12 10:18:05 -05:00
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class RsGxsSearchResult {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class RsGxsMsg
|
|
|
|
{
|
2012-03-10 19:05:43 -05:00
|
|
|
RsGxsMsgId mId;
|
2012-02-24 16:15:08 -05:00
|
|
|
std::string mMsgId;
|
|
|
|
std::string mOrigMsgId;
|
|
|
|
|
|
|
|
RsGxsTime mTime;
|
|
|
|
std::list<std::string> mHashtags;
|
|
|
|
std::list<RsGxsLink> mLinked;
|
2012-03-10 19:05:43 -05:00
|
|
|
std::set<uint32_t> versions;
|
|
|
|
RsGxsSignature mSignature;
|
2012-02-24 16:15:08 -05:00
|
|
|
};
|
2012-02-12 10:18:05 -05:00
|
|
|
|
2012-01-11 18:01:29 -05:00
|
|
|
/*!
|
2012-02-24 16:15:08 -05:00
|
|
|
* This provides a base class which
|
|
|
|
* can be intepreted by the service
|
|
|
|
* into concrete search terms
|
|
|
|
*/
|
|
|
|
class RsGxsSearchItem {
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* The whole idea is to provide a broad enough base class from which
|
2012-03-10 19:05:43 -05:00
|
|
|
* all the services listed in gxs/db_apps.h can be implemented
|
|
|
|
* The exchange service features a token redemption request/receive
|
|
|
|
* design in which services make as request to the underlying base
|
|
|
|
* class which returns a token which the service should redeem later
|
|
|
|
* when the request's corresponding receive is called later
|
2012-02-24 16:15:08 -05:00
|
|
|
* Main functionality: \n
|
2012-01-19 18:32:27 -05:00
|
|
|
*
|
2012-02-24 16:15:08 -05:00
|
|
|
* Compared to previous cache-system, some improvements are: \n
|
2012-01-19 18:32:27 -05:00
|
|
|
*
|
2012-02-24 16:15:08 -05:00
|
|
|
* On-demand: There is granularity both in time and hiearchy on whats \n
|
|
|
|
* locally resident, all this is controlled by service \n
|
2012-03-10 19:05:43 -05:00
|
|
|
* * hiearchy - only grps are completely sync'd, have to request msgs \n
|
|
|
|
* * time - grps and hence messages to sync if in time range, grps locally resident but outside range are kept \n
|
2012-01-19 18:32:27 -05:00
|
|
|
*
|
2012-02-24 16:15:08 -05:00
|
|
|
* Search: \n
|
|
|
|
* User can provide search terms (RsGxsSearchItem) that each service can use to retrieve \n
|
|
|
|
* information on items and groups available in their exchange network \n
|
2012-01-19 18:32:27 -05:00
|
|
|
*
|
|
|
|
*
|
2012-02-24 16:15:08 -05:00
|
|
|
* Actual data exchanging: \n
|
|
|
|
* Currently naming convention is a bit confused between 'items' or 'messages' \n
|
2012-03-10 19:05:43 -05:00
|
|
|
* - consider item and msgs to be the same for now, RsGxsId, gives easy means of associate msgs to grps \n
|
2012-02-24 16:15:08 -05:00
|
|
|
* - all data is received via call back \n
|
|
|
|
* - therefore interface to UI should not be based on being alerted to msg availability \n
|
|
|
|
*/
|
|
|
|
class RsGxsService
|
|
|
|
{
|
2012-01-19 18:32:27 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/***************** Group request receive API ********************/
|
|
|
|
|
2012-01-19 18:32:27 -05:00
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* Request group, not intialising version member of RsGxsGrpId
|
|
|
|
* results in the latest version of group being returned
|
|
|
|
* @param grpIds the id/version of the group requested
|
|
|
|
* @return token for request
|
2012-01-19 18:32:27 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestGrp(std::list<RsGxsGrpId>& grpIds);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* pulls in all grps held by peer
|
|
|
|
* @param grpIds the id/version of the group requested
|
|
|
|
* @return token for request
|
|
|
|
* @see receiveGrp()
|
|
|
|
*/
|
|
|
|
int requestPeersGrps(const std::string& sslId);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-01-19 18:32:27 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* returns IDs of groups which are still in valid time range
|
|
|
|
* @return token for request
|
2012-01-19 18:32:27 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestGrpList();
|
2012-01-15 08:07:31 -05:00
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* @param token the token to be redeemed
|
|
|
|
* @param grpList list of group ids associated to request token
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
virtual void receiveGrpList(int token, std::list<RsGxsGrpId>& grpList) = 0;
|
2012-02-12 10:18:05 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* Event call back from Gxs runner
|
|
|
|
* after requested Grp(s) have been retrieved
|
|
|
|
* @param token the token to be redeemed
|
|
|
|
* @param grps list of groups associated to request token
|
2012-02-12 10:18:05 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
virtual void receiveGrp(int token, std::set<RsGxsGroup*>& grps) = 0;
|
|
|
|
|
|
|
|
/*************** Start: Msg request receive API ********************/
|
|
|
|
|
|
|
|
/* Messages a level below grps on the hiearchy hence group requests */
|
|
|
|
/* are intrinsically linked to their grp Id */
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-02-12 10:18:05 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* request latest version of messages for group
|
|
|
|
* @param token for request
|
|
|
|
* @see receiveMsg()
|
|
|
|
*/
|
|
|
|
int requestGrpMsgs(std::list<RsGxsGrpId>&);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* More fine grained request of msgs
|
|
|
|
* @param msgs the message to request, based on id, and version
|
|
|
|
* @param token for request
|
|
|
|
* @see receiveMsg()
|
2012-02-12 10:18:05 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestMsgs(std::list<RsGxsMsgId>& msgs);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* pulls in all data held by peer
|
|
|
|
* @param grpIds the id/version of the group requested
|
|
|
|
* @return token for request
|
|
|
|
* @see receiveMsg()
|
|
|
|
*/
|
|
|
|
int requestPeersMsgs(std::string sslId, const RsGxsGrpId& grpId);
|
2012-02-12 10:18:05 -05:00
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
/*!
|
|
|
|
* Event call back from GxsRunner
|
|
|
|
* after request msg(s) have been received
|
2012-03-10 19:05:43 -05:00
|
|
|
* @param token token to be redeemed
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
virtual void receiveMsg(int token, std::set<RsGxsMsg*>& msgs) = 0;
|
2012-02-12 10:18:05 -05:00
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* request message ids for grp
|
|
|
|
* @param msgIdSet set of id for msg
|
|
|
|
* @return token to be redeemed
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestGrpMsgIdList(std::list<RsGxsGrpId>& msgIds);
|
2012-02-12 10:18:05 -05:00
|
|
|
|
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param token to be redeemed
|
|
|
|
* @param the msgIdSet associated to request token
|
|
|
|
*/
|
|
|
|
virtual void receiveMsgIdList(int token, std::list<RsGxsMsgId>& msgIdList) = 0;
|
2012-02-12 10:18:05 -05:00
|
|
|
|
2012-01-11 18:01:29 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/*!
|
|
|
|
* @param searchToken token to be redeemed
|
|
|
|
* @param result result set
|
|
|
|
*/
|
|
|
|
void receivedSearchResult(int searchToken, std::set<RsGxsSearchResult*> results);
|
|
|
|
|
|
|
|
|
|
|
|
/*************** End: Msg request receive API ********************/
|
|
|
|
|
|
|
|
|
|
|
|
/*********** Start: publication *****************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* Pushes a RsGxsItem for publication
|
|
|
|
* @param msg set of messages to push onto service for publication
|
|
|
|
*/
|
|
|
|
void pushMsg(std::set<RsGxsMsg*>& msg);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Pushes a RsGxsGroup on RsGxsNetwork and associates it with a \n
|
|
|
|
* given RsGixs profile
|
|
|
|
* @param grp group to push onto network
|
|
|
|
* @return error code
|
|
|
|
*/
|
|
|
|
int pushGrp(std::set<RsGxsGroup*>& grp, std::string& profileName);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Pushes a RsGxsGroup onto RsGxs network, associates it with an RsGixs profile to be
|
|
|
|
* created given the parameters below
|
|
|
|
* @param grp set of messages to push onto service for publication
|
|
|
|
* @param type the type of identity to create
|
2012-02-24 16:15:08 -05:00
|
|
|
* @param peers peers to share this identity with
|
|
|
|
* @param pseudonym if type is pseudonym then uses this as the name of the pseudonym Identity
|
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
void pushGrp(std::set<RsGxsGroup*>& grp, RsIdentityExchangeService::IdentityType type, const std::set<std::string>& peers,
|
|
|
|
RsGxsGroup*& group, const std::string& pseudonymName = "");
|
|
|
|
|
|
|
|
/*********** End: publication *****************/
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
// The main idea here is each RsGroup needs permission set for each RsGxsGroup
|
|
|
|
// Thus a
|
|
|
|
// This is a configuration thing.
|
|
|
|
/*************************************************************************/
|
|
|
|
/*********** Start: Identity control and groups *****************/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* can choose the share created identity immediately or use identity service later to share it
|
|
|
|
* if type is pseudonym and pseudonym field is empty, identity creation will fail
|
|
|
|
* @param group is now associated
|
|
|
|
*/
|
|
|
|
void getProfile(std::string profileName);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* This sets an RsGroup to be able to share file between its members
|
|
|
|
* Default behaviour on group sharing is share with between all peers
|
|
|
|
*/
|
|
|
|
void setShareGroup(const std::list<RsGroupId>&, const RsGxsGrpId& grpId);
|
|
|
|
|
|
|
|
/*********** End: Identity control and groups *****************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************************************/
|
|
|
|
// Interface for Message Read Status
|
|
|
|
// At the moment this is overloaded to handle autodownload flags too.
|
|
|
|
// This is a configuration thing.
|
|
|
|
/****************************************************************************************************/
|
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/*********** Start: Update of groups/messages locally *****************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* To flags message as read or not read in store
|
|
|
|
* @param GrpMsgMap flags this msg,version pair as read
|
|
|
|
* @param read set to true for read and false for unread
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int flagMsgRead(const RsGxsMsgId& msgId, bool read) ;
|
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* To flag group as read or not read
|
|
|
|
* @param grpId the
|
|
|
|
* @param
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int flagGroupRead(const RsGxsGrpId& grpId, bool read);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/*!
|
|
|
|
* @param msgId
|
|
|
|
*/
|
|
|
|
int requestDeleteMsg(const RsGxsMsgId& msgId);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* This is grpId is marked in database to be removed
|
|
|
|
* and not circulated. Entry will later be removed
|
|
|
|
* once discard age is reached
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestDeleteGrp(const RsGxsGrpId& grpId);
|
|
|
|
|
|
|
|
|
|
|
|
/******************* Start: Configuration *************************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* How long to keep subscribed groups
|
|
|
|
* @param length how long to keep group in seconds
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
void setSubscirbedGroupDiscardAge(uint32_t length);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* How long to keep unsubscribed groups
|
|
|
|
* @param length how long to keep groups in seconds
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
void setUnsubscribedGrpDiscardAge(uint32_t length);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* How long to keep messages, group discard age supercedes this \n
|
|
|
|
* discard age
|
|
|
|
* @param length how long to keep messages in seconds
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int setMsgDiscardAge(uint32_t length);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* Use to subscribe or unsubscribe to group
|
|
|
|
* @param grpId the id of the group to scubscribe to
|
|
|
|
* @param subscribe set to false to unsubscribe and true otherwise
|
|
|
|
* @return token to redeem
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
int requestSubscribeToGrp(const RsGxsGrpId& grpId, bool subscribe);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/*!
|
|
|
|
* This called by event runner on status of subscription
|
|
|
|
* @param token the token to be redeemed
|
|
|
|
* @param gxsStatus the status of subscription request
|
|
|
|
*/
|
|
|
|
virtual void receiveSubscribeToGrp(int token, int gxsStatus) = 0;
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/******************* End: Configuration *************************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/****************** Start: Notifications from event runner ***************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
/*!
|
2012-03-10 19:05:43 -05:00
|
|
|
* This is called by event runner when a group or groups \n
|
|
|
|
* have been updated or newly arrived
|
|
|
|
* @param grpId ids of groups that have changed or newly arrived
|
2012-02-24 16:15:08 -05:00
|
|
|
*/
|
2012-03-10 19:05:43 -05:00
|
|
|
virtual void notifyGroupChanged(std::list<RsGxsGrpId> grpId) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* This is called by event runner when a msg or msg \n
|
|
|
|
* have been updated or newly arrived
|
|
|
|
* @param msgId ids of msgs that have changed or newly arrived
|
|
|
|
*/
|
|
|
|
virtual void notifyMsgChanged(std::list<RsGxsMsgId> msgId) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/****************** End: Notifications from event runner ***************/
|
|
|
|
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
/****************** Start: Search from event runner ***************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
2012-03-10 19:05:43 -05:00
|
|
|
// Users can either search groups or messages
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Users
|
|
|
|
* Some standard search terms are supported
|
|
|
|
* @param term this allows users to search their local storage defined terms
|
|
|
|
* @return token to redeem search
|
|
|
|
*/
|
|
|
|
int requestLocalSearch(RsGxsSearch* term);
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
// Remote Search...(2 hops ?)
|
2012-03-10 19:05:43 -05:00
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param term This contains the search term
|
|
|
|
* @param hops how many hops to search up to
|
|
|
|
* @return token to redeem search
|
|
|
|
*/
|
|
|
|
int requestRemoteSearch(RsGxsSearch* term, uint32_t hops);
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param token
|
|
|
|
* @param grpIds list of grp ids
|
|
|
|
*/
|
|
|
|
virtual void receiveLocalSearchGrps(int token, std::list<RsGxsGrpId>& grpIds);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param token the request token to be redeemed
|
|
|
|
* @param msgIds the message ids that contain contain search term
|
|
|
|
*/
|
|
|
|
virtual void receiveLocalSearchMsgs(int token, std::list<RsGxsMsgId> &msgIds) = 0;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param token request token to be redeemed
|
|
|
|
* @param grps
|
|
|
|
*/
|
|
|
|
virtual void receiveRemoteSearchGrps(int token, std::list<RsGxsGrpId>& grps) = 0;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
*
|
|
|
|
* @param token the request token to be redeemed
|
|
|
|
* @param msgIds
|
|
|
|
*/
|
|
|
|
virtual void recieveRemoteSearchMsgs(int token, std::list<RsGxsMsgId>& msgs) = 0;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Note if parent group is not present this will be requested \n
|
|
|
|
* by the event runner
|
|
|
|
* @param msgIds the ids of the remote messages being requested
|
|
|
|
* @return token to be redeemed
|
|
|
|
* @see receiveMsg()
|
|
|
|
*/
|
|
|
|
int requestRemoteMsg(std::list<RsGxsMsgId> msgIds);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* @param grpIds the ids of the group being requested
|
|
|
|
* @return token to be redeemed
|
|
|
|
* @see receiveGrp()
|
|
|
|
*/
|
|
|
|
int requestRemoteGrp(std::list<RsGxsGrpId>& grpIds);
|
|
|
|
|
|
|
|
/****************** End: Search from event runner ***************/
|
2012-02-24 16:15:08 -05:00
|
|
|
|
|
|
|
};
|
2012-01-18 18:20:53 -05:00
|
|
|
|
2012-01-11 18:01:29 -05:00
|
|
|
#endif // RSGXS_H
|