Merge branch 'gxs_mail_experiments' into qmlapp_pex_alpha

This commit is contained in:
Gioacchino Mazzurco 2017-05-08 12:33:40 +02:00
commit 8f306346a4
220 changed files with 7056 additions and 22752 deletions

View file

@ -1,107 +0,0 @@
#ifndef RETROSHARE_DSDV_INTERFACE_H
#define RETROSHARE_DSDV_INTERFACE_H
/*
* libretroshare/src/rsiface: rsdsdv.h
*
* RetroShare C++ Interface.
*
* Copyright 2011-2011 by 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 <inttypes.h>
#include <string>
#include <list>
/* The Main Interface Class - for information about your Peers */
class RsDsdv;
extern RsDsdv *rsDsdv;
#define RSDSDV_IDTYPE_PEER 0x0001
#define RSDSDV_IDTYPE_SERVICE 0x0002
#define RSDSDV_IDTYPE_TEST 0x0100
#define RSDSDV_FLAGS_SIGNIFICANT_CHANGE 0x0001
#define RSDSDV_FLAGS_STABLE_ROUTE 0x0002
#define RSDSDV_FLAGS_NEW_ROUTE 0x0004
#define RSDSDV_FLAGS_OWN_SERVICE 0x0008
class RsDsdvId
{
public:
uint32_t mIdType;
std::string mAnonChunk;
std::string mHash;
};
class RsDsdvRoute
{
public:
RsPeerId mNextHop;
uint32_t mSequence;
uint32_t mDistance;
time_t mReceived;
time_t mValidSince;
};
class RsDsdvTableEntry
{
public:
RsDsdvId mDest;
bool mIsStable;
RsDsdvRoute mStableRoute;
//RsDsdvRoute mFreshestRoute;
std::map<RsPeerId, RsDsdvRoute> mAllRoutes;
uint32_t mFlags;
/* if we've matched it to someone */
std::string mMatchedHash;
bool mMatched;
bool mOwnSource;
};
std::ostream &operator<<(std::ostream &out, const RsDsdvId &id);
std::ostream &operator<<(std::ostream &out, const RsDsdvRoute &route);
std::ostream &operator<<(std::ostream &out, const RsDsdvTableEntry &entry);
class RsDsdv
{
public:
RsDsdv() { return; }
virtual ~RsDsdv() { return; }
virtual uint32_t getLocalServices(std::list<std::string> &hashes) = 0;
virtual uint32_t getAllServices(std::list<std::string> &hashes) = 0;
virtual int getDsdvEntry(const std::string &hash, RsDsdvTableEntry &entry) = 0;
};
#endif

View file

@ -59,11 +59,12 @@ template<int n> class t_RsFlags32
uint32_t _bits ;
};
#define FLAGS_TAG_TRANSFER_REQS 0x4228af
#define FLAGS_TAG_TRANSFER_REQS 0x4228af
#define FLAGS_TAG_FILE_STORAGE 0x184738
#define FLAGS_TAG_FILE_SEARCH 0xf29ba5
#define FLAGS_TAG_FILE_SEARCH 0xf29ba5
#define FLAGS_TAG_SERVICE_PERM 0x380912
#define FLAGS_TAG_SERVICE_CHAT 0x839042
#define FLAGS_TAG_SERIALIZER 0xa0338d
// Flags for requesting transfers, ask for turtle, cache, speed, etc.
//
@ -85,3 +86,7 @@ typedef t_RsFlags32<FLAGS_TAG_SERVICE_PERM > ServicePermissionFlags ;
//
typedef t_RsFlags32<FLAGS_TAG_SERVICE_CHAT > ChatLobbyFlags ;
// Flags for serializer
//
typedef t_RsFlags32<FLAGS_TAG_SERIALIZER > SerializationFlags ;

View file

@ -14,6 +14,7 @@
#include <inttypes.h>
#include <retroshare/rstypes.h>
#include <retroshare/rsids.h>
typedef GXSGroupId RsGxsGroupId;
typedef Sha1CheckSum RsGxsMessageId;

View file

@ -136,7 +136,7 @@ template<uint32_t ID_SIZE_IN_BYTES,bool UPPER_CASE,uint32_t UNIQUE_IDENTIFIER> c
offset += SIZE_IN_BYTES ;
return true ;
}
bool deserialise(void *data,uint32_t pktsize,uint32_t& offset)
bool deserialise(const void *data,uint32_t pktsize,uint32_t& offset)
{
if(offset + SIZE_IN_BYTES > pktsize)
return false ;

View file

@ -78,15 +78,16 @@ const uint32_t RS_FEED_TYPE_SECURITY = 0x0800;
const uint32_t RS_FEED_TYPE_POSTED = 0x1000;
const uint32_t RS_FEED_TYPE_SECURITY_IP = 0x2000;
const uint32_t RS_FEED_ITEM_PEER_CONNECT = RS_FEED_TYPE_PEER | 0x0001;
const uint32_t RS_FEED_ITEM_PEER_DISCONNECT = RS_FEED_TYPE_PEER | 0x0002;
const uint32_t RS_FEED_ITEM_PEER_HELLO = RS_FEED_TYPE_PEER | 0x0003;
const uint32_t RS_FEED_ITEM_PEER_NEW = RS_FEED_TYPE_PEER | 0x0004;
const uint32_t RS_FEED_ITEM_PEER_CONNECT = RS_FEED_TYPE_PEER | 0x0001;
const uint32_t RS_FEED_ITEM_PEER_DISCONNECT = RS_FEED_TYPE_PEER | 0x0002;
const uint32_t RS_FEED_ITEM_PEER_HELLO = RS_FEED_TYPE_PEER | 0x0003;
const uint32_t RS_FEED_ITEM_PEER_NEW = RS_FEED_TYPE_PEER | 0x0004;
const uint32_t RS_FEED_ITEM_PEER_OFFSET = RS_FEED_TYPE_PEER | 0x0005;
const uint32_t RS_FEED_ITEM_SEC_CONNECT_ATTEMPT = RS_FEED_TYPE_SECURITY | 0x0001;
const uint32_t RS_FEED_ITEM_SEC_AUTH_DENIED = RS_FEED_TYPE_SECURITY | 0x0002;
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_IN = RS_FEED_TYPE_SECURITY | 0x0003;
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_OUT = RS_FEED_TYPE_SECURITY | 0x0004;
const uint32_t RS_FEED_ITEM_SEC_CONNECT_ATTEMPT = RS_FEED_TYPE_SECURITY | 0x0001;
const uint32_t RS_FEED_ITEM_SEC_AUTH_DENIED = RS_FEED_TYPE_SECURITY | 0x0002;
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_IN = RS_FEED_TYPE_SECURITY | 0x0003;
const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_OUT = RS_FEED_TYPE_SECURITY | 0x0004;
const uint32_t RS_FEED_ITEM_SEC_WRONG_SIGNATURE = RS_FEED_TYPE_SECURITY | 0x0005;
const uint32_t RS_FEED_ITEM_SEC_BAD_CERTIFICATE = RS_FEED_TYPE_SECURITY | 0x0006;
const uint32_t RS_FEED_ITEM_SEC_INTERNAL_ERROR = RS_FEED_TYPE_SECURITY | 0x0007;

View file

@ -52,7 +52,7 @@ class RsPhotoThumbnail
// Holds Thumbnail image.
uint8_t *data;
int size;
uint32_t size;
std::string type;
};

View file

@ -2,7 +2,7 @@
#define RETROSHARE_RTT_INTERFACE_H
/*
* libretroshare/src/retroshare: rsrtt.h
* libretroshare/src/retroshare: rsrtt.h
*
* RetroShare C++ Interface.
*
@ -58,6 +58,7 @@ class RsRtt
virtual ~RsRtt() { return; }
virtual uint32_t getPongResults(const RsPeerId& id, int n, std::list<RsRttPongResult> &results) = 0;
virtual double getMeanOffset(const RsPeerId& id) = 0;
};