mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 22:40:36 -04:00
Source code maintenance
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5897 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8cef4da896
commit
6fba395054
2 changed files with 60 additions and 83 deletions
|
@ -33,11 +33,10 @@
|
|||
#include <gxs/rstokenservice.h>
|
||||
|
||||
|
||||
#define COMPLETED_REQUEST 4
|
||||
|
||||
#define COMPLETED_REQUEST 4
|
||||
|
||||
#define TOKENREQ_GROUPINFO 1
|
||||
#define TOKENREQ_MSGINFO 2
|
||||
#define TOKENREQ_GROUPINFO 1
|
||||
#define TOKENREQ_MSGINFO 2
|
||||
#define TOKENREQ_MSGRELATEDINFO 3
|
||||
|
||||
|
||||
|
@ -45,7 +44,7 @@ class TokenQueue;
|
|||
|
||||
class TokenRequest
|
||||
{
|
||||
public:
|
||||
public:
|
||||
uint32_t mToken;
|
||||
uint32_t mType;
|
||||
uint32_t mAnsType;
|
||||
|
@ -56,10 +55,10 @@ class TokenRequest
|
|||
|
||||
class TokenResponse
|
||||
{
|
||||
public:
|
||||
public:
|
||||
//virtual ~TokenResponse() { return; }
|
||||
// These Functions are overloaded to get results out.
|
||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req) = 0;
|
||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -69,37 +68,36 @@ class TokenResponse
|
|||
*/
|
||||
class TokenQueue: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TokenQueue(RsTokenService *service, TokenResponse *resp);
|
||||
TokenQueue(RsTokenService *service, TokenResponse *resp);
|
||||
|
||||
/* generic handling of token / response update behaviour */
|
||||
|
||||
/*!
|
||||
*
|
||||
* @token the token to be redeem is assigned here
|
||||
*
|
||||
*/
|
||||
bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
std::list<RsGxsGroupId>& ids, uint32_t usertype);
|
||||
/*!
|
||||
*
|
||||
* @token the token to be redeem is assigned here
|
||||
*
|
||||
*/
|
||||
bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
std::list<RsGxsGroupId>& ids, uint32_t usertype);
|
||||
|
||||
bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, uint32_t usertype);
|
||||
|
||||
bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, uint32_t usertype);
|
||||
bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
const std::list<RsGxsGroupId>& grpIds, uint32_t usertype);
|
||||
|
||||
bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
const std::list<RsGxsGroupId>& grpIds, uint32_t usertype);
|
||||
bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
const GxsMsgReq& grpIds, uint32_t usertype);
|
||||
|
||||
bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts,
|
||||
const GxsMsgReq& grpIds, uint32_t usertype);
|
||||
|
||||
bool requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, const std::vector<RsGxsGrpMsgIdPair>& msgId, uint32_t usertype);
|
||||
bool requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, const std::vector<RsGxsGrpMsgIdPair>& msgId, uint32_t usertype);
|
||||
|
||||
bool cancelRequest(const uint32_t token);
|
||||
|
||||
void queueRequest(uint32_t token, uint32_t basictype, uint32_t anstype, uint32_t usertype);
|
||||
bool checkForRequest(uint32_t token);
|
||||
void loadRequest(const TokenRequest &req);
|
||||
void loadRequest(const TokenRequest &req);
|
||||
|
||||
protected:
|
||||
void doPoll(float dt);
|
||||
|
@ -109,14 +107,12 @@ private slots:
|
|||
|
||||
private:
|
||||
/* Info for Data Requests */
|
||||
std::list<TokenRequest> mRequests;
|
||||
std::list<TokenRequest> mRequests;
|
||||
|
||||
RsTokenService *mService;
|
||||
TokenResponse *mResponder;
|
||||
RsTokenService *mService;
|
||||
TokenResponse *mResponder;
|
||||
|
||||
QTimer *mTrigger;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue