mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
moved photo items to rsitems/
This commit is contained in:
parent
634efb6142
commit
688813fbf5
@ -851,10 +851,10 @@ gxsphotoshare {
|
||||
#Photo Service
|
||||
HEADERS += services/p3photoservice.h \
|
||||
retroshare/rsphoto.h \
|
||||
serialiser/rsphotoitems.h \
|
||||
rsitems/rsphotoitems.h \
|
||||
|
||||
SOURCES += services/p3photoservice.cc \
|
||||
serialiser/rsphotoitems.cc \
|
||||
rsitems/rsphotoitems.cc \
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@ class RsPhotoThumbnail
|
||||
|
||||
// Holds Thumbnail image.
|
||||
uint8_t *data;
|
||||
int size;
|
||||
uint32_t size;
|
||||
std::string type;
|
||||
};
|
||||
|
||||
|
@ -25,15 +25,15 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "serialiser/rsphotoitems.h"
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "rsitems/rsphotoitems.h"
|
||||
|
||||
#include "serialiser/rstlvbinary.h"
|
||||
#include "serialiser/rsbaseserial.h"
|
||||
#include "serialization/rstypeserializer.h"
|
||||
|
||||
#define GXS_PHOTO_SERIAL_DEBUG
|
||||
|
||||
|
||||
virtual RsItem *create_item(uint16_t service, uint8_t item_sub_id) const
|
||||
RsItem *RsGxsPhotoSerialiser::create_item(uint16_t service, uint8_t item_sub_id) const
|
||||
{
|
||||
if(service != RS_SERVICE_GXS_TYPE_PHOTO)
|
||||
return NULL ;
|
@ -188,6 +188,34 @@ bool RsTlvBinaryData::GetTlv(void *data, uint32_t size, uint32_t *offset)
|
||||
|
||||
return ok;
|
||||
}
|
||||
std::ostream &RsTlvBinaryDataRef::print(std::ostream &out, uint16_t indent) const
|
||||
{
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
uint32_t i;
|
||||
std::ostringstream sout;
|
||||
printIndent(sout, indent);
|
||||
sout << "RsTlvBinaryData: Type: " << tlvtype << " Size: " << mSizeRef;
|
||||
sout << std::hex;
|
||||
|
||||
for(i = 0; i < mSizeRef; i++)
|
||||
{
|
||||
if (i % 16 == 0)
|
||||
{
|
||||
sout << std::endl;
|
||||
printIndent(sout, int_Indent);
|
||||
}
|
||||
sout << std::setw(2) << std::setfill('0')
|
||||
<< (int) (((unsigned char *) mDataRef)[i]) << ":";
|
||||
}
|
||||
|
||||
sout << std::endl;
|
||||
out << sout.str();
|
||||
|
||||
printEnd(out, "RsTlvBinaryData", indent);
|
||||
return out;
|
||||
|
||||
}
|
||||
|
||||
std::ostream &RsTlvBinaryData::print(std::ostream &out, uint16_t indent) const
|
||||
{
|
||||
|
@ -72,6 +72,8 @@ public:
|
||||
RsTlvBinaryDataRef(uint16_t type,uint8_t *& data_ref,uint32_t& size_ref) : mDataRef(data_ref),mSizeRef(size_ref),tlvtype(type) {}
|
||||
virtual ~RsTlvBinaryDataRef() {}
|
||||
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
|
||||
|
||||
virtual uint32_t TlvSize() const;
|
||||
virtual void TlvClear(){}
|
||||
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "p3photoservice.h"
|
||||
#include "serialiser/rsphotoitems.h"
|
||||
#include "rsitems/rsphotoitems.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
|
||||
RsPhoto *rsPhoto = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user