ID cleaning. Saving progress

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7103 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-02-09 23:05:31 +00:00
parent c56e1627f4
commit 55e35975e9
18 changed files with 346 additions and 287 deletions

View file

@ -92,13 +92,13 @@ class MessageInfo
public:
MessageInfo() {}
std::string msgId;
std::string srcId;
RsPeerId srcId;
unsigned int msgflags;
std::list<std::string> msgto;
std::list<std::string> msgcc;
std::list<std::string> msgbcc;
std::list<RsPeerId> msgto;
std::list<RsPeerId> msgcc;
std::list<RsPeerId> msgbcc;
std::string title;
std::string msg;
@ -119,7 +119,7 @@ class MsgInfoSummary
MsgInfoSummary() {}
std::string msgId;
std::string srcId;
RsPeerId srcId;
uint32_t msgflags;
@ -170,7 +170,7 @@ public:
class ChatInfo
{
public:
std::string rsid;
RsPeerId rsid;
std::string peer_nickname;
unsigned int chatflags;
uint32_t sendTime;
@ -182,7 +182,7 @@ class ChatLobbyInvite
{
public:
ChatLobbyId lobby_id ;
std::string peer_id ;
RsPeerId peer_id ;
std::string lobby_name ;
std::string lobby_topic ;
uint32_t lobby_privacy_level ;
@ -196,7 +196,7 @@ class VisibleChatLobbyRecord
ChatLobbyId lobby_id ; // unique id of the lobby
std::string lobby_name ; // name to use for this lobby
std::string lobby_topic ; // topic to use for this lobby
std::set<std::string> participating_friends ; // list of direct friend who participate.
std::set<RsPeerId> participating_friends ; // list of direct friend who participate.
uint32_t total_number_of_peers ; // total number of particpating peers. Might not be
time_t last_report_time ; // last time the lobby was reported.
@ -210,7 +210,7 @@ class ChatLobbyInfo
ChatLobbyId lobby_id ; // unique id of the lobby
std::string lobby_name ; // name to use for this lobby
std::string lobby_topic ; // topic to use for this lobby
std::set<std::string> participating_friends ; // list of direct friend who participate. Used to broadcast sent messages.
std::set<RsPeerId> participating_friends ; // list of direct friend who participate. Used to broadcast sent messages.
std::string nick_name ; // nickname to use for this lobby
uint32_t lobby_privacy_level ; // see RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC / RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE
@ -222,7 +222,7 @@ struct DistantChatInviteInfo
{
std::string hash ; // hash to contact the invite and refer to it.
std::string encrypted_radix64_string ; // encrypted radix string used to for the chat link
std::string destination_pgp_id ; // pgp is of the destination of the chat link
PGPIdType destination_pgp_id ; // pgp is of the destination of the chat link
time_t time_of_validity ; // time when te invite becomes unusable
uint32_t invite_flags ; // used to keep track of wether signature was ok or not.
};
@ -237,7 +237,7 @@ extern RsMsgs *rsMsgs;
struct DistantOfflineMessengingInvite
{
std::string issuer_pgp_id ;
PGPIdType issuer_pgp_id ;
std::string hash ;
time_t time_of_validity ;
};
@ -290,29 +290,29 @@ virtual bool createDistantOfflineMessengingInvite(time_t validity_time_stamp, st
virtual bool getDistantOfflineMessengingInvites(std::vector<DistantOfflineMessengingInvite>& invites) = 0 ;
virtual void enableDistantMessaging(bool b) = 0;
virtual bool distantMessagingEnabled() = 0;
virtual bool getDistantMessageHash(const std::string& pgp_id, std::string& hash) = 0;
virtual bool getDistantMessageHash(const PGPIdType& pgp_id, std::string& hash) = 0;
/****************************************/
/* Chat */
/****************************************/
virtual bool sendPublicChat(const std::string& msg) = 0;
virtual bool sendPrivateChat(const std::string& id, const std::string& msg) = 0;
virtual bool sendPrivateChat(const RsPeerId& id, const std::string& msg) = 0;
virtual int getPublicChatQueueCount() = 0;
virtual bool getPublicChatQueue(std::list<ChatInfo> &chats) = 0;
virtual int getPrivateChatQueueCount(bool incoming) = 0;
virtual bool getPrivateChatQueueIds(bool incoming, std::list<std::string> &ids) = 0;
virtual bool getPrivateChatQueue(bool incoming, const std::string& id, std::list<ChatInfo> &chats) = 0;
virtual bool clearPrivateChatQueue(bool incoming, const std::string& id) = 0;
virtual bool getPrivateChatQueueIds(bool incoming, std::list<RsPeerId> &ids) = 0;
virtual bool getPrivateChatQueue(bool incoming, const RsPeerId& id, std::list<ChatInfo> &chats) = 0;
virtual bool clearPrivateChatQueue(bool incoming, const RsPeerId& id) = 0;
virtual void sendStatusString(const std::string& id,const std::string& status_string) = 0 ;
virtual void sendStatusString(const RsPeerId& id,const std::string& status_string) = 0 ;
virtual void sendGroupChatStatusString(const std::string& status_string) = 0 ;
virtual void setCustomStateString(const std::string& status_string) = 0 ;
virtual std::string getCustomStateString() = 0 ;
virtual std::string getCustomStateString(const std::string& peer_id) = 0 ;
virtual std::string getCustomStateString(const RsPeerId& peer_id) = 0 ;
// get avatar data for peer pid
virtual void getAvatarData(const std::string& pid,unsigned char *& data,int& size) = 0 ;
virtual void getAvatarData(const RsPeerId& pid,unsigned char *& data,int& size) = 0 ;
// set own avatar data
virtual void setOwnAvatarData(const unsigned char *data,int size) = 0 ;
virtual void getOwnAvatarData(unsigned char *& data,int& size) = 0 ;
@ -322,11 +322,11 @@ virtual void getOwnAvatarData(unsigned char *& data,int& size) = 0 ;
/****************************************/
virtual bool joinVisibleChatLobby(const ChatLobbyId& lobby_id) = 0 ;
virtual bool isLobbyId(const std::string& virtual_peer_id,ChatLobbyId& lobby_id) = 0;
virtual bool getVirtualPeerId(const ChatLobbyId& lobby_id,std::string& vpid) = 0;
virtual bool isLobbyId(const RsPeerId& virtual_peer_id,ChatLobbyId& lobby_id) = 0;
virtual bool getVirtualPeerId(const ChatLobbyId& lobby_id,RsPeerId& vpid) = 0;
virtual void getChatLobbyList(std::list<ChatLobbyInfo>& cl_info) = 0;
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) = 0 ;
virtual void invitePeerToLobby(const ChatLobbyId& lobby_id,const std::string& peer_id) = 0;
virtual void invitePeerToLobby(const ChatLobbyId& lobby_id,const RsPeerId& peer_id) = 0;
virtual bool acceptLobbyInvite(const ChatLobbyId& id) = 0 ;
virtual void denyLobbyInvite(const ChatLobbyId& id) = 0 ;
virtual void getPendingChatLobbyInvites(std::list<ChatLobbyInvite>& invites) = 0;
@ -337,17 +337,17 @@ virtual bool setDefaultNickNameForChatLobby(const std::string& nick) = 0;
virtual bool getDefaultNickNameForChatLobby(std::string& nick) = 0 ;
virtual void setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe) = 0 ;
virtual bool getLobbyAutoSubscribe(const ChatLobbyId& lobby_id) = 0 ;
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const std::string& lobby_topic,const std::list<std::string>& invited_friends,uint32_t lobby_privacy_type) = 0 ;
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const std::string& lobby_topic,const std::list<RsPeerId>& invited_friends,uint32_t lobby_privacy_type) = 0 ;
/****************************************/
/* Distant chat */
/****************************************/
virtual bool createDistantChatInvite(const std::string& pgp_id,time_t time_of_validity,std::string& encrypted_string) = 0 ;
virtual bool createDistantChatInvite(const PGPIdType& pgp_id,time_t time_of_validity,std::string& encrypted_string) = 0 ;
virtual bool getDistantChatInviteList(std::vector<DistantChatInviteInfo>& invites) = 0;
virtual bool initiateDistantChatConnexion(const std::string& encrypted_string,time_t validity_time,std::string& hash,uint32_t& error_code) = 0;
virtual bool initiateDistantChatConnexion(const std::string& hash,uint32_t& error_code) = 0;
virtual bool getDistantChatStatus(const std::string& hash,uint32_t& status,std::string& pgp_id) = 0;
virtual bool getDistantChatStatus(const std::string& hash,uint32_t& status,PGPIdType& pgp_id) = 0;
virtual bool closeDistantChatConnexion(const std::string& hash) = 0;
virtual bool removeDistantChatInvite(const std::string& hash) = 0 ;