mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Cleanup rstokenservice defines
Removed unused defines Marked for future cleanup the ones the needed ones to refactor as inner enums in future
This commit is contained in:
parent
f0144fea97
commit
052a65219b
@ -28,31 +28,7 @@
|
|||||||
#include "rsgxsdataaccess.h"
|
#include "rsgxsdataaccess.h"
|
||||||
#include "retroshare/rsgxsflags.h"
|
#include "retroshare/rsgxsflags.h"
|
||||||
|
|
||||||
// This bit will be filled out over time.
|
// TODO CLEANUP: This should be an enum defined in rstokenservice.h
|
||||||
#define RS_TOKREQOPT_MSG_VERSIONS 0x0001 // MSGRELATED: Returns All MsgIds with OrigMsgId = MsgId.
|
|
||||||
#define RS_TOKREQOPT_MSG_ORIGMSG 0x0002 // MSGLIST: All Unique OrigMsgIds in a Group.
|
|
||||||
#define RS_TOKREQOPT_MSG_LATEST 0x0004 // MSGLIST: All Latest MsgIds in Group. MSGRELATED: Latest MsgIds for Input Msgs.
|
|
||||||
|
|
||||||
#define RS_TOKREQOPT_MSG_THREAD 0x0010 // MSGRELATED: All Msgs in Thread. MSGLIST: All Unique Thread Ids in Group.
|
|
||||||
#define RS_TOKREQOPT_MSG_PARENT 0x0020 // MSGRELATED: All Children Msgs.
|
|
||||||
|
|
||||||
#define RS_TOKREQOPT_MSG_AUTHOR 0x0040 // MSGLIST: Messages from this AuthorId
|
|
||||||
|
|
||||||
|
|
||||||
// Status Filtering... should it be a different Option Field.
|
|
||||||
#define RS_TOKREQOPT_GROUP_UPDATED 0x0100 // GROUPLIST: Groups that have been updated.
|
|
||||||
#define RS_TOKREQOPT_MSG_UPDATED 0x0200 // MSGLIST: Msg that have been updated from specified groups.
|
|
||||||
#define RS_TOKREQOPT_MSG_UPDATED 0x0200 // MSGLIST: Msg that have been updated from specified groups.
|
|
||||||
|
|
||||||
// Read Status.
|
|
||||||
#define RS_TOKREQOPT_READ 0x0001
|
|
||||||
#define RS_TOKREQOPT_UNREAD 0x0002
|
|
||||||
|
|
||||||
#define RS_TOKREQ_ANSTYPE_LIST 0x0001
|
|
||||||
#define RS_TOKREQ_ANSTYPE_SUMMARY 0x0002
|
|
||||||
#define RS_TOKREQ_ANSTYPE_DATA 0x0003
|
|
||||||
|
|
||||||
|
|
||||||
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_FAILED = 0;
|
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_FAILED = 0;
|
||||||
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_PENDING = 1;
|
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_PENDING = 1;
|
||||||
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_PARTIAL = 2;
|
const uint8_t RsTokenService::GXS_REQUEST_V2_STATUS_PARTIAL = 2;
|
||||||
@ -65,10 +41,8 @@
|
|||||||
* #define DATA_DEBUG 1
|
* #define DATA_DEBUG 1
|
||||||
**********/
|
**********/
|
||||||
|
|
||||||
RsGxsDataAccess::RsGxsDataAccess(RsGeneralDataService* ds)
|
RsGxsDataAccess::RsGxsDataAccess(RsGeneralDataService* ds) :
|
||||||
: mDataStore(ds), mDataMutex("RsGxsDataAccess"), mNextToken(0)
|
mDataStore(ds), mDataMutex("RsGxsDataAccess"), mNextToken(0) {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts,
|
bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts,
|
||||||
|
@ -30,9 +30,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
//#include "gxs/rsgxs.h"
|
|
||||||
#include "retroshare/rsgxsifacetypes.h"
|
#include "retroshare/rsgxsifacetypes.h"
|
||||||
|
|
||||||
|
// TODO CLEANUP: GXS_REQUEST_TYPE_* should be an inner enum of RsTokReqOptions
|
||||||
#define GXS_REQUEST_TYPE_GROUP_DATA 0x00010000
|
#define GXS_REQUEST_TYPE_GROUP_DATA 0x00010000
|
||||||
#define GXS_REQUEST_TYPE_GROUP_META 0x00020000
|
#define GXS_REQUEST_TYPE_GROUP_META 0x00020000
|
||||||
#define GXS_REQUEST_TYPE_GROUP_IDS 0x00040000
|
#define GXS_REQUEST_TYPE_GROUP_IDS 0x00040000
|
||||||
@ -48,41 +48,33 @@
|
|||||||
#define GXS_REQUEST_TYPE_SERVICE_STATS 0x03200000
|
#define GXS_REQUEST_TYPE_SERVICE_STATS 0x03200000
|
||||||
|
|
||||||
|
|
||||||
// This bit will be filled out over time.
|
// TODO CLEANUP: RS_TOKREQOPT_MSG_* should be an inner enum of RsTokReqOptions
|
||||||
#define RS_TOKREQOPT_MSG_VERSIONS 0x0001 // MSGRELATED: Returns All MsgIds with OrigMsgId = MsgId.
|
#define RS_TOKREQOPT_MSG_VERSIONS 0x0001 // MSGRELATED: Returns All MsgIds with OrigMsgId = MsgId.
|
||||||
#define RS_TOKREQOPT_MSG_ORIGMSG 0x0002 // MSGLIST: All Unique OrigMsgIds in a Group.
|
#define RS_TOKREQOPT_MSG_ORIGMSG 0x0002 // MSGLIST: All Unique OrigMsgIds in a Group.
|
||||||
#define RS_TOKREQOPT_MSG_LATEST 0x0004 // MSGLIST: All Latest MsgIds in Group. MSGRELATED: Latest MsgIds for Input Msgs.
|
#define RS_TOKREQOPT_MSG_LATEST 0x0004 // MSGLIST: All Latest MsgIds in Group. MSGRELATED: Latest MsgIds for Input Msgs.
|
||||||
|
|
||||||
#define RS_TOKREQOPT_MSG_THREAD 0x0010 // MSGRELATED: All Msgs in Thread. MSGLIST: All Unique Thread Ids in Group.
|
#define RS_TOKREQOPT_MSG_THREAD 0x0010 // MSGRELATED: All Msgs in Thread. MSGLIST: All Unique Thread Ids in Group.
|
||||||
#define RS_TOKREQOPT_MSG_PARENT 0x0020 // MSGRELATED: All Children Msgs.
|
#define RS_TOKREQOPT_MSG_PARENT 0x0020 // MSGRELATED: All Children Msgs.
|
||||||
|
|
||||||
#define RS_TOKREQOPT_MSG_AUTHOR 0x0040 // MSGLIST: Messages from this AuthorId
|
#define RS_TOKREQOPT_MSG_AUTHOR 0x0040 // MSGLIST: Messages from this AuthorId
|
||||||
|
|
||||||
// Read Status.
|
|
||||||
#define RS_TOKREQOPT_READ 0x0001
|
|
||||||
#define RS_TOKREQOPT_UNREAD 0x0002
|
|
||||||
|
|
||||||
#define RS_TOKREQ_ANSTYPE_LIST 0x0001
|
/* TODO CLEANUP: RS_TOKREQ_ANSTYPE_* values are not used by RsTokenService or
|
||||||
#define RS_TOKREQ_ANSTYPE_SUMMARY 0x0002
|
* its implementation, and may be arbitrarly defined by each GXS client, should
|
||||||
#define RS_TOKREQ_ANSTYPE_DATA 0x0003
|
* be removed from here */
|
||||||
#define RS_TOKREQ_ANSTYPE_ACK 0x0004
|
#define RS_TOKREQ_ANSTYPE_LIST 0x0001
|
||||||
|
#define RS_TOKREQ_ANSTYPE_SUMMARY 0x0002
|
||||||
|
#define RS_TOKREQ_ANSTYPE_DATA 0x0003
|
||||||
|
#define RS_TOKREQ_ANSTYPE_ACK 0x0004
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This class provides useful generic support for GXS style services.
|
* This class provides useful generic support for GXS style services.
|
||||||
* I expect much of this will be incorporated into the base GXS.
|
* I expect much of this will be incorporated into the base GXS.
|
||||||
*/
|
*/
|
||||||
class RsTokReqOptions
|
struct RsTokReqOptions
|
||||||
{
|
{
|
||||||
public:
|
RsTokReqOptions() : mOptions(0), mStatusFilter(0), mStatusMask(0),
|
||||||
RsTokReqOptions()
|
mMsgFlagMask(0), mMsgFlagFilter(0), mReqType(0), mSubscribeFilter(0),
|
||||||
{
|
mSubscribeMask(0), mBefore(0), mAfter(0) {}
|
||||||
mOptions = 0;
|
|
||||||
mStatusFilter = 0; mStatusMask = 0; mSubscribeFilter = 0;
|
|
||||||
mSubscribeMask = 0;
|
|
||||||
mMsgFlagMask = 0; mMsgFlagFilter = 0;
|
|
||||||
mBefore = 0; mAfter = 0; mReqType = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t mOptions;
|
uint32_t mOptions;
|
||||||
|
|
||||||
@ -115,6 +107,7 @@ class RsTokenService
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// TODO CLEANUP: This should be an enum
|
||||||
static const uint8_t GXS_REQUEST_V2_STATUS_FAILED;
|
static const uint8_t GXS_REQUEST_V2_STATUS_FAILED;
|
||||||
static const uint8_t GXS_REQUEST_V2_STATUS_PENDING;
|
static const uint8_t GXS_REQUEST_V2_STATUS_PENDING;
|
||||||
static const uint8_t GXS_REQUEST_V2_STATUS_PARTIAL;
|
static const uint8_t GXS_REQUEST_V2_STATUS_PARTIAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user