Added Rs photo v2 item serialisation test, fixed subsequent bugs

Reactivated Photodialog. almost completed integration, publishing and item storage working, 
but data retrieval algorithm needs to be changed (request flags need to be translated, based on update call rather than client assumption)
fixed bug in rsgenexchange notification. 
Added LGPL notices


git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5387 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-08-06 21:00:38 +00:00
parent 3948234310
commit a715947046
35 changed files with 916 additions and 350 deletions

View file

@ -17,6 +17,7 @@ class RsGxsNotify
{
public:
RsGxsNotify(){ return; }
virtual ~RsGxsNotify() {return; }
};

View file

@ -30,6 +30,7 @@
#include <string>
#include <list>
#include "rsgxsservice.h"
#include "rsphoto.h"
/* The Main Interface Class - for information about your Peers */
class RsPhotoV2;
@ -41,20 +42,20 @@ extern RsPhotoV2 *rsPhotoV2;
#define RSPHOTO_MODE_OWN 2
#define RSPHOTO_MODE_REMOTE 3
class RsPhotoThumbnail
{
public:
RsPhotoThumbnail()
:data(NULL), size(0), type("N/A") { return; }
bool deleteImage();
bool copyFrom(const RsPhotoThumbnail &nail);
// Holds Thumbnail image.
uint8_t *data;
int size;
std::string type;
};
//class RsPhotoThumbnail
//{
// public:
// RsPhotoThumbnail()
// :data(NULL), size(0), type("N/A") { return; }
//
// bool deleteImage();
// bool copyFrom(const RsPhotoThumbnail &nail);
//
// // Holds Thumbnail image.
// uint8_t *data;
// int size;
// std::string type;
//};
/* If these flags are no set - the Photo inherits values from the Album
@ -76,84 +77,84 @@ class RsPhotoThumbnail
#define RSPHOTO_FLAGS_ATTRIB_PHOTO 0x2000 // PUSH UP ORDER.
class RsPhotoPhoto
{
public:
//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;
// std::string mWhere;
// std::string mWhen;
// std::string mOther;
// std::string mCategory;
//
// 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;
//};
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;
std::string mWhere;
std::string mWhen;
std::string mOther;
std::string mCategory;
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
{
public:
uint32_t mShareType;
std::string mShareGroupId;
std::string mPublishKey;
uint32_t mCommentMode;
uint32_t mResizeMode;
};
class RsPhotoAlbum
{
public:
RsPhotoAlbum();
RsGroupMetaData mMeta;
// THESE ARE IN THE META DATA.
//std::string mAlbumId;
//std::string mTitle; // only used by Album.
std::string mCaption;
std::string mDescription;
std::string mPhotographer;
std::string mWhere;
std::string mWhen;
std::string mOther;
std::string mCategory;
std::string mHashTags;
RsPhotoThumbnail mThumbnail;
int mMode;
std::string mPhotoPath;
RsPhotoAlbumShare mShareOptions;
// These aren't saved.
uint32_t mSetFlags;
uint32_t mModFlags;
};
//class RsPhotoAlbumShare
//{
// public:
//
// uint32_t mShareType;
// std::string mShareGroupId;
// std::string mPublishKey;
// uint32_t mCommentMode;
// uint32_t mResizeMode;
//};
//
//class RsPhotoAlbum
//{
// public:
// RsPhotoAlbum();
//
// RsGroupMetaData mMeta;
//
// // THESE ARE IN THE META DATA.
// //std::string mAlbumId;
// //std::string mTitle; // only used by Album.
//
// std::string mCaption;
// std::string mDescription;
// std::string mPhotographer;
// std::string mWhere;
// std::string mWhen;
// std::string mOther;
// std::string mCategory;
//
// std::string mHashTags;
//
// RsPhotoThumbnail mThumbnail;
//
// int mMode;
//
// 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);