2012-06-26 15:52:01 -04:00
|
|
|
#ifndef RSGXSMETA_H
|
|
|
|
#define RSGXSMETA_H
|
|
|
|
|
2012-08-06 17:00:38 -04:00
|
|
|
/*
|
|
|
|
* libretroshare/src/gxs: rsgxsdata.h
|
|
|
|
*
|
|
|
|
* Gxs Data types used to specific services
|
|
|
|
*
|
|
|
|
* Copyright 2012-2012 by Christopher Evi-Parker, Robert Fernie
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License Version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA.
|
|
|
|
*
|
|
|
|
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
#include <string>
|
2014-03-29 11:34:37 -04:00
|
|
|
|
|
|
|
#include <retroshare/rstypes.h>
|
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
#include "serialiser/rsserial.h"
|
|
|
|
#include "serialiser/rstlvkeys.h"
|
2012-07-26 17:48:54 -04:00
|
|
|
#include "serialiser/rsgxsitems.h"
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-26 17:48:54 -04:00
|
|
|
class RsGroupMetaData;
|
|
|
|
class RsMsgMetaData;
|
2012-07-22 17:38:15 -04:00
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
class RsGxsGrpMetaData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsGxsGrpMetaData();
|
|
|
|
bool deserialise(void *data, uint32_t &pktsize);
|
|
|
|
bool serialise(void* data, uint32_t &pktsize);
|
|
|
|
uint32_t serial_size();
|
2012-06-28 17:22:55 -04:00
|
|
|
void clear();
|
2012-07-26 17:48:54 -04:00
|
|
|
void operator =(const RsGroupMetaData& rMeta);
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsGroupId mGroupId;
|
|
|
|
RsGxsGroupId mOrigGrpId;
|
2012-06-26 15:52:01 -04:00
|
|
|
std::string mGroupName;
|
|
|
|
uint32_t mGroupFlags;
|
|
|
|
uint32_t mPublishTs;
|
2012-08-26 10:02:47 -04:00
|
|
|
uint32_t mSignFlags;
|
2014-03-17 16:56:06 -04:00
|
|
|
RsGxsId mAuthorId;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2014-03-17 16:56:06 -04:00
|
|
|
RsGxsCircleId mCircleId;
|
2012-12-02 14:40:17 -05:00
|
|
|
uint32_t mCircleType;
|
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-10-01 16:57:56 -04:00
|
|
|
RsTlvKeySignatureSet signSet;
|
2012-06-26 15:52:01 -04:00
|
|
|
RsTlvSecurityKeySet keys;
|
|
|
|
|
2012-08-18 06:01:35 -04:00
|
|
|
std::string mServiceString;
|
2013-06-04 17:00:43 -04:00
|
|
|
uint32_t mAuthenFlags;
|
2014-01-19 18:38:48 -05:00
|
|
|
RsGxsGroupId mParentGrpId;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
|
|
|
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
|
|
|
|
|
|
|
|
uint32_t mSubscribeFlags;
|
|
|
|
|
|
|
|
uint32_t mPop; // HOW DO WE DO THIS NOW.
|
|
|
|
uint32_t mMsgCount; // ???
|
2013-11-23 18:39:55 -05:00
|
|
|
uint32_t mLastPost; // ???
|
2014-02-22 19:08:11 -05:00
|
|
|
uint32_t mReputationCutOff;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
|
|
|
uint32_t mGroupStatus;
|
2013-11-23 18:39:55 -05:00
|
|
|
uint32_t mRecvTS;
|
2014-03-17 16:56:06 -04:00
|
|
|
RsPeerId mOriginator;
|
|
|
|
RsGxsCircleId mInternalCircle;
|
|
|
|
RsFileHash mHash;
|
2012-06-26 15:52:01 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class RsGxsMsgMetaData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2013-02-07 18:04:16 -05:00
|
|
|
explicit RsGxsMsgMetaData();
|
|
|
|
~RsGxsMsgMetaData();
|
2012-06-26 15:52:01 -04:00
|
|
|
bool deserialise(void *data, uint32_t *size);
|
|
|
|
bool serialise(void* data, uint32_t *size);
|
|
|
|
uint32_t serial_size();
|
2012-06-28 17:22:55 -04:00
|
|
|
void clear();
|
2012-07-26 17:48:54 -04:00
|
|
|
void operator =(const RsMsgMetaData& rMeta);
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsGroupId mGroupId;
|
|
|
|
RsGxsMessageId mMsgId;
|
2013-02-07 18:04:16 -05:00
|
|
|
static int refcount;
|
2012-07-22 17:38:15 -04:00
|
|
|
RsGxsMessageId mThreadId;
|
|
|
|
RsGxsMessageId mParentId;
|
|
|
|
RsGxsMessageId mOrigMsgId;
|
2014-03-17 16:56:06 -04:00
|
|
|
RsGxsId mAuthorId;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-10-01 16:57:56 -04:00
|
|
|
RsTlvKeySignatureSet signSet;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
2012-08-18 06:01:35 -04:00
|
|
|
std::string mServiceString;
|
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
std::string mMsgName;
|
|
|
|
time_t mPublishTs;
|
|
|
|
uint32_t mMsgFlags; // Whats this for?
|
|
|
|
|
|
|
|
// BELOW HERE IS LOCAL DATA, THAT IS NOT FROM MSG.
|
|
|
|
// normally READ / UNREAD flags. LOCAL Data.
|
2012-10-21 15:45:35 -04:00
|
|
|
|
2012-06-26 15:52:01 -04:00
|
|
|
uint32_t mMsgStatus;
|
|
|
|
time_t mChildTs;
|
2013-11-23 18:39:55 -05:00
|
|
|
uint32_t recvTS;
|
2014-03-17 16:56:06 -04:00
|
|
|
RsFileHash mHash;
|
2012-11-10 18:42:38 -05:00
|
|
|
bool validated;
|
2012-06-26 15:52:01 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // RSGXSMETA_H
|