mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 09:05:24 -04:00
Improvements to the photoservice & underlying GS test service.
- added PublishTS and AuthorID to GropuMetaData. - added Mod & Set Flags to PhotoData. (mainly for the GUI). - added "isNew" parameter to sumbitPhoto/Album calls. - support modifications to Photos. - improved Photo Thumbnail handling. (still not right). - added LATEST msg search in GxsService. - added ATTRIB flags to rsphoto.h git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5238 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7a22d4fe69
commit
8af268e8c8
5 changed files with 198 additions and 32 deletions
|
@ -64,6 +64,7 @@
|
|||
#define RSGXS_MSG_STATUS_MASK 0x000f
|
||||
#define RSGXS_MSG_STATUS_READ 0x0001
|
||||
#define RSGXS_MSG_STATUS_UNREAD_BY_USER 0x0002
|
||||
#define RSGXS_MSG_STATUS_PROCESSED 0x0004 // By the Service.
|
||||
|
||||
|
||||
|
||||
|
@ -94,12 +95,17 @@ class RsGroupMetaData
|
|||
mMsgCount = 0;
|
||||
mLastPost = 0;
|
||||
mGroupStatus = 0;
|
||||
|
||||
//mPublishTs = 0;
|
||||
}
|
||||
|
||||
std::string mGroupId;
|
||||
std::string mGroupName;
|
||||
uint32_t mGroupFlags;
|
||||
|
||||
time_t mPublishTs; // Mandatory.
|
||||
std::string mAuthorId; // Optional.
|
||||
|
||||
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
|
||||
|
||||
uint32_t mSubscribeFlags;
|
||||
|
|
|
@ -47,6 +47,7 @@ class RsPhotoThumbnail
|
|||
RsPhotoThumbnail()
|
||||
:data(NULL), size(0), type("N/A") { return; }
|
||||
|
||||
bool deleteImage();
|
||||
bool copyFrom(const RsPhotoThumbnail &nail);
|
||||
|
||||
// Holds Thumbnail image.
|
||||
|
@ -55,17 +56,38 @@ class RsPhotoThumbnail
|
|||
std::string type;
|
||||
};
|
||||
|
||||
|
||||
/* If these flags are no set - the Photo inherits values from the Album
|
||||
*/
|
||||
|
||||
#define RSPHOTO_FLAGS_ATTRIB_TITLE 0x0001
|
||||
#define RSPHOTO_FLAGS_ATTRIB_CAPTION 0x0002
|
||||
#define RSPHOTO_FLAGS_ATTRIB_DESC 0x0004
|
||||
#define RSPHOTO_FLAGS_ATTRIB_PHOTOGRAPHER 0x0008
|
||||
#define RSPHOTO_FLAGS_ATTRIB_WHERE 0x0010
|
||||
#define RSPHOTO_FLAGS_ATTRIB_WHEN 0x0020
|
||||
#define RSPHOTO_FLAGS_ATTRIB_OTHER 0x0040
|
||||
#define RSPHOTO_FLAGS_ATTRIB_CATEGORY 0x0080
|
||||
#define RSPHOTO_FLAGS_ATTRIB_HASHTAGS 0x0100
|
||||
#define RSPHOTO_FLAGS_ATTRIB_ORDER 0x0200
|
||||
#define RSPHOTO_FLAGS_ATTRIB_THUMBNAIL 0x0400
|
||||
#define RSPHOTO_FLAGS_ATTRIB_MODE 0x0800
|
||||
#define RSPHOTO_FLAGS_ATTRIB_AUTHOR 0x1000 // PUSH UP ORDER
|
||||
#define RSPHOTO_FLAGS_ATTRIB_PHOTO 0x2000 // PUSH UP ORDER.
|
||||
|
||||
|
||||
class RsPhotoPhoto
|
||||
{
|
||||
public:
|
||||
|
||||
RsMsgMetaData mMeta;
|
||||
|
||||
RsPhotoPhoto();
|
||||
|
||||
// THESE ARE IN THE META DATA.
|
||||
//std::string mAlbumId;
|
||||
//std::string mId;
|
||||
//std::string mTitle; // only used by Album.
|
||||
|
||||
std::string mCaption;
|
||||
std::string mDescription;
|
||||
std::string mPhotographer;
|
||||
|
@ -76,12 +98,17 @@ class RsPhotoPhoto
|
|||
|
||||
std::string mHashTags;
|
||||
|
||||
uint32_t mSetFlags;
|
||||
|
||||
int mOrder;
|
||||
|
||||
RsPhotoThumbnail mThumbnail;
|
||||
|
||||
int mMode;
|
||||
|
||||
// These are not saved.
|
||||
std::string path; // if in Mode NEW.
|
||||
uint32_t mModFlags;
|
||||
};
|
||||
|
||||
class RsPhotoAlbumShare
|
||||
|
@ -98,6 +125,7 @@ class RsPhotoAlbumShare
|
|||
class RsPhotoAlbum
|
||||
{
|
||||
public:
|
||||
RsPhotoAlbum();
|
||||
|
||||
RsGroupMetaData mMeta;
|
||||
|
||||
|
@ -121,8 +149,15 @@ class RsPhotoAlbum
|
|||
|
||||
std::string mPhotoPath;
|
||||
RsPhotoAlbumShare mShareOptions;
|
||||
|
||||
// These aren't saved.
|
||||
uint32_t mSetFlags;
|
||||
uint32_t mModFlags;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const RsPhotoPhoto &photo);
|
||||
std::ostream &operator<<(std::ostream &out, const RsPhotoAlbum &album);
|
||||
|
||||
|
||||
class RsPhoto: public RsTokenService
|
||||
{
|
||||
|
@ -177,8 +212,8 @@ virtual bool getAlbum(const uint32_t &token, RsPhotoAlbum &album) = 0;
|
|||
virtual bool getPhoto(const uint32_t &token, RsPhotoPhoto &photo) = 0;
|
||||
|
||||
/* details are updated in album - to choose Album ID, and storage path */
|
||||
virtual bool submitAlbumDetails(RsPhotoAlbum &album) = 0;
|
||||
virtual bool submitPhoto(RsPhotoPhoto &photo) = 0;
|
||||
virtual bool submitAlbumDetails(RsPhotoAlbum &album, bool isNew) = 0;
|
||||
virtual bool submitPhoto(RsPhotoPhoto &photo, bool isNew) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue