From 5410a207563b18dbd62236caa739a338e76f3d15 Mon Sep 17 00:00:00 2001 From: drbob Date: Mon, 17 Mar 2008 14:03:47 +0000 Subject: [PATCH] Update notifications for Links Cloud and Photo Show. Improvements to the Photo system. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@382 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/RetroShare.pro | 3 + retroshare-gui/src/gui/LinksDialog.cpp | 26 +++- retroshare-gui/src/gui/LinksDialog.h | 2 + retroshare-gui/src/gui/PhotoDialog.cpp | 180 +++++++++++++++--------- retroshare-gui/src/gui/PhotoDialog.h | 7 +- retroshare-gui/src/gui/PhotoDialog.ui | 26 ++-- retroshare-gui/src/gui/PhotoShow.cpp | 162 +++++++++++++++++++++ retroshare-gui/src/gui/PhotoShow.h | 68 +++++++++ retroshare-gui/src/gui/PhotoShow.ui | 26 ++-- retroshare-gui/src/rsiface/notifyqt.cpp | 1 + retroshare-gui/src/rsiface/rsphoto.h | 11 +- retroshare-gui/src/rsiface/rsrank.h | 3 + 12 files changed, 424 insertions(+), 91 deletions(-) create mode 100644 retroshare-gui/src/gui/PhotoShow.cpp create mode 100644 retroshare-gui/src/gui/PhotoShow.h diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro index f15f897a7..74d1484a6 100644 --- a/retroshare-gui/src/RetroShare.pro +++ b/retroshare-gui/src/RetroShare.pro @@ -61,6 +61,7 @@ HEADERS += rshare.h \ gui/ExampleDialog.h \ gui/GamesDialog.h \ gui/PhotoDialog.h \ + gui/PhotoShow.h \ gui/LinksDialog.h \ gui/NetworkView.h \ gui/MessengerWindow.h \ @@ -150,6 +151,7 @@ FORMS += gui/ChatDialog.ui \ gui/ExampleDialog.ui \ gui/GamesDialog.ui \ gui/PhotoDialog.ui \ + gui/PhotoShow.ui \ gui/LinksDialog.ui \ gui/NetworkView.ui \ gui/MessengerWindow.ui \ @@ -213,6 +215,7 @@ SOURCES += main.cpp \ gui/ExampleDialog.cpp \ gui/GamesDialog.cpp \ gui/PhotoDialog.cpp \ + gui/PhotoShow.cpp \ gui/LinksDialog.cpp \ gui/NetworkView.cpp \ gui/MessengerWindow.cpp \ diff --git a/retroshare-gui/src/gui/LinksDialog.cpp b/retroshare-gui/src/gui/LinksDialog.cpp index e841450ff..6037efd50 100644 --- a/retroshare-gui/src/gui/LinksDialog.cpp +++ b/retroshare-gui/src/gui/LinksDialog.cpp @@ -44,7 +44,7 @@ #include #include #include - +#include /* Images for context menu icons */ #define IMAGE_REMOVEFRIEND ":/images/removefriend16.png" @@ -100,10 +100,34 @@ LinksDialog::LinksDialog(QWidget *parent) _header->resizeSection ( 1, 50 ); _header->resizeSection ( 2, 150 ); + + /* Set a GUI update timer - much cleaner than + * doing everything through the notify agent + */ + + QTimer *timer = new QTimer(this); + timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate())); + timer->start(1000); + /* Hide platform specific features */ #ifdef Q_WS_WIN #endif + +} + +void LinksDialog::checkUpdate() +{ + /* update */ + if (!rsRanks) + return; + + if (rsRanks->updated()) + { + updateLinks(); + } + + return; } void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point ) diff --git a/retroshare-gui/src/gui/LinksDialog.h b/retroshare-gui/src/gui/LinksDialog.h index f6083af77..f12e1c819 100644 --- a/retroshare-gui/src/gui/LinksDialog.h +++ b/retroshare-gui/src/gui/LinksDialog.h @@ -57,6 +57,8 @@ void toggleWindows( void ); void openLink ( QTreeWidgetItem * item, int column ); void changedItem(QTreeWidgetItem *curr, QTreeWidgetItem *prev); + +void checkUpdate(); private: diff --git a/retroshare-gui/src/gui/PhotoDialog.cpp b/retroshare-gui/src/gui/PhotoDialog.cpp index e9ba79202..2c5436d76 100644 --- a/retroshare-gui/src/gui/PhotoDialog.cpp +++ b/retroshare-gui/src/gui/PhotoDialog.cpp @@ -24,6 +24,7 @@ #include "common/vmessagebox.h" #include "PhotoDialog.h" +#include "PhotoShow.h" #include "rsiface/rspeers.h" #include "rsiface/rsphoto.h" @@ -38,6 +39,7 @@ #include #include #include +#include /* Images for context menu icons */ @@ -58,11 +60,14 @@ #define PHOTO_PEER_COL_SID 4 #define PHOTO_PEER_COL_PHOTOID 5 - #define PHOTO_LIST_COL_PHOTO 0 -#define PHOTO_LIST_COL_COMMENT 1 -#define PHOTO_LIST_COL_PHOTOID 2 - +#define PHOTO_LIST_COL_NAME 1 +#define PHOTO_LIST_COL_COMMENT 2 +#define PHOTO_LIST_COL_DATE 3 +#define PHOTO_LIST_COL_LOCATION 4 +#define PHOTO_LIST_COL_SIZE 5 +#define PHOTO_LIST_COL_PEERID 6 +#define PHOTO_LIST_COL_PHOTOID 7 /** Constructor */ @@ -77,10 +82,8 @@ PhotoDialog::PhotoDialog(QWidget *parent) connect( ui.peerTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem * , QTreeWidgetItem * ) ), this, SLOT( updatePhotoList( ) ) ); - //connect( ui.photoTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem * , QTreeWidgetItem * ) ), this, SLOT( displayPhoto( ) ) ); - //connect( ui.addPhotoButton, SIGNAL( clicked( ) ), this, SLOT( addPhotos( ) ) ); - - + connect( ui.photoTreeWidget, SIGNAL( itemDoubleClicked ( QTreeWidgetItem * , int ) ), this, SLOT( showPhoto( QTreeWidgetItem *, int ) ) ); + connect( ui.addButton, SIGNAL( clicked( ) ), this, SLOT( addPhotos( ) ) ); /* hide the Tree +/- */ ui.photoTreeWidget -> setRootIsDecorated( false ); @@ -116,12 +119,36 @@ PhotoDialog::PhotoDialog(QWidget *parent) // _header->resizeSection ( 10, 100 ); + /* Set a GUI update timer - much cleaner than + * doing everything through the notify agent + */ + + QTimer *timer = new QTimer(this); + timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate())); + timer->start(1000); + /* Hide platform specific features */ #ifdef Q_WS_WIN #endif + } +void PhotoDialog::checkUpdate() +{ + /* update */ + if (!rsPhoto) + return; + + if (rsPhoto->updated()) + { + insertShowLists(); + } + + return; +} + + void PhotoDialog::peerTreeWidgetCustomPopupMenu( QPoint point ) { @@ -240,12 +267,15 @@ void PhotoDialog::addShows(std::string id) void PhotoDialog::updatePhotoList() { + std::cerr << "PhotoDialog::updatePhotoList()" << std::endl; + /* get current item */ QTreeWidgetItem *item = ui.peerTreeWidget->currentItem(); if (!item) { /* leave current list */ + std::cerr << "PhotoDialog::updatePhotoList() No Current item -> leave" << std::endl; return; } @@ -256,9 +286,11 @@ void PhotoDialog::updatePhotoList() if ((mCurrentPID == pid) && (mCurrentSID == sid)) { /* still good */ + std::cerr << "PhotoDialog::updatePhotoList() List still good!" << std::endl; return; } + std::cerr << "PhotoDialog::updatePhotoList() pid: " << pid << " sid: " << sid << std::endl; /* get the list of photos */ ui.photoTreeWidget->clear(); @@ -266,6 +298,7 @@ void PhotoDialog::updatePhotoList() if (sid != "") { + std::cerr << "PhotoDialog::updatePhotoList() SID -> showing show" << std::endl; /* load up show list */ RsPhotoShowDetails detail; rsPhoto->getShowDetails(pid, sid, detail); @@ -278,6 +311,7 @@ void PhotoDialog::updatePhotoList() if (!rsPhoto->getPhotoDetails(pid, sit->photoId, photoDetail)) { + std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << sit->photoId << " FAILED" << std::endl; continue; } @@ -296,8 +330,18 @@ void PhotoDialog::updatePhotoList() photoItem->setText(PHOTO_LIST_COL_PHOTO, "Photo Not Available"); } + photoItem->setText(PHOTO_LIST_COL_NAME, + QString::fromStdString(photoDetail.name)); photoItem->setText(PHOTO_LIST_COL_COMMENT, QString::fromStdWString(photoDetail.comment)); + photoItem->setText(PHOTO_LIST_COL_DATE, + QString::fromStdString(photoDetail.date)); + photoItem->setText(PHOTO_LIST_COL_LOCATION, + QString::fromStdString(photoDetail.location)); + photoItem->setText(PHOTO_LIST_COL_SIZE, + QString::number(photoDetail.size)); + photoItem->setText(PHOTO_LIST_COL_PEERID, + QString::fromStdString(photoDetail.id)); photoItem->setText(PHOTO_LIST_COL_PHOTOID, QString::fromStdString(photoDetail.hash)); @@ -306,9 +350,62 @@ void PhotoDialog::updatePhotoList() } else { + std::cerr << "PhotoDialog::updatePhotoList() No SID -> show all" << std::endl; + + std::list photoIds; + std::list::iterator pit; + rsPhoto->getPhotoList(pid, photoIds); + for(pit = photoIds.begin(); pit != photoIds.end(); pit++) + { + RsPhotoDetails photoDetail; + + if (!rsPhoto->getPhotoDetails(pid, *pit, photoDetail)) + { + std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << *pit << " FAILED" << std::endl; + continue; + } + + QTreeWidgetItem *photoItem = new QTreeWidgetItem((QTreeWidget*)0); + if (photoDetail.isAvailable) + { + QPixmap qpp(QString::fromStdString(photoDetail.path)); + photoItem->setIcon(PHOTO_LIST_COL_PHOTO, + QIcon(qpp.scaledToHeight(PHOTO_ICON_SIZE))); + + QSize iconSize(PHOTO_ICON_SIZE + 10,PHOTO_ICON_SIZE + 10); + photoItem->setSizeHint(PHOTO_LIST_COL_PHOTO, iconSize); + } + else + { + photoItem->setText(PHOTO_LIST_COL_PHOTO, "Photo Not Available"); + } + + photoItem->setText(PHOTO_LIST_COL_NAME, + QString::fromStdString(photoDetail.name)); + photoItem->setText(PHOTO_LIST_COL_COMMENT, + QString::fromStdWString(photoDetail.comment)); + photoItem->setText(PHOTO_LIST_COL_DATE, + QString::fromStdString(photoDetail.date)); + photoItem->setText(PHOTO_LIST_COL_LOCATION, + QString::fromStdString(photoDetail.location)); + photoItem->setText(PHOTO_LIST_COL_SIZE, + QString::number(photoDetail.size)); + photoItem->setText(PHOTO_LIST_COL_PEERID, + QString::fromStdString(photoDetail.id)); + photoItem->setText(PHOTO_LIST_COL_PHOTOID, + QString::fromStdString(photoDetail.hash)); + + + std::cerr << "PhotoDialog::updatePhotoList() added Item: " << *pit << std::endl; + items.append(photoItem); + } } + /* update ids? */ + mCurrentPID = pid; + mCurrentSID = sid; + /* add the items in! */ ui.photoTreeWidget->insertTopLevelItems(0, items); ui.photoTreeWidget->update(); @@ -371,69 +468,26 @@ void PhotoDialog::addPhotos() void PhotoDialog::addPhoto(QString filename) { - /* load pixmap */ + /* store in rsPhoto */ + std::string photoId = rsPhoto->addPhoto(filename.toStdString()); - /* add QTreeWidgetItem */ - QPixmap *qpp = new QPixmap(filename); - - /* store in map */ - photoMap[filename] = qpp; - - /* add treeitem */ - QTreeWidgetItem *item = new QTreeWidgetItem(NULL); - - /* */ - item->setText(0, "Yourself"); - item->setText(2, filename); - - item->setIcon(1, QIcon(qpp->scaledToHeight(PHOTO_ICON_SIZE))); - QSize iconSize(PHOTO_ICON_SIZE + 10,PHOTO_ICON_SIZE + 10); - item->setSizeHint(1, iconSize); - - - //item->setIcon(1, QIcon(*qpp)); - - ui.photoTreeWidget->insertTopLevelItem (0, item); - - showPhoto(filename); } -void PhotoDialog::updatePhoto() +void PhotoDialog::showPhoto( QTreeWidgetItem *item, int column) { - /* load pixmap */ - QTreeWidgetItem *item = ui.photoTreeWidget->currentItem(); if (!item) - { - showPhoto(""); - } - - showPhoto(item->text(2)); -} - - - -void PhotoDialog::showPhoto(QString filename) -{ - -#if 0 - /* find in map */ - std::map::iterator it; - it = photoMap.find(filename); - if (it == photoMap.end()) - { - ui.photoPixLabel->clear(); - ui.photoPixLabel->setText("No Photo Selected"); - ui.photoNameLabel->setText("No Photo File Selected"); return; - } - - QSize diaSize = ui.photoTreeWidget->size(); - int width = diaSize.width(); - ui.photoPixLabel->setPixmap((it->second)->scaledToWidth(width)); - ui.photoNameLabel->setText(filename); -#endif + /* get the photoId */ + std::string pid = item->text(PHOTO_LIST_COL_PEERID).toStdString(); + std::string photoid = item->text(PHOTO_LIST_COL_PHOTOID).toStdString(); + + PhotoShow *newView = new PhotoShow(); + newView->show(); + + newView->setPeerId(pid); + newView->setPhotoId(photoid); return; } diff --git a/retroshare-gui/src/gui/PhotoDialog.h b/retroshare-gui/src/gui/PhotoDialog.h index 0c9e2c424..7ce871993 100644 --- a/retroshare-gui/src/gui/PhotoDialog.h +++ b/retroshare-gui/src/gui/PhotoDialog.h @@ -49,17 +49,18 @@ private slots: void updatePhotoList(); - void removePhoto(); - void updatePhoto(); void addPhotos(); + void checkUpdate(); + + void showPhoto( QTreeWidgetItem *item, int column); + private: void addShows(std::string peerid); void addPhoto(QString filename); - void showPhoto(QString filename); /* Worker Functions */ /* (1) Update Display */ diff --git a/retroshare-gui/src/gui/PhotoDialog.ui b/retroshare-gui/src/gui/PhotoDialog.ui index 32210812a..f6bd77f9d 100644 --- a/retroshare-gui/src/gui/PhotoDialog.ui +++ b/retroshare-gui/src/gui/PhotoDialog.ui @@ -18,7 +18,7 @@ Qt::Vertical - + @@ -49,11 +49,6 @@ Qt::CustomContextMenu - - - Friend / Set - - Thumb Image @@ -64,6 +59,11 @@ Image Name + + + Comment + + Date @@ -76,7 +76,17 @@ - Comment + Size + + + + + PeerId + + + + + PhotoId @@ -132,7 +142,7 @@ - + diff --git a/retroshare-gui/src/gui/PhotoShow.cpp b/retroshare-gui/src/gui/PhotoShow.cpp new file mode 100644 index 000000000..3f9ff7dc2 --- /dev/null +++ b/retroshare-gui/src/gui/PhotoShow.cpp @@ -0,0 +1,162 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2008 Robert Fernie + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#include +#include +#include "common/vmessagebox.h" + +#include "PhotoShow.h" +#include "rsiface/rspeers.h" +#include "rsiface/rsphoto.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/** Constructor */ +PhotoShow::PhotoShow(QWidget *parent) +: QWidget(parent) +{ + /* Invoke the Qt Designer generated object setup routine */ + ui.setupUi(this); + + // connect( ui.peerTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( peerTreeWidgetCustomPopupMenu( QPoint ) ) ); + // connect( ui.photoTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( photoTreeWidgetCustomPopupMenu( QPoint ) ) ); + + // connect( ui.peerTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem * , QTreeWidgetItem * ) ), this, SLOT( updatePhotoList( ) ) ); + + //connect( ui.photoTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem * , QTreeWidgetItem * ) ), this, SLOT( displayPhoto( ) ) ); + //connect( ui.addButton, SIGNAL( clicked( ) ), this, SLOT( addPhotos( ) ) ); + + + /* Hide platform specific features */ +#ifdef Q_WS_WIN + +#endif + +} + +void PhotoShow::photoCustomPopupMenu( QPoint point ) +{ + +// QMenu contextMnu( this ); +// QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier ); +// +// QAction *rm = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Remove" ), this ); +// connect( rm , SIGNAL( triggered() ), this, SLOT( removePhoto() ) ); +// +// contextMnu.clear(); +// contextMnu.addAction(rm); +// contextMnu.addSeparator(); +// contextMnu.exec( mevent->globalPos() ); +} + +void PhotoShow::updatePhotoShow() +{ + std::cerr << "PhotoShow::updatePhotoShow()" << std::endl; + + if (mDoShow) + { + std::cerr << "PhotoShow::updatePhotoShow() (Show) pid: " << mPeerId << " sid: " << mShowId << std::endl; + } + else + { + std::cerr << "PhotoShow::updatePhotoShow() (Image) pid: " << mPeerId << " photoId: " << mPhotoId << std::endl; + updatePhoto(mPeerId, mPhotoId); + } + +} + +void PhotoShow::updatePhoto(std::string pid, std::string photoId) +{ + RsPhotoDetails photoDetail; + std::cerr << "PhotoShow::updatePhoto() pid: "; + std::cerr << pid << " photoId: " << photoId; + std::cerr << std::endl; + + if (!rsPhoto->getPhotoDetails(pid, photoId, photoDetail)) + { + std::cerr << "PhotoShow::updatePhotoShow() BAD Photo Id"; + std::cerr << std::endl; + return; + } + + ui.photoLabel->clear(); + + if (photoDetail.isAvailable) + { + QPixmap qpp(QString::fromStdString(photoDetail.path)); + QSize diaSize = ui.photoLabel->size(); + int width = diaSize.width(); + ui.photoLabel->setPixmap(qpp.scaledToWidth(width)); + } + else + { + ui.photoLabel->setText("Photo Not Available"); + } + + ui.commentLineEdit->setText(QString::fromStdWString(photoDetail.comment)); + ui.dateLineEdit->setText(QString::fromStdString(photoDetail.date)); + ui.locLineEdit->setText(QString::fromStdString(photoDetail.location)); + + //ui.nameLineEdit->setText(QString::fromStdString(photoDetail.name)); + //ui.sizeLineEdit->setText(QString::number(photoDetail.size)); + //ui.peeridLineEdit->setText(QString::fromStdString(photoDetail.id)); + //ui.photoidLineEdit->setText(QString::fromStdString(photoDetail.hash)); + +} + +void PhotoShow::setPeerId(std::string id) +{ + mPeerId = id; + return; +} + +void PhotoShow::setPhotoId(std::string id) +{ + mPhotoId = id; + mDoShow = false; + + updatePhotoShow(); + return; +} + +void PhotoShow::setPhotoShow(std::string id) +{ + mShowId = id; + mDoShow = true; + + updatePhotoShow(); + return; +} + + + diff --git a/retroshare-gui/src/gui/PhotoShow.h b/retroshare-gui/src/gui/PhotoShow.h new file mode 100644 index 000000000..708b01f4c --- /dev/null +++ b/retroshare-gui/src/gui/PhotoShow.h @@ -0,0 +1,68 @@ +/**************************************************************** + * RShare is distributed under the following license: + * + * Copyright (C) 2008 Robert Fernie + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#ifndef _PHOTOSHOW_H +#define _PHOTOSHOW_H + +#include + +#include "mainpage.h" +#include "ui_PhotoShow.h" + +#include + + +class PhotoShow : public QWidget +{ + Q_OBJECT + +public: + /** Default Constructor */ + PhotoShow(QWidget *parent = 0); + /** Default Destructor */ + + void setPeerId(std::string id); + void setPhotoId(std::string id); + void setPhotoShow(std::string id); + + +private slots: + /** Create the context popup menu and it's submenus */ + void photoCustomPopupMenu( QPoint point ); + + void updatePhotoShow(); + + +private: + + void updatePhoto(std::string pid, std::string photoId); + + bool mDoShow; + std::string mPeerId; + std::string mShowId; + std::string mPhotoId; + + /** Qt Designer generated object */ + Ui::PhotoShow ui; +}; + +#endif + diff --git a/retroshare-gui/src/gui/PhotoShow.ui b/retroshare-gui/src/gui/PhotoShow.ui index f236560e1..056cb29ea 100644 --- a/retroshare-gui/src/gui/PhotoShow.ui +++ b/retroshare-gui/src/gui/PhotoShow.ui @@ -45,13 +45,13 @@ - + - + - + @@ -67,7 +67,7 @@ - + 320 x 320 @@ -93,7 +93,7 @@ - + 1 Sec @@ -140,14 +140,14 @@ - + Edit Photo Details - + Save Photo @@ -156,7 +156,7 @@ - + No Photo Selected @@ -178,35 +178,35 @@ - + Start - + Back - + Play - + Pause - + Forward diff --git a/retroshare-gui/src/rsiface/notifyqt.cpp b/retroshare-gui/src/rsiface/notifyqt.cpp index 8f5e2b129..c8c27a07a 100644 --- a/retroshare-gui/src/rsiface/notifyqt.cpp +++ b/retroshare-gui/src/rsiface/notifyqt.cpp @@ -2,6 +2,7 @@ #include "rsiface/notifyqt.h" #include "rsiface/rsnotify.h" #include "rsiface/rspeers.h" +#include "rsiface/rsphoto.h" #include "gui/NetworkDialog.h" #include "gui/PeersDialog.h" diff --git a/retroshare-gui/src/rsiface/rsphoto.h b/retroshare-gui/src/rsiface/rsphoto.h index 2799f127c..9a16cce4f 100644 --- a/retroshare-gui/src/rsiface/rsphoto.h +++ b/retroshare-gui/src/rsiface/rsphoto.h @@ -73,10 +73,12 @@ class RsPhotoDetails std::string srcid; std::string hash; + uint64_t size; std::string name; - std::wstring location; std::wstring comment; + + std::string location; std::string date; uint32_t format; @@ -95,9 +97,12 @@ class RsPhoto RsPhoto() { return; } virtual ~RsPhoto() { return; } + /* changed? */ +virtual bool updated() = 0; + /* access data */ -virtual bool getPhotoList(std::string id, std::list hashs) = 0; -virtual bool getShowList(std::string id, std::list showIds) = 0; +virtual bool getPhotoList(std::string id, std::list &hashs) = 0; +virtual bool getShowList(std::string id, std::list &showIds) = 0; virtual bool getShowDetails(std::string id, std::string showId, RsPhotoShowDetails &detail) = 0; virtual bool getPhotoDetails(std::string id, std::string photoId, RsPhotoDetails &detail) = 0; diff --git a/retroshare-gui/src/rsiface/rsrank.h b/retroshare-gui/src/rsiface/rsrank.h index 5c6197d78..f99bab4d5 100644 --- a/retroshare-gui/src/rsiface/rsrank.h +++ b/retroshare-gui/src/rsiface/rsrank.h @@ -69,6 +69,9 @@ class RsRanks RsRanks() { return; } virtual ~RsRanks() { return; } + /* needs update? */ +virtual bool updated() = 0; + /* Set Sort Methods */ virtual bool setSortPeriod(uint32_t period) = 0; virtual bool setSortMethod(uint32_t type) = 0;