initial addition general exchange service interfaces

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@4781 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-01-11 23:01:29 +00:00
parent 30825ee6b4
commit 3f0c811917
11 changed files with 865 additions and 654 deletions

View File

@ -0,0 +1,5 @@
#include "rsgdp.h"
RsGdp::RsGdp()
{
}

View File

@ -0,0 +1,58 @@
#ifndef RSGDP_H
#define RSGDP_H
#include <string>
#include "inttypes.h"
#include "util/rssqlite.h"
/*!
*
* The main role of GDP is to receive and start sync requests
* and prepare exchange data for RsGnp.
* It is also the curator (write authority) of externally received messages
*/
class RsGdp
{
public:
RsGdp();
};
class RsGxsMessage {
};
/*!
*
*
*/
class RsGss {
public:
RsGss(RsSqlite*, uint8_t io_stat);
/*!
* stores message in associate RsSqlite db
* if RsGss is in read only mode this function will always \n
* return false
*
* @param message the message to store
* @return true if message successfully stored
*/
virtual bool store(const RsGxsMessage& message) = 0;
/*!
* retrieve message from associate RsSqlite db \n
*
* @return true if successfully retrieved, false otherwise
*/
virtual bool retrieve(const std::string msgId, RsGxsMessage&) = 0;
uint8_t getIoStat();
static uint8_t READ_ONLY;
static uint8_t READ_AND_WRITE;
};
#endif // RSGDP_H

View File

@ -0,0 +1,5 @@
#include "rsgixs.h"
RsGixs::RsGixs()
{
}

View File

@ -0,0 +1,19 @@
#ifndef RSGIXS_H
#define RSGIXS_H
#include "gxs/rsgxs.h"
/*!
* Retroshare general identity exchange service
* provides a means to distribute identities among peers
* also provides encyption, decryption, verification,
* and signing functionality using any created identities
*/
class RsGixs : RsGxs
{
public:
RsGixs();
};
#endif // RSGIXS_H

View File

@ -0,0 +1,5 @@
#include "rsgnp.h"
RsGnp::RsGnp()
{
}

View File

@ -0,0 +1,20 @@
#ifndef RSGNP_H
#define RSGNP_H
#include "pqi/pqiservice.h"
/*!
* Retroshare general network protocol
*
* This deals with the receiving and sending
* RsGxs data
*
*/
class RsGnp
{
public:
RsGnp();
};
#endif // RSGNP_H

View File

@ -0,0 +1,5 @@
#include "rsgxs.h"
RsGxs::RsGxs()
{
}

View File

@ -0,0 +1,60 @@
#ifndef RSGXS_H
#define RSGXS_H
/*
* libretroshare/src/gxs : rsgxs.h
*
* GXS interface for RetroShare.
*
* Copyright 2011 Christopher Evi-Parker
*
* 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".
*
* This is *THE* auth manager. It provides the web-of-trust via
* gpgme, and authenticates the certificates that are managed
* by the sublayer AuthSSL.
*
*/
#include "rsgdp.h"
/*!
* Retroshare general exchange service
* This forms the basic interface that classes need to inherit
* in order to use the general exchange service
* General GNP drives the service.
* GDP deals with exporting and importing
* data from the derived class
* GXIP is used to maintain
*/
class RsGxs
{
public:
RsGxs();
public:
virtual void receiveMessage(RsGxsMessage*) = 0;
void sendMessage(RsGxsMessage*) = 0;
/*!
* drives synchronisation between peers
*/
void tick();
};
#endif // RSGXS_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
#include "rssqlite.h"
RsSqlite::RsSqlite()
{
}

View File

@ -0,0 +1,10 @@
#ifndef RSSQLITE_H
#define RSSQLITE_H
class RsSqlite
{
public:
RsSqlite();
};
#endif // RSSQLITE_H