mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
added base item declarations for nxs and gxs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5132 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e560e00029
commit
79062f742e
4 changed files with 414 additions and 0 deletions
109
libretroshare/src/serialiser/rsgxsitems.h
Normal file
109
libretroshare/src/serialiser/rsgxsitems.h
Normal file
|
@ -0,0 +1,109 @@
|
|||
#ifndef RSGXSITEMS_H
|
||||
#define RSGXSITEMS_H
|
||||
|
||||
/*
|
||||
* libretroshare/src/serialiser: rsgxsitems.h
|
||||
*
|
||||
* RetroShare Serialiser.
|
||||
*
|
||||
* Copyright 2012 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".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "serialiser/rsserviceids.h"
|
||||
#include "serialiser/rsserial.h"
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "serialiser/rstlvtypes.h"
|
||||
#include "serialiser/rstlvkeys.h"
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Base class for messages
|
||||
*
|
||||
*
|
||||
*/
|
||||
class RsGxsMsg : public RsItem
|
||||
{
|
||||
|
||||
std::string grpId;
|
||||
std::string msgId;
|
||||
std::list<uint32_t> versions;
|
||||
uint32_t flags;
|
||||
uint32_t type;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class RsGxsSignedMsg : public RsItem
|
||||
{
|
||||
|
||||
RsGxsSignedMsg(uint16_t servtype, uint8_t subtype)
|
||||
: RsItem(RS_PKT_VERSION_SERVICE, servtype, subtype) { return; }
|
||||
|
||||
virtual ~RsGxsSignedMsg() { return; }
|
||||
|
||||
virtual void clear();
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
uint32_t timestamp;
|
||||
RsTlvBinaryData data;
|
||||
RsTlvBinaryData signature;
|
||||
};
|
||||
|
||||
/*!
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
class RsGxsGroup : public RsItem
|
||||
{
|
||||
|
||||
|
||||
RsGxsGroup(uint16_t servtype, uint8_t subtype)
|
||||
: RsItem() { return; }
|
||||
|
||||
};
|
||||
|
||||
class RsGxsKey : public RsItem {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
class RsGxsSerialiser : public RsSerialType
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // RSGXSITEMS_H
|
Loading…
Add table
Add a link
Reference in a new issue