mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-19 12:24:53 -04:00
laid groundwork for newcache posted
re-enabled postedVEG added convenience base class for gxs services fixed posted and gxs gui removed tokenservicev2, now just tokenservice git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5641 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a57d627074
commit
8f2d85ed52
32 changed files with 1202 additions and 761 deletions
|
@ -6,9 +6,9 @@ CONFIG += photoshare
|
|||
#CONFIG += thewire
|
||||
#CONFIG += identities
|
||||
#CONFIG += forumsv2
|
||||
#CONFIG += posted
|
||||
CONFIG += posted
|
||||
CONFIG += unfinished
|
||||
#CONFIG += gxsgui
|
||||
CONFIG += gxsgui
|
||||
|
||||
#CONFIG += pluginmgr
|
||||
|
||||
|
@ -940,14 +940,14 @@ thewire {
|
|||
|
||||
identities {
|
||||
|
||||
HEADERS += util/TokenQueueVEG.h \
|
||||
HEADERS += \
|
||||
gui/Identity/IdDialog.h \
|
||||
gui/Identity/IdEditDialog.h \
|
||||
|
||||
FORMS += gui/Identity/IdDialog.ui \
|
||||
gui/Identity/IdEditDialog.ui \
|
||||
|
||||
SOURCES += util/TokenQueueVEG.cpp \
|
||||
SOURCES += \
|
||||
gui/Identity/IdDialog.cpp \
|
||||
gui/Identity/IdEditDialog.cpp \
|
||||
|
||||
|
@ -983,6 +983,7 @@ posted {
|
|||
gui/Posted/PostedListDialog.h \
|
||||
gui/Posted/PostedItem.h \
|
||||
gui/Posted/PostedComments.h \
|
||||
util/TokenQueueVEG.h
|
||||
|
||||
FORMS += gui/Posted/PostedDialog.ui \
|
||||
gui/Posted/PostedListDialog.ui \
|
||||
|
@ -993,27 +994,31 @@ posted {
|
|||
gui/Posted/PostedListDialog.cpp \
|
||||
gui/Posted/PostedItem.cpp \
|
||||
gui/Posted/PostedComments.cpp \
|
||||
util/TokenQueueVEG.cpp
|
||||
|
||||
}
|
||||
|
||||
gxsgui {
|
||||
|
||||
HEADERS += gui/gxs/GxsGroupDialog.h \
|
||||
gui/gxs/ForumV2GroupDialog.h \
|
||||
gui/gxs/WikiGroupDialog.h \
|
||||
gui/gxs/PostedGroupDialog.h \
|
||||
gui/gxs/GxsCommentTreeWidget.h \
|
||||
gui/gxs/GxsCommentTreeWidget.h
|
||||
# gui/gxs/ForumV2GroupDialog.h \
|
||||
# gui/gxs/WikiGroupDialog.h \
|
||||
|
||||
# gui/gxs/GxsMsgDialog.h \
|
||||
|
||||
FORMS += gui/gxs/GxsGroupDialog.ui \
|
||||
# gui/gxs/GxsMsgDialog.ui \
|
||||
# gui/gxs/GxsCommentTreeWidget.ui \
|
||||
|
||||
SOURCES += gui/gxs/GxsGroupDialog.cpp \
|
||||
gui/gxs/ForumV2GroupDialog.cpp \
|
||||
gui/gxs/WikiGroupDialog.cpp \
|
||||
SOURCES += gui/gxs/GxsGroupDialog.cpp \
|
||||
gui/gxs/PostedGroupDialog.cpp \
|
||||
gui/gxs/GxsCommentTreeWidget.cpp \
|
||||
gui/gxs/GxsCommentTreeWidget.cpp
|
||||
#gui/gxs/ForumV2GroupDialog.cpp \
|
||||
# gui/gxs/WikiGroupDialog.cpp \
|
||||
#
|
||||
|
||||
# gui/gxs/GxsMsgDialog.cpp \
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "PostedComments.h"
|
||||
|
||||
//#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
@ -83,7 +83,7 @@ PostedComments::PostedComments(QWidget *parent)
|
|||
/* setup TokenQueue */
|
||||
//mPhotoQueue = new TokenQueue(rsPhoto, this);
|
||||
|
||||
ui.treeWidget->setup(rsPosted);
|
||||
ui.treeWidget->setup(rsPostedVEG);
|
||||
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ void PhotoDialog::loadPhotoData(const uint32_t &token)
|
|||
|
||||
/********************************/
|
||||
|
||||
void PhotoDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
void PhotoDialog::loadRequest(const TokenQueue *queue, const TokenRequestVEG &req)
|
||||
{
|
||||
std::cerr << "PhotoDialog::loadRequest()";
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -27,16 +27,16 @@
|
|||
//#include "gui/mainpage.h"
|
||||
#include "ui_PostedComments.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
//#include "gui/Posted/PostedItem.h"
|
||||
//#include "gui/PhotoShare/PhotoAddDialog.h"
|
||||
//#include "gui/PhotoShare/PhotoSlideShow.h"
|
||||
#include "util/TokenQueue.h"
|
||||
#include "util/TokenQueueVEG.h"
|
||||
|
||||
class PostedComments: public QWidget, public TokenResponse
|
||||
class PostedComments: public QWidget, public TokenResponseVEG
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -47,7 +47,7 @@ public slots:
|
|||
void loadComments( std::string );
|
||||
|
||||
private:
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req) { return; }
|
||||
void loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req) { return; }
|
||||
|
||||
#if 0
|
||||
virtual void deletePhotoItem(PhotoItem *, uint32_t type);
|
||||
|
@ -112,7 +112,7 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
TokenQueue *mPhotoQueue;
|
||||
TokenQueueVEG *mPhotoQueue;
|
||||
|
||||
/* UI - from Designer */
|
||||
Ui::PostedComments ui;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "PostedListDialog.h"
|
||||
#include "PostedComments.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "retroshare-gui/mainpage.h"
|
||||
#include "ui_PostedDialog.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "PostedItem.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
@ -53,7 +53,7 @@ PostedItem::PostedItem(PostedHolder *parent, const RsPostedPost &post)
|
|||
//scoreLabel->setText(QString("1140"));
|
||||
|
||||
// exposed for testing...
|
||||
float score = rsPosted->calcPostScore(post.mMeta);
|
||||
float score = rsPostedVEG->calcPostScore(post.mMeta);
|
||||
time_t now = time(NULL);
|
||||
|
||||
QString fromLabelTxt = QString(" Age: ") + QString::number(now - post.mMeta.mPublishTs);
|
||||
|
@ -62,7 +62,7 @@ PostedItem::PostedItem(PostedHolder *parent, const RsPostedPost &post)
|
|||
|
||||
uint32_t votes = 0;
|
||||
uint32_t comments = 0;
|
||||
rsPosted->extractPostedCache(post.mMeta.mServiceString, votes, comments);
|
||||
rsPostedVEG->extractPostedCache(post.mMeta.mServiceString, votes, comments);
|
||||
scoreLabel->setText(QString::number(votes));
|
||||
QString commentLabel = QString("Comments: ") + QString::number(comments);
|
||||
commentLabel += QString(" Votes: ") + QString::number(votes);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "ui_PostedItem.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
class RsPostedPost;
|
||||
class PostedItem;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "gui/gxs/PostedGroupDialog.h"
|
||||
|
||||
//#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
@ -69,7 +69,7 @@ PostedListDialog::PostedListDialog(QWidget *parent)
|
|||
ui.setupUi(this);
|
||||
|
||||
/* Setup Queue */
|
||||
mPostedQueue = new TokenQueue(rsPosted, this);
|
||||
mPostedQueue = new TokenQueueVEG(rsPostedVEG, this);
|
||||
|
||||
connect( ui.groupTreeWidget, SIGNAL( treeCustomContextMenuRequested( QPoint ) ), this, SLOT( groupListCustomPopupMenu( QPoint ) ) );
|
||||
|
||||
|
@ -157,12 +157,12 @@ void PostedListDialog::updateDisplay()
|
|||
{
|
||||
std::list<std::string> groupIds;
|
||||
std::list<std::string>::iterator it;
|
||||
if (!rsPosted)
|
||||
if (!rsPostedVEG)
|
||||
return;
|
||||
|
||||
// TODO groupsChanged... HACK XXX.
|
||||
#if 0
|
||||
if ((rsPosted->groupsChanged(groupIds)) || (rsPosted->updated()))
|
||||
if ((rsPostedVEG->groupsChanged(groupIds)) || (rsPostedVEG->updated()))
|
||||
{
|
||||
/* update Forums List */
|
||||
insertGroups();
|
||||
|
@ -176,7 +176,7 @@ void PostedListDialog::updateDisplay()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (rsPosted->updated())
|
||||
if (rsPostedVEG->updated())
|
||||
{
|
||||
/* update Forums List */
|
||||
insertGroups();
|
||||
|
@ -235,47 +235,47 @@ void PostedListDialog::sortButtonClicked( QAbstractButton *button )
|
|||
std::cerr << "PostedListDialog::sortButtonClicked( From Button Group! )";
|
||||
std::cerr << std::endl;
|
||||
|
||||
uint32_t sortMode = RSPOSTED_VIEWMODE_HOT;
|
||||
uint32_t sortMode = RSPOSTED_VIEWMODE_HOT;
|
||||
|
||||
if (button == ui.hotSortButton) {
|
||||
sortMode = RSPOSTED_VIEWMODE_HOT;
|
||||
sortMode = RSPOSTED_VIEWMODE_HOT;
|
||||
} else if (button == ui.newSortButton) {
|
||||
sortMode = RSPOSTED_VIEWMODE_LATEST;
|
||||
sortMode = RSPOSTED_VIEWMODE_LATEST;
|
||||
} else if (button == ui.topSortButton) {
|
||||
sortMode = RSPOSTED_VIEWMODE_TOP;
|
||||
sortMode = RSPOSTED_VIEWMODE_TOP;
|
||||
}
|
||||
|
||||
rsPosted->setViewMode(sortMode);
|
||||
rsPostedVEG->setViewMode(sortMode);
|
||||
}
|
||||
|
||||
|
||||
void PostedListDialog::periodChanged( int index )
|
||||
{
|
||||
uint32_t periodMode = RSPOSTED_PERIOD_HOUR;
|
||||
uint32_t periodMode = RSPOSTED_PERIOD_HOUR;
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
periodMode = RSPOSTED_PERIOD_HOUR;
|
||||
periodMode = RSPOSTED_PERIOD_HOUR;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
periodMode = RSPOSTED_PERIOD_DAY;
|
||||
periodMode = RSPOSTED_PERIOD_DAY;
|
||||
break;
|
||||
|
||||
default:
|
||||
case 2:
|
||||
periodMode = RSPOSTED_PERIOD_WEEK;
|
||||
periodMode = RSPOSTED_PERIOD_WEEK;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
periodMode = RSPOSTED_PERIOD_MONTH;
|
||||
periodMode = RSPOSTED_PERIOD_MONTH;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
periodMode = RSPOSTED_PERIOD_YEAR;
|
||||
periodMode = RSPOSTED_PERIOD_YEAR;
|
||||
break;
|
||||
}
|
||||
rsPosted->setViewPeriod(periodMode);
|
||||
rsPostedVEG->setViewPeriod(periodMode);
|
||||
}
|
||||
|
||||
|
||||
|
@ -342,7 +342,7 @@ void PostedListDialog::requestGroupSummary()
|
|||
std::cerr << std::endl;
|
||||
|
||||
std::list<std::string> ids;
|
||||
RsTokReqOptions opts;
|
||||
RsTokReqOptionsVEG opts;
|
||||
uint32_t token;
|
||||
mPostedQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, ids, POSTEDDIALOG_LISTING);
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ void PostedListDialog::loadGroupSummary(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
|
||||
std::list<RsGroupMetaData> groupInfo;
|
||||
rsPosted->getGroupSummary(token, groupInfo);
|
||||
rsPostedVEG->getGroupSummary(token, groupInfo);
|
||||
|
||||
if (groupInfo.size() > 0)
|
||||
{
|
||||
|
@ -373,7 +373,7 @@ void PostedListDialog::loadGroupSummary(const uint32_t &token)
|
|||
|
||||
void PostedListDialog::requestGroupSummary_CurrentForum(const std::string &forumId)
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
RsTokReqOptionsVEG opts;
|
||||
|
||||
std::list<std::string> grpIds;
|
||||
grpIds.push_back(forumId);
|
||||
|
@ -391,7 +391,7 @@ void PostedListDialog::loadGroupSummary_CurrentForum(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
|
||||
std::list<RsGroupMetaData> groupInfo;
|
||||
rsPosted->getGroupSummary(token, groupInfo);
|
||||
rsPostedVEG->getGroupSummary(token, groupInfo);
|
||||
|
||||
if (groupInfo.size() == 1)
|
||||
{
|
||||
|
@ -452,7 +452,7 @@ void PostedListDialog::loadCurrentForumThreads(const std::string &forumId)
|
|||
|
||||
void PostedListDialog::requestGroupThreadData_InsertThreads(const std::string &groupId)
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
RsTokReqOptionsVEG opts;
|
||||
|
||||
opts.mOptions = RS_TOKREQOPT_MSG_THREAD | RS_TOKREQOPT_MSG_LATEST;
|
||||
|
||||
|
@ -466,7 +466,7 @@ void PostedListDialog::requestGroupThreadData_InsertThreads(const std::string &g
|
|||
//mPostedQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, grpIds, POSTEDDIALOG_INSERTTHREADS);
|
||||
|
||||
// Do specific Posted Request....
|
||||
if (rsPosted->requestRanking(token, groupId))
|
||||
if (rsPostedVEG->requestRanking(token, groupId))
|
||||
{
|
||||
// get the Queue to handle response.
|
||||
mPostedQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_DATA, POSTEDDIALOG_INSERTTHREADS);
|
||||
|
@ -482,11 +482,11 @@ void PostedListDialog::loadGroupThreadData_InsertThreads(const uint32_t &token)
|
|||
bool moreData = true;
|
||||
while(moreData)
|
||||
{
|
||||
RsPostedPost post;
|
||||
RsPostedPost post;
|
||||
// Old Format.
|
||||
//if (rsPosted->getPost(token, post))
|
||||
//if (rsPostedVEG->getPost(token, post))
|
||||
|
||||
if (rsPosted->getRankedPost(token, post))
|
||||
if (rsPostedVEG->getRankedPost(token, post))
|
||||
{
|
||||
std::cerr << "PostedListDialog::loadGroupThreadData_InsertThreads() MsgId: " << post.mMeta.mMsgId;
|
||||
std::cerr << std::endl;
|
||||
|
@ -559,7 +559,7 @@ void PostedListDialog::clearPosts()
|
|||
/*********************** **** **** **** ***********************/
|
||||
/*********************** **** **** **** ***********************/
|
||||
|
||||
void PostedListDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
void PostedListDialog::loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req)
|
||||
{
|
||||
std::cerr << "PostedListDialog::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
#include "retroshare-gui/mainpage.h"
|
||||
#include "ui_PostedListDialog.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "gui/Posted/PostedItem.h"
|
||||
#include "gui/common/GroupTreeWidget.h"
|
||||
|
||||
#include "util/TokenQueue.h"
|
||||
#include "util/TokenQueueVEG.h"
|
||||
|
||||
#include "retroshare-gui/RsAutoUpdatePage.h"
|
||||
|
||||
class PostedListDialog : public RsAutoUpdatePage, public PostedHolder, public TokenResponse
|
||||
class PostedListDialog : public RsAutoUpdatePage, public PostedHolder, public TokenResponseVEG
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -90,7 +90,7 @@ void loadGroupThreadData_InsertThreads(const uint32_t &token);
|
|||
void insertGroupData(const std::list<RsGroupMetaData> &groupList);
|
||||
void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo);
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
void loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req);
|
||||
|
||||
|
||||
QTreeWidgetItem *yourTopics;
|
||||
|
@ -103,7 +103,7 @@ void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &
|
|||
bool mThreadLoading;
|
||||
std::string mCurrTopicId;
|
||||
|
||||
TokenQueue *mPostedQueue;
|
||||
TokenQueueVEG *mPostedQueue;
|
||||
|
||||
/* UI - from Designer */
|
||||
Ui::PostedListDialog ui;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define GXSCOMMENTS_LOADTHREAD 1
|
||||
|
||||
// Temporarily make this specific.
|
||||
#include "retroshare/rsposted.h"
|
||||
#include "retroshare/rspostedVEG.h"
|
||||
|
||||
|
||||
GxsCommentTreeWidget::GxsCommentTreeWidget(QWidget *parent)
|
||||
|
@ -46,10 +46,10 @@ GxsCommentTreeWidget::GxsCommentTreeWidget(QWidget *parent)
|
|||
return;
|
||||
}
|
||||
|
||||
void GxsCommentTreeWidget::setup(RsTokenService *service)
|
||||
void GxsCommentTreeWidget::setup(RsTokenServiceVEG *service)
|
||||
{
|
||||
mRsService = service;
|
||||
mTokenQueue = new TokenQueue(service, this);
|
||||
mTokenQueue = new TokenQueueVEG(service, this);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void GxsCommentTreeWidget::service_requestComments(std::string threadId)
|
|||
std::cerr << "GxsCommentTreeWidget::service_requestComments(" << threadId << ")";
|
||||
std::cerr << std::endl;
|
||||
|
||||
RsTokReqOptions opts;
|
||||
RsTokReqOptionsVEG opts;
|
||||
|
||||
opts.mOptions = RS_TOKREQOPT_MSG_THREAD | RS_TOKREQOPT_MSG_LATEST;
|
||||
opts.mFlagsFilter = RSPOSTED_MSGTYPE_COMMENT;
|
||||
|
@ -212,7 +212,7 @@ void GxsCommentTreeWidget::service_loadThread(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
|
||||
RsPostedComment comment;
|
||||
while(rsPosted->getComment(token, comment))
|
||||
while(rsPostedVEG->getComment(token, comment))
|
||||
{
|
||||
/* convert to a QTreeWidgetItem */
|
||||
std::cerr << "GxsCommentTreeWidget::service_loadThread() Got Comment: " << comment;
|
||||
|
@ -286,7 +286,7 @@ QTreeWidgetItem *GxsCommentTreeWidget::service_createMissingItem(std::string par
|
|||
}
|
||||
|
||||
|
||||
void GxsCommentTreeWidget::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
void GxsCommentTreeWidget::loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req)
|
||||
{
|
||||
std::cerr << "GxsCommentTreeWidget::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "util/TokenQueue.h"
|
||||
#include "util/TokenQueueVEG.h"
|
||||
|
||||
/* indicies for search results item columns SR_ = Search Result */
|
||||
#define SR_NAME_COL 0
|
||||
|
@ -39,17 +39,17 @@
|
|||
|
||||
#define SR_ROLE_LOCAL Qt::UserRole
|
||||
|
||||
class GxsCommentTreeWidget : public QTreeWidget, public TokenResponse
|
||||
class GxsCommentTreeWidget : public QTreeWidget, public TokenResponseVEG
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GxsCommentTreeWidget(QWidget *parent = 0);
|
||||
void setup(RsTokenService *service);
|
||||
void setup(RsTokenServiceVEG *service);
|
||||
|
||||
void requestComments(std::string threadId);
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
void loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -73,8 +73,8 @@ protected:
|
|||
std::map<std::string, QTreeWidgetItem *> mLoadingMap;
|
||||
std::multimap<std::string, QTreeWidgetItem *> mPendingInsertMap;
|
||||
|
||||
TokenQueue *mTokenQueue;
|
||||
RsTokenService *mRsService;
|
||||
TokenQueueVEG *mTokenQueue;
|
||||
RsTokenServiceVEG *mRsService;
|
||||
|
||||
protected:
|
||||
//virtual QMimeData * mimeData ( const QList<QTreeWidgetItem *> items ) const;
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
#define GXSGROUP_LOADGROUP 2
|
||||
|
||||
/** Constructor */
|
||||
GxsGroupDialog::GxsGroupDialog(RsTokenService *service, QWidget *parent)
|
||||
GxsGroupDialog::GxsGroupDialog(RsTokenServiceVEG *service, QWidget *parent)
|
||||
: QDialog(parent), mRsService(service)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
mTokenQueue = new TokenQueue(service, this);
|
||||
mTokenQueue = new TokenQueueVEG(service, this);
|
||||
|
||||
// connect up the buttons.
|
||||
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelDialog( ) ) );
|
||||
|
@ -289,7 +289,7 @@ void GxsGroupDialog::existingGroup(std::string groupId, uint32_t mode)
|
|||
|
||||
/* request data */
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
RsTokReqOptionsVEG opts;
|
||||
|
||||
std::list<std::string> grpIds;
|
||||
grpIds.push_back(groupId);
|
||||
|
@ -605,7 +605,7 @@ void GxsGroupDialog::service_loadExistingGroup(const uint32_t &token)
|
|||
}
|
||||
|
||||
|
||||
void GxsGroupDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
void GxsGroupDialog::loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req)
|
||||
{
|
||||
std::cerr << "GxsGroupDialog::loadRequest() UserType: " << req.mUserType;
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "ui_GxsGroupDialog.h"
|
||||
|
||||
#include "util/TokenQueue.h"
|
||||
#include "util/TokenQueueVEG.h"
|
||||
|
||||
|
||||
/********
|
||||
|
@ -90,12 +90,12 @@ public:
|
|||
#define GXS_GROUP_DIALOG_SHOW_MODE 2
|
||||
#define GXS_GROUP_DIALOG_EDIT_MODE 3
|
||||
|
||||
class GxsGroupDialog : public QDialog, public TokenResponse
|
||||
class GxsGroupDialog : public QDialog, public TokenResponseVEG
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GxsGroupDialog(RsTokenService *service, QWidget *parent = 0);
|
||||
GxsGroupDialog(RsTokenServiceVEG *service, QWidget *parent = 0);
|
||||
|
||||
void setFlags(uint32_t enabledFlags, uint32_t readonlyFlags, uint32_t defaultFlags);
|
||||
void setMode(uint32_t mode);
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
void existingGroup(std::string groupId, uint32_t mode);
|
||||
|
||||
// Callback for all Loads.
|
||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
virtual void loadRequest(const TokenQueueVEG *queue, const TokenRequestVEG &req);
|
||||
|
||||
|
||||
// Functions that can be overloaded for specific stuff.
|
||||
|
@ -159,8 +159,8 @@ private:
|
|||
|
||||
QPixmap picture;
|
||||
|
||||
RsTokenService *mRsService;
|
||||
TokenQueue *mTokenQueue;
|
||||
RsTokenServiceVEG *mRsService;
|
||||
TokenQueueVEG *mTokenQueue;
|
||||
|
||||
uint32_t mMode;
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
|
||||
#include "PostedGroupDialog.h"
|
||||
|
||||
#include <retroshare/rsposted.h>
|
||||
#include <retroshare/rspostedVEG.h>
|
||||
#include <iostream>
|
||||
|
||||
PostedGroupDialog::PostedGroupDialog(QWidget *parent)
|
||||
:GxsGroupDialog(rsPosted, parent)
|
||||
:GxsGroupDialog(rsPostedVEG, parent)
|
||||
{
|
||||
|
||||
// To start with we only have open forums - with distribution controls.
|
||||
|
@ -66,11 +66,11 @@ PostedGroupDialog::PostedGroupDialog(QWidget *parent)
|
|||
bool PostedGroupDialog::service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta)
|
||||
{
|
||||
// Specific Function.
|
||||
RsPostedGroup grp;
|
||||
RsPostedGroup grp;
|
||||
grp.mMeta = meta;
|
||||
//grp.mDescription = std::string(desc.toUtf8());
|
||||
|
||||
rsPosted->submitGroup(token, grp, true);
|
||||
rsPostedVEG->submitGroup(token, grp, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void PostedGroupDialog::service_loadExistingGroup(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
|
||||
RsPostedGroup group;
|
||||
if (!rsPosted->getGroup(token, group))
|
||||
if (!rsPostedVEG->getGroup(token, group))
|
||||
{
|
||||
std::cerr << "PostedGroupDialog::service_loadExistingGroup() ERROR Getting Group";
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <retroshare/rsiface.h>
|
||||
|
||||
#include "gui/PhotoShare/PhotoShare.h"
|
||||
#include "gui/Posted/PostedDialog.h"
|
||||
|
||||
// THESE HAVE TO BE CONVERTED TO VEG FORMAT
|
||||
#if USE_VEG_SERVICE
|
||||
|
@ -40,7 +41,7 @@
|
|||
#include "gui/TheWire/WireDialog.h"
|
||||
#include "gui/Identity/IdDialog.h"
|
||||
#include "gui/ForumsV2Dialog.h"
|
||||
#include "gui/Posted/PostedDialog.h"
|
||||
|
||||
#endif
|
||||
|
||||
//#include "GamesDialog.h"
|
||||
|
@ -108,6 +109,9 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
|
|||
ui.stackPages->add(photoShare = new PhotoShare(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_PHOTO), tr("Photo Share"), grp));
|
||||
|
||||
PostedDialog *postedDialog = NULL;
|
||||
ui.stackPages->add(postedDialog = new PostedDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_LIBRARY), tr("Posted Links"), grp));
|
||||
// THESE HAVE TO BE CONVERTED TO VEG FORMAT
|
||||
#if USE_VEG_SERVICE
|
||||
WikiDialog *wikiDialog = NULL;
|
||||
|
@ -122,9 +126,7 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
|
|||
ui.stackPages->add(forumsV2Dialog = new ForumsV2Dialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FORUMSV2), tr("ForumsV2"), grp));
|
||||
|
||||
PostedDialog *postedDialog = NULL;
|
||||
ui.stackPages->add(postedDialog = new PostedDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_LIBRARY), tr("Posted Links"), grp));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*****/
|
||||
|
||||
/** Constructor */
|
||||
TokenQueueV2::TokenQueueV2(RsTokenServiceV2 *service, TokenResponseV2 *resp)
|
||||
TokenQueueV2::TokenQueueV2(RsTokenService *service, TokenResponseV2 *resp)
|
||||
:QWidget(NULL), mService(service), mResponder(resp)
|
||||
{
|
||||
return;
|
||||
|
@ -152,8 +152,8 @@ bool TokenQueueV2::checkForRequest(uint32_t token)
|
|||
{
|
||||
/* check token */
|
||||
uint32_t status = mService->requestStatus(token);
|
||||
return ( (RsTokenServiceV2::GXS_REQUEST_V2_STATUS_FAILED == status) ||
|
||||
(RsTokenServiceV2::GXS_REQUEST_V2_STATUS_COMPLETE == status) );
|
||||
return ( (RsTokenService::GXS_REQUEST_V2_STATUS_FAILED == status) ||
|
||||
(RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE == status) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class TokenQueueV2: public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TokenQueueV2(RsTokenServiceV2 *service, TokenResponseV2 *resp);
|
||||
TokenQueueV2(RsTokenService *service, TokenResponseV2 *resp);
|
||||
|
||||
/* generic handling of token / response update behaviour */
|
||||
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
/* Info for Data Requests */
|
||||
std::list<TokenRequestV2> mRequests;
|
||||
|
||||
RsTokenServiceV2 *mService;
|
||||
RsTokenService *mService;
|
||||
TokenResponseV2 *mResponder;
|
||||
|
||||
QTimer *mTrigger;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue