2012-05-01 16:52:07 -04:00
|
|
|
#ifndef RSNXSITEMS_H
|
|
|
|
#define RSNXSITEMS_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* libretroshare/src/serialiser: rsnxssitems.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"
|
|
|
|
|
|
|
|
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_SYNC_GRP = 0x0001;
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_SYNC_GRP_LIST = 0x0002;
|
2012-05-21 18:07:43 -04:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_NXS_GRP = 0x0004;
|
2012-05-05 15:55:24 -04:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_SYNC_MSG = 0x0008;
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_SYNC_MSG_LIST = 0x0010;
|
2012-05-21 18:07:43 -04:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_NXS_MSG = 0x0020;
|
2012-05-05 15:55:24 -04:00
|
|
|
const uint8_t RS_PKT_SUBTYPE_SEARCH_REQ = 0x0040;
|
2012-05-21 18:07:43 -04:00
|
|
|
|
|
|
|
// possibility create second service to deal with this functionality
|
|
|
|
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_NXS_EXTENDED = 0x0080; // in order to extend supported pkt subtypes
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_EXT_SEARCH_GRP = 0x0001;
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_EXT_SEARCH_MSG = 0x0002;
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_EXT_DELETE_GRP = 0x0004;
|
|
|
|
const uint8_t RS_PKT_SUBTYPE_EXT_DELETE_MSG = 0x0008;
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Base class for Network exchange service
|
2012-05-05 15:55:24 -04:00
|
|
|
* Main purpose is for rtti based routing used in the
|
|
|
|
* serialisation and deserialisation of NXS packets
|
2012-05-01 16:52:07 -04:00
|
|
|
*
|
|
|
|
* Service type is set by plugin service
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsNxsItem : public RsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2012-05-06 10:29:50 -04:00
|
|
|
RsNxsItem(uint16_t servtype, uint8_t subtype)
|
2012-05-01 16:52:07 -04:00
|
|
|
: RsItem(RS_PKT_VERSION_SERVICE, servtype, subtype) { return; }
|
2012-05-05 15:55:24 -04:00
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
virtual void clear() = 0;
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0) = 0;
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Use to request grp list from peer
|
|
|
|
* Server may advise client peer to use sync file
|
|
|
|
* while serving his request. This results
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsSyncGrp : public RsNxsItem {
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
2012-05-21 18:07:43 -04:00
|
|
|
static const uint8_t FLAG_ONLY_CURRENT; // only send most current sycn list
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
RsSyncGrp(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_SYNC_GRP) { return;}
|
|
|
|
|
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
uint8_t flag; // advises whether to use sync hash
|
|
|
|
uint32_t syncAge; // how far back to sync data
|
|
|
|
std::string syncHash; // use to determine if changes that have occured since last hash
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Use to send to peer list of grps
|
|
|
|
* held by server peer
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsSyncGrpList : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
static const uint8_t FLAG_REQUEST;
|
|
|
|
static const uint8_t FLAG_RESPONSE;
|
2012-05-21 18:07:43 -04:00
|
|
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
RsSyncGrpList(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_SYNC_GRP_LIST) { return ; }
|
2012-05-24 18:38:59 -04:00
|
|
|
virtual ~RsSyncGrpList() { return; }
|
2012-05-06 10:29:50 -04:00
|
|
|
|
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
|
|
|
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
uint8_t flag; // request or response
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
/// groups held by sending peer
|
2012-05-24 18:38:59 -04:00
|
|
|
RsTlvKeySignature adminSign;
|
|
|
|
std::string grpId;
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Contains serialised group items
|
|
|
|
* Each item corresponds to a group which needs to be
|
|
|
|
* deserialised
|
|
|
|
*/
|
2012-05-21 18:07:43 -04:00
|
|
|
class RsNxsGrp : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
2012-05-21 18:07:43 -04:00
|
|
|
|
|
|
|
RsNxsGrp(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_GRP), grp(servtype) { return; }
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
|
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
std::string grpId; /// group Id, needed to complete version Id (ncvi)
|
|
|
|
uint32_t timeStamp; /// UTC time, ncvi
|
|
|
|
RsTlvBinaryData grp; /// actual group data
|
|
|
|
RsTlvKeySignature adminSign; /// signature of admin (needed to complete version Id
|
|
|
|
RsTlvSecurityKeySet keys;
|
|
|
|
std::string identity;
|
|
|
|
RsTlvKeySignature idSign; /// identity sign if applicable
|
|
|
|
uint32_t grpFlag;
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Use to request list of msg held by peer
|
|
|
|
* for a given group
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsSyncGrpMsg : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2012-05-05 15:55:24 -04:00
|
|
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
RsSyncGrpMsg(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_SYNC_MSG) {return; }
|
|
|
|
|
|
|
|
|
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
std::string grpId;
|
2012-05-05 15:55:24 -04:00
|
|
|
uint8_t flag;
|
2012-05-03 17:49:55 -04:00
|
|
|
uint32_t syncAge;
|
2012-05-05 15:55:24 -04:00
|
|
|
std::string syncHash;
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Use to send list msgs for a group held by
|
|
|
|
* a peer
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsSyncGrpMsgList : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
static const uint8_t FLAG_REQUEST;
|
2012-05-21 18:07:43 -04:00
|
|
|
static const uint8_t FLAG_RESPONSE;
|
|
|
|
static const uint8_t FLAG_USE_SYNC_HASH;
|
2012-05-06 10:29:50 -04:00
|
|
|
RsSyncGrpMsgList(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_SYNC_MSG_LIST) { return; }
|
|
|
|
|
|
|
|
|
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-05 15:55:24 -04:00
|
|
|
uint8_t flag; // response/req
|
2012-05-01 16:52:07 -04:00
|
|
|
std::string grpId;
|
2012-05-24 18:38:59 -04:00
|
|
|
std::string msgId;
|
|
|
|
RsTlvKeySignature idSign;
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Used to respond to a RsGrpMsgsReq
|
|
|
|
* with message items satisfying request
|
|
|
|
*/
|
2012-05-21 18:07:43 -04:00
|
|
|
class RsNxsMsg : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
RsNxsMsg(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_MSG), msg(servtype) { return; }
|
2012-05-06 10:29:50 -04:00
|
|
|
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-06 10:29:50 -04:00
|
|
|
virtual void clear();
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
std::string grpId; /// group id, forms part of version id
|
|
|
|
std::string msgId; /// msg id
|
|
|
|
uint32_t msgFlag;
|
|
|
|
uint32_t timeStamp; /// UTC time create,
|
|
|
|
RsTlvBinaryData msg;
|
|
|
|
RsTlvKeySignature publishSign; /// publish signature
|
|
|
|
RsTlvKeySignature idSign; /// identity signature
|
|
|
|
std::string identity;
|
|
|
|
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Used to request a search of user data
|
|
|
|
*/
|
2012-05-06 10:29:50 -04:00
|
|
|
class RsNxsSearchReq : public RsNxsItem
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
RsNxsSearchReq(uint16_t servtype): RsNxsItem(servtype, RS_PKT_SUBTYPE_SEARCH_REQ), serviceSearchItem(servtype) { return; }
|
|
|
|
virtual ~RsNxsSearchReq() { return;}
|
2012-05-06 10:29:50 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
virtual void clear() { return;}
|
2012-05-06 10:29:50 -04:00
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent) { return out; }
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
uint8_t nHops; /// how many peers to jump to
|
|
|
|
uint32_t token; // search token
|
|
|
|
RsTlvBinaryData serviceSearchItem; // service aware of item class
|
|
|
|
uint32_t expiration; // expiration date
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* used to extend data types processed
|
|
|
|
*/
|
|
|
|
class RsNxsExtended : public RsNxsItem
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsNxsExtended(uint16_t servtype) : RsNxsItem(servtype, RS_PKT_SUBTYPE_NXS_EXTENDED), extData(servtype) { return; }
|
|
|
|
virtual ~RsNxsExtended() { return; }
|
|
|
|
|
|
|
|
virtual void clear() {}
|
|
|
|
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
|
|
|
|
|
|
|
RsTlvBinaryData extData;
|
|
|
|
uint32_t type;
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Used to respond to a RsGrpSearchReq
|
|
|
|
* with grpId/MsgIds that satisfy search request
|
|
|
|
*/
|
2012-05-21 18:07:43 -04:00
|
|
|
class RsNxsSearchResultMsg
|
2012-05-01 16:52:07 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
RsNxsSearchResultMsg() : context(0) { return;}
|
|
|
|
void clear() {}
|
|
|
|
std::ostream &print(std::ostream &out, uint16_t indent) { return out; }
|
2012-05-06 10:29:50 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
uint32_t token; // search token to be redeemed
|
|
|
|
RsTlvBinaryData context; // used by client service
|
|
|
|
std::string msgId;
|
|
|
|
std::string grpId;
|
|
|
|
RsTlvKeySignature idSign;
|
2012-05-06 10:29:50 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
uint32_t expiration; // expiration date
|
|
|
|
};
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
/*!
|
|
|
|
* Used to respond to a RsGrpSearchReq
|
|
|
|
* with grpId/MsgIds that satisfy search request
|
|
|
|
*/
|
|
|
|
class RsNxsSearchResultGrp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsNxsSearchResultGrp();
|
|
|
|
void clear() {}
|
|
|
|
std::ostream &print(std::ostream &out, uint16_t indent) { return out; }
|
|
|
|
|
|
|
|
uint32_t token; // search token to be redeemed
|
|
|
|
|
|
|
|
RsTlvBinaryData context; // used by client service
|
|
|
|
|
|
|
|
std::string grpId;
|
|
|
|
RsTlvKeySignature adminSign;
|
|
|
|
|
|
|
|
uint32_t expiration; // expiration date
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
class RsNxsDeleteMsg
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsNxsDeleteMsg() { return; }
|
|
|
|
|
|
|
|
std::string msgId;
|
|
|
|
std::string grpId;
|
|
|
|
RsTlvKeySignature idSign;
|
|
|
|
RsTlvKeySignature deleteSign; // ( msgId + grpId + msg data ) sign //TODO: add warning not to place msgId+grpId in msg!
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class RsNxsDeleteGrp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsNxsDeleteGrp() { return;}
|
|
|
|
|
|
|
|
std::string grpId;
|
|
|
|
RsTlvKeySignature idSign;
|
|
|
|
RsTlvKeySignature deleteSign; // (grpId + grp data) sign // TODO: add warning not to place grpId in msg
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-01 16:52:07 -04:00
|
|
|
class RsNxsSerialiser : public RsSerialType
|
|
|
|
{
|
2012-05-06 10:29:50 -04:00
|
|
|
public:
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
RsNxsSerialiser(uint16_t servtype) :
|
2012-05-05 15:55:24 -04:00
|
|
|
RsSerialType(RS_PKT_VERSION_SERVICE, servtype), SERVICE_TYPE(servtype) { return; }
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
virtual ~RsNxsSerialiser() { return; }
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual uint32_t size(RsItem *item);
|
2012-05-01 16:52:07 -04:00
|
|
|
virtual bool serialise(RsItem *item, void *data, uint32_t *size);
|
|
|
|
virtual RsItem* deserialise(void *data, uint32_t *size);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
|
|
/* for RS_PKT_SUBTYPE_SYNC_GRP */
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual uint32_t sizeSyncGrp(RsSyncGrp* item);
|
2012-05-01 16:52:07 -04:00
|
|
|
virtual bool serialiseSyncGrp(RsSyncGrp *item, void *data, uint32_t *size);
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual RsSyncGrp* deserialSyncGrp(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
/* for RS_PKT_SUBTYPE_SYNC_GRP_LIST */
|
|
|
|
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual uint32_t sizeSyncGrpList(RsSyncGrpList* item);
|
2012-05-01 16:52:07 -04:00
|
|
|
virtual bool serialiseSyncGrpList(RsSyncGrpList *item, void *data, uint32_t *size);
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual RsSyncGrpList* deserialSyncGrpList(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
/* for RS_PKT_SUBTYPE_NXS_GRP */
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
virtual uint32_t sizeNxsGrp(RsNxsGrp* item);
|
|
|
|
virtual bool serialiseNxsGrp(RsNxsGrp *item, void *data, uint32_t *size);
|
|
|
|
virtual RsNxsGrp* deserialNxsGrp(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
/* for RS_PKT_SUBTYPE_SYNC_MSG */
|
|
|
|
|
|
|
|
virtual uint32_t sizeSyncGrpMsg(RsSyncGrpMsg* item);
|
2012-05-03 17:49:55 -04:00
|
|
|
virtual bool serialiseSyncGrpMsg(RsSyncGrpMsg *item, void *data, uint32_t *size);
|
|
|
|
virtual RsSyncGrpMsg* deserialSyncGrpMsg(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
/* RS_PKT_SUBTYPE_SYNC_MSG_LIST */
|
|
|
|
|
2012-05-05 15:55:24 -04:00
|
|
|
virtual uint32_t sizeSyncGrpMsgList(RsSyncGrpMsgList* item);
|
2012-05-01 16:52:07 -04:00
|
|
|
virtual bool serialiseSynGrpMsgList(RsSyncGrpMsgList* item, void *data, uint32_t* size);
|
2012-05-05 15:55:24 -04:00
|
|
|
virtual RsSyncGrpMsgList* deserialSyncGrpMsgList(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
/* RS_PKT_SUBTYPE_NXS_MSG */
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
virtual uint32_t sizeNxsMsg(RsNxsMsg* item);
|
|
|
|
virtual bool serialiseNxsMsg(RsNxsMsg* item, void* data, uint32_t* size);
|
|
|
|
virtual RsNxsMsg* deserialNxsMsg(void *data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
|
|
|
/* RS_PKT_SUBTYPE_SEARCH_REQ */
|
|
|
|
virtual uint32_t sizeNxsSearchReq(RsNxsSearchReq* item);
|
|
|
|
virtual bool serialiseNxsSearchReq(RsNxsSearchReq* item, void* data, uint32_t* size);
|
2012-05-21 18:07:43 -04:00
|
|
|
virtual RsNxsSearchReq* deserialNxsSearchReq(void* data, uint32_t *size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
/* RS_PKT_SUBTYPE_EXTENDED */
|
|
|
|
virtual RsNxsExtended* deserialNxsExtended(void* data, uint32_t *size);
|
|
|
|
virtual uint32_t sizeNxsExtended(RsNxsExtended* item);
|
|
|
|
virtual bool serialiseNxsExtended(RsNxsExtended* item, void* data, uint32_t* size);
|
2012-05-01 16:52:07 -04:00
|
|
|
|
2012-05-05 15:55:24 -04:00
|
|
|
private:
|
|
|
|
|
|
|
|
const uint16_t SERVICE_TYPE;
|
2012-05-01 16:52:07 -04:00
|
|
|
};
|
|
|
|
|
2012-05-21 18:07:43 -04:00
|
|
|
|
2012-05-01 16:52:07 -04:00
|
|
|
#endif // RSNXSITEMS_H
|