From 4f470090b2c4e806ecc88de525dd098eee5583cd Mon Sep 17 00:00:00 2001 From: drbob Date: Sat, 15 Sep 2012 00:26:33 +0000 Subject: [PATCH] Moved TokenQueue => TokenQueueVEG to make space for Real version. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5553 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/RetroShare.pro | 4 +-- .../{TokenQueue.cpp => TokenQueueVEG.cpp} | 36 +++++++++---------- .../util/{TokenQueue.h => TokenQueueVEG.h} | 30 ++++++++-------- 3 files changed, 35 insertions(+), 35 deletions(-) rename retroshare-gui/src/util/{TokenQueue.cpp => TokenQueueVEG.cpp} (69%) rename retroshare-gui/src/util/{TokenQueue.h => TokenQueueVEG.h} (81%) diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index 590166f69..73bac1f46 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -933,14 +933,14 @@ thewire { identities { - HEADERS += util/TokenQueue.h \ + HEADERS += util/TokenQueueVEG.h \ gui/Identity/IdDialog.h \ gui/Identity/IdEditDialog.h \ FORMS += gui/Identity/IdDialog.ui \ gui/Identity/IdEditDialog.ui \ - SOURCES += util/TokenQueue.cpp \ + SOURCES += util/TokenQueueVEG.cpp \ gui/Identity/IdDialog.cpp \ gui/Identity/IdEditDialog.cpp \ diff --git a/retroshare-gui/src/util/TokenQueue.cpp b/retroshare-gui/src/util/TokenQueueVEG.cpp similarity index 69% rename from retroshare-gui/src/util/TokenQueue.cpp rename to retroshare-gui/src/util/TokenQueueVEG.cpp index 1c0cf7a0f..5c11dca31 100644 --- a/retroshare-gui/src/util/TokenQueue.cpp +++ b/retroshare-gui/src/util/TokenQueueVEG.cpp @@ -21,7 +21,7 @@ * */ -#include "util/TokenQueue.h" +#include "util/TokenQueueVEG.h" #include #include @@ -31,13 +31,13 @@ *****/ /** Constructor */ -TokenQueue::TokenQueue(RsTokenService *service, TokenResponse *resp) +TokenQueueVEG::TokenQueueVEG(RsTokenServiceVEG *service, TokenResponseVEG *resp) :QWidget(NULL), mService(service), mResponder(resp) { return; } -bool TokenQueue::requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, std::list ids, uint32_t usertype) +bool TokenQueueVEG::requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, uint32_t usertype) { uint32_t basictype = TOKENREQ_GROUPINFO; mService->requestGroupInfo(token, anstype, opts, ids); @@ -47,7 +47,7 @@ bool TokenQueue::requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTok } -bool TokenQueue::requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, std::list ids, uint32_t usertype) +bool TokenQueueVEG::requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, uint32_t usertype) { uint32_t basictype = TOKENREQ_MSGINFO; mService->requestMsgInfo(token, anstype, opts, ids); @@ -57,7 +57,7 @@ bool TokenQueue::requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokRe } -bool TokenQueue::requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, std::list ids, uint32_t usertype) +bool TokenQueueVEG::requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, uint32_t usertype) { uint32_t basictype = TOKENREQ_MSGRELATEDINFO; mService->requestMsgRelatedInfo(token, anstype, opts, ids); @@ -67,13 +67,13 @@ bool TokenQueue::requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const } -void TokenQueue::queueRequest(uint32_t token, uint32_t basictype, uint32_t anstype, uint32_t usertype) +void TokenQueueVEG::queueRequest(uint32_t token, uint32_t basictype, uint32_t anstype, uint32_t usertype) { - std::cerr << "TokenQueue::queueRequest() Token: " << token << " Type: " << basictype; + std::cerr << "TokenQueueVEG::queueRequest() Token: " << token << " Type: " << basictype; std::cerr << " AnsType: " << anstype << " UserType: " << usertype; std::cerr << std::endl; - TokenRequest req; + TokenRequestVEG req; req.mToken = token; req.mType = basictype; req.mAnsType = anstype; @@ -91,7 +91,7 @@ void TokenQueue::queueRequest(uint32_t token, uint32_t basictype, uint32_t ansty } } -void TokenQueue::doPoll(float dt) +void TokenQueueVEG::doPoll(float dt) { /* single shot poll */ //mTrigger->singlesshot(dt * 1000); @@ -99,9 +99,9 @@ void TokenQueue::doPoll(float dt) } -void TokenQueue::pollRequests() +void TokenQueueVEG::pollRequests() { - std::list::iterator it; + std::list::iterator it; double pollPeriod = 1.0; // max poll period. for(it = mRequests.begin(); it != mRequests.end();) @@ -129,16 +129,16 @@ void TokenQueue::pollRequests() } -bool TokenQueue::checkForRequest(uint32_t token) +bool TokenQueueVEG::checkForRequest(uint32_t token) { /* check token */ return (COMPLETED_REQUEST == mService->requestStatus(token)); } -void TokenQueue::loadRequest(const TokenRequest &req) +void TokenQueueVEG::loadRequest(const TokenRequestVEG &req) { - std::cerr << "TokenQueue::loadRequest(): "; + std::cerr << "TokenQueueVEG::loadRequest(): "; std::cerr << "Token: " << req.mToken << " Type: " << req.mType; std::cerr << " AnsType: " << req.mAnsType << " UserType: " << req.mUserType; std::cerr << std::endl; @@ -149,12 +149,12 @@ void TokenQueue::loadRequest(const TokenRequest &req) } -bool TokenQueue::cancelRequest(const uint32_t token) +bool TokenQueueVEG::cancelRequest(const uint32_t token) { /* cancel at lower level first */ mService->cancelRequest(token); - std::list::iterator it; + std::list::iterator it; for(it = mRequests.begin(); it != mRequests.end(); it++) { @@ -162,14 +162,14 @@ bool TokenQueue::cancelRequest(const uint32_t token) { mRequests.erase(it); - std::cerr << "TokenQueue::cancelRequest() Cleared Request: " << token; + std::cerr << "TokenQueueVEG::cancelRequest() Cleared Request: " << token; std::cerr << std::endl; return true; } } - std::cerr << "TokenQueue::cancelRequest() Failed to Find Request: " << token; + std::cerr << "TokenQueueVEG::cancelRequest() Failed to Find Request: " << token; std::cerr << std::endl; return false; diff --git a/retroshare-gui/src/util/TokenQueue.h b/retroshare-gui/src/util/TokenQueueVEG.h similarity index 81% rename from retroshare-gui/src/util/TokenQueue.h rename to retroshare-gui/src/util/TokenQueueVEG.h index b11c131bb..4f6b5a667 100644 --- a/retroshare-gui/src/util/TokenQueue.h +++ b/retroshare-gui/src/util/TokenQueueVEG.h @@ -21,8 +21,8 @@ * */ -#ifndef MRK_TOKEN_QUEUE_H -#define MRK_TOKEN_QUEUE_H +#ifndef MRK_VEG_TOKEN_QUEUE_H +#define MRK_VEG_TOKEN_QUEUE_H #include #include @@ -30,7 +30,7 @@ #include #include #include -#include +#include #define COMPLETED_REQUEST 4 @@ -38,9 +38,9 @@ #define TOKENREQ_MSGINFO 2 #define TOKENREQ_MSGRELATEDINFO 3 -class TokenQueue; +class TokenQueueVEG; -class TokenRequest +class TokenRequestVEG { public: uint32_t mToken; @@ -51,7 +51,7 @@ class TokenRequest struct timeval mPollTs; }; -class TokenResponse +class TokenResponseVEG { public: //virtual ~TokenResponse() { return; } @@ -60,25 +60,25 @@ class TokenResponse }; -class TokenQueue: public QWidget +class TokenQueueVEG: public QWidget { Q_OBJECT public: - TokenQueue(RsTokenService *service, TokenResponse *resp); + TokenQueueVEG(RsTokenServiceVEG *service, TokenResponseVEG *resp); /* generic handling of token / response update behaviour */ - bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, + bool requestGroupInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, uint32_t usertype); - bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, + bool requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, uint32_t usertype); - bool requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptions &opts, + bool requestMsgRelatedInfo(uint32_t &token, uint32_t anstype, const RsTokReqOptionsVEG &opts, std::list ids, 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 TokenRequestVEG &req); protected: void doPoll(float dt); @@ -88,10 +88,10 @@ private slots: private: /* Info for Data Requests */ - std::list mRequests; + std::list mRequests; - RsTokenService *mService; - TokenResponse *mResponder; + RsTokenServiceVEG *mService; + TokenResponseVEG *mResponder; QTimer *mTrigger; };