2008-02-04 12:55:13 -05:00
|
|
|
#ifndef RS_MSG_GUI_INTERFACE_H
|
|
|
|
#define RS_MSG_GUI_INTERFACE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* libretroshare/src/rsiface: rsmsgs.h
|
|
|
|
*
|
|
|
|
* RetroShare C++ Interface.
|
|
|
|
*
|
|
|
|
* Copyright 2007-2008 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 <list>
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2011-11-25 16:31:52 -05:00
|
|
|
#include <set>
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2010-08-06 05:40:23 -04:00
|
|
|
#include "rstypes.h"
|
2008-02-04 12:55:13 -05:00
|
|
|
|
|
|
|
/********************** For Messages and Channels *****************/
|
|
|
|
|
|
|
|
#define RS_MSG_BOXMASK 0x000f /* Mask for determining Box */
|
|
|
|
|
2010-08-22 18:12:26 -04:00
|
|
|
#define RS_MSG_OUTGOING 0x0001 /* !Inbox */
|
|
|
|
#define RS_MSG_PENDING 0x0002 /* OutBox */
|
|
|
|
#define RS_MSG_DRAFT 0x0004 /* Draft */
|
2008-02-04 12:55:13 -05:00
|
|
|
|
|
|
|
/* ORs of above */
|
2010-08-22 18:12:26 -04:00
|
|
|
#define RS_MSG_INBOX 0x00 /* Inbox */
|
|
|
|
#define RS_MSG_SENTBOX 0x01 /* Sentbox */
|
|
|
|
#define RS_MSG_OUTBOX 0x03 /* Outbox */
|
|
|
|
#define RS_MSG_DRAFTBOX 0x05 /* Draftbox */
|
|
|
|
|
2012-05-05 18:20:05 -04:00
|
|
|
#define RS_MSG_NEW 0x0010 /* New */
|
|
|
|
#define RS_MSG_TRASH 0x0020 /* Trash */
|
|
|
|
#define RS_MSG_UNREAD_BY_USER 0x0040 /* Unread by user */
|
|
|
|
#define RS_MSG_REPLIED 0x0080 /* Message is replied */
|
|
|
|
#define RS_MSG_FORWARDED 0x0100 /* Message is forwarded */
|
|
|
|
#define RS_MSG_STAR 0x0200 /* Message is marked with a star */
|
2012-05-01 05:18:55 -04:00
|
|
|
// system message
|
2012-05-05 18:20:05 -04:00
|
|
|
#define RS_MSG_USER_REQUEST 0x0400 /* user request */
|
|
|
|
#define RS_MSG_FRIEND_RECOMMENDATION 0x0800 /* friend recommendation */
|
|
|
|
#define RS_MSG_SYSTEM (RS_MSG_USER_REQUEST | RS_MSG_FRIEND_RECOMMENDATION)
|
2013-05-04 18:03:48 -04:00
|
|
|
#define RS_MSG_ENCRYPTED 0x1000 /* message is encrypted */
|
2010-08-22 18:12:26 -04:00
|
|
|
|
2012-01-06 17:17:08 -05:00
|
|
|
#define RS_CHAT_LOBBY_EVENT_PEER_LEFT 0x01
|
|
|
|
#define RS_CHAT_LOBBY_EVENT_PEER_STATUS 0x02
|
|
|
|
#define RS_CHAT_LOBBY_EVENT_PEER_JOINED 0x03
|
|
|
|
#define RS_CHAT_LOBBY_EVENT_PEER_CHANGE_NICKNAME 0x04
|
2012-01-23 17:49:47 -05:00
|
|
|
#define RS_CHAT_LOBBY_EVENT_KEEP_ALIVE 0x05
|
2012-01-06 17:17:08 -05:00
|
|
|
|
2010-08-22 18:12:26 -04:00
|
|
|
#define RS_MSGTAGTYPE_IMPORTANT 1
|
|
|
|
#define RS_MSGTAGTYPE_WORK 2
|
|
|
|
#define RS_MSGTAGTYPE_PERSONAL 3
|
|
|
|
#define RS_MSGTAGTYPE_TODO 4
|
|
|
|
#define RS_MSGTAGTYPE_LATER 5
|
|
|
|
#define RS_MSGTAGTYPE_USER 100
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2012-01-27 18:13:28 -05:00
|
|
|
#define RS_CHAT_LOBBY_PRIVACY_LEVEL_CHALLENGE 0 /* Used to accept connexion challenges only. */
|
|
|
|
#define RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC 1 /* lobby is visible by friends. Friends can connect.*/
|
|
|
|
#define RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE 2 /* lobby invisible by friends. Peers on invitation only .*/
|
2012-01-06 17:17:08 -05:00
|
|
|
|
2011-11-25 16:31:52 -05:00
|
|
|
typedef uint64_t ChatLobbyId ;
|
|
|
|
typedef uint64_t ChatLobbyMsgId ;
|
|
|
|
typedef std::string ChatLobbyNickName ;
|
2011-11-23 17:10:37 -05:00
|
|
|
|
2008-02-04 12:55:13 -05:00
|
|
|
class MessageInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MessageInfo() {}
|
|
|
|
std::string msgId;
|
|
|
|
std::string srcId;
|
|
|
|
|
|
|
|
unsigned int msgflags;
|
|
|
|
|
|
|
|
std::list<std::string> msgto;
|
|
|
|
std::list<std::string> msgcc;
|
|
|
|
std::list<std::string> msgbcc;
|
|
|
|
|
|
|
|
std::wstring title;
|
|
|
|
std::wstring msg;
|
|
|
|
|
|
|
|
std::wstring attach_title;
|
|
|
|
std::wstring attach_comment;
|
|
|
|
std::list<FileInfo> files;
|
2013-05-03 17:02:44 -04:00
|
|
|
std::map<std::string,std::string> encryption_keys ; // for concerned ids only the public pgp key id to encrypt the message with.
|
2008-02-04 12:55:13 -05:00
|
|
|
int size; /* total of files */
|
|
|
|
int count; /* file count */
|
|
|
|
|
|
|
|
int ts;
|
|
|
|
};
|
|
|
|
|
|
|
|
class MsgInfoSummary
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MsgInfoSummary() {}
|
|
|
|
|
|
|
|
std::string msgId;
|
|
|
|
std::string srcId;
|
|
|
|
|
|
|
|
uint32_t msgflags;
|
|
|
|
|
|
|
|
std::wstring title;
|
|
|
|
int count; /* file count */
|
|
|
|
time_t ts;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2010-08-19 17:47:26 -04:00
|
|
|
class MsgTagInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MsgTagInfo() {}
|
|
|
|
|
|
|
|
std::string msgId;
|
2010-08-22 18:12:26 -04:00
|
|
|
std::list<uint32_t> tagIds;
|
2010-08-19 17:47:26 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class MsgTagType
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MsgTagType() {}
|
|
|
|
|
2010-08-22 18:12:26 -04:00
|
|
|
/* map containing tagId -> pair (text, rgb color) */
|
2010-08-19 17:47:26 -04:00
|
|
|
std::map<uint32_t, std::pair<std::string, uint32_t> > types;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2009-01-30 14:52:47 -05:00
|
|
|
#define RS_CHAT_PUBLIC 0x0001
|
|
|
|
#define RS_CHAT_PRIVATE 0x0002
|
|
|
|
#define RS_CHAT_AVATAR_AVAILABLE 0x0004
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2013-04-18 17:41:13 -04:00
|
|
|
#define RS_DISTANT_CHAT_STATUS_UNKNOWN 0x0000
|
|
|
|
#define RS_DISTANT_CHAT_STATUS_TUNNEL_DN 0x0001
|
|
|
|
#define RS_DISTANT_CHAT_STATUS_TUNNEL_OK 0x0002
|
|
|
|
#define RS_DISTANT_CHAT_STATUS_CAN_TALK 0x0003
|
|
|
|
|
|
|
|
#define RS_DISTANT_CHAT_ERROR_NO_ERROR 0x0000
|
|
|
|
#define RS_DISTANT_CHAT_ERROR_DECRYPTION_FAILED 0x0001
|
|
|
|
#define RS_DISTANT_CHAT_ERROR_SIGNATURE_MISMATCH 0x0002
|
|
|
|
#define RS_DISTANT_CHAT_ERROR_UNKNOWN_KEY 0x0003
|
2013-04-16 17:13:42 -04:00
|
|
|
|
2011-09-29 05:20:09 -04:00
|
|
|
class ChatInfo
|
2008-02-04 12:55:13 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string rsid;
|
2011-12-04 09:31:48 -05:00
|
|
|
std::string peer_nickname;
|
2008-02-04 12:55:13 -05:00
|
|
|
unsigned int chatflags;
|
2010-09-04 10:23:30 -04:00
|
|
|
uint32_t sendTime;
|
2010-10-03 06:08:58 -04:00
|
|
|
uint32_t recvTime;
|
2008-02-04 12:55:13 -05:00
|
|
|
std::wstring msg;
|
|
|
|
};
|
|
|
|
|
2011-11-26 16:23:31 -05:00
|
|
|
class ChatLobbyInvite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ChatLobbyId lobby_id ;
|
|
|
|
std::string peer_id ;
|
|
|
|
std::string lobby_name ;
|
2012-03-16 18:47:49 -04:00
|
|
|
std::string lobby_topic ;
|
2012-01-14 16:09:04 -05:00
|
|
|
uint32_t lobby_privacy_level ;
|
2011-11-26 16:23:31 -05:00
|
|
|
};
|
2012-12-16 20:24:16 -05:00
|
|
|
|
2012-12-04 16:36:05 -05:00
|
|
|
class VisibleChatLobbyRecord
|
2011-11-23 17:10:37 -05:00
|
|
|
{
|
|
|
|
public:
|
2012-12-04 16:36:05 -05:00
|
|
|
VisibleChatLobbyRecord() { total_number_of_peers = 0 ; }
|
2012-01-07 08:33:30 -05:00
|
|
|
|
2011-11-25 16:31:52 -05:00
|
|
|
ChatLobbyId lobby_id ; // unique id of the lobby
|
2011-11-26 16:23:31 -05:00
|
|
|
std::string lobby_name ; // name to use for this lobby
|
2012-03-16 18:47:49 -04:00
|
|
|
std::string lobby_topic ; // topic to use for this lobby
|
2012-01-14 16:09:04 -05:00
|
|
|
std::set<std::string> participating_friends ; // list of direct friend who participate.
|
2012-01-07 08:33:30 -05:00
|
|
|
|
|
|
|
uint32_t total_number_of_peers ; // total number of particpating peers. Might not be
|
2012-01-14 16:09:04 -05:00
|
|
|
time_t last_report_time ; // last time the lobby was reported.
|
2012-12-04 16:36:05 -05:00
|
|
|
uint32_t lobby_privacy_level ; // see RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC / RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE
|
2012-01-06 17:17:08 -05:00
|
|
|
};
|
2012-12-16 20:24:16 -05:00
|
|
|
|
|
|
|
|
2012-01-07 08:33:30 -05:00
|
|
|
class ChatLobbyInfo
|
2012-01-06 17:17:08 -05:00
|
|
|
{
|
|
|
|
public:
|
2012-01-07 08:33:30 -05:00
|
|
|
ChatLobbyId lobby_id ; // unique id of the lobby
|
|
|
|
std::string lobby_name ; // name to use for this lobby
|
2012-03-16 18:47:49 -04:00
|
|
|
std::string lobby_topic ; // topic to use for this lobby
|
2012-01-07 08:33:30 -05:00
|
|
|
std::set<std::string> participating_friends ; // list of direct friend who participate. Used to broadcast sent messages.
|
2012-01-06 17:17:08 -05:00
|
|
|
std::string nick_name ; // nickname to use for this lobby
|
|
|
|
|
2012-01-14 16:09:04 -05:00
|
|
|
uint32_t lobby_privacy_level ; // see RS_CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC / RS_CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE
|
|
|
|
std::map<std::string,time_t> nick_names ; // list of non direct friend who participate. Used to display only.
|
2012-01-06 17:17:08 -05:00
|
|
|
time_t last_activity ; // last recorded activity. Useful for removing dead lobbies.
|
2011-11-23 17:10:37 -05:00
|
|
|
};
|
|
|
|
|
2013-04-14 11:05:24 -04:00
|
|
|
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
|
|
|
|
time_t time_of_validity ; // time when te invite becomes unusable
|
|
|
|
};
|
|
|
|
|
2008-02-04 12:55:13 -05:00
|
|
|
std::ostream &operator<<(std::ostream &out, const MessageInfo &info);
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ChatInfo &info);
|
2010-08-19 17:47:26 -04:00
|
|
|
|
2011-09-29 05:20:09 -04:00
|
|
|
bool operator==(const ChatInfo&, const ChatInfo&);
|
2008-02-04 12:55:13 -05:00
|
|
|
|
|
|
|
class RsMsgs;
|
|
|
|
extern RsMsgs *rsMsgs;
|
|
|
|
|
2013-04-29 16:44:48 -04:00
|
|
|
struct DistantOfflineMessengingInvite
|
|
|
|
{
|
|
|
|
std::string issuer_pgp_id ;
|
|
|
|
std::string hash ;
|
|
|
|
time_t time_of_validity ;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-02-04 12:55:13 -05:00
|
|
|
class RsMsgs
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
RsMsgs() { return; }
|
|
|
|
virtual ~RsMsgs() { return; }
|
|
|
|
|
|
|
|
/****************************************/
|
2013-04-10 17:21:52 -04:00
|
|
|
/* Message Items */
|
|
|
|
/****************************************/
|
2008-02-04 12:55:13 -05:00
|
|
|
|
|
|
|
virtual bool getMessageSummaries(std::list<MsgInfoSummary> &msgList) = 0;
|
2010-11-02 17:11:11 -04:00
|
|
|
virtual bool getMessage(const std::string &mId, MessageInfo &msg) = 0;
|
2010-05-28 10:42:54 -04:00
|
|
|
virtual void getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox, unsigned int *pnTrashbox) = 0;
|
2013-05-04 18:03:48 -04:00
|
|
|
virtual bool decryptMessage(const std::string& mId) = 0 ;
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2012-05-01 05:18:55 -04:00
|
|
|
virtual bool MessageSend(MessageInfo &info) = 0;
|
|
|
|
virtual bool SystemMessage(const std::wstring &title, const std::wstring &message, uint32_t systemFlag) = 0;
|
2010-11-02 17:11:11 -04:00
|
|
|
virtual bool MessageToDraft(MessageInfo &info, const std::string &msgParentId) = 0;
|
|
|
|
virtual bool MessageToTrash(const std::string &mid, bool bTrash) = 0;
|
|
|
|
virtual bool getMsgParentId(const std::string &msgId, std::string &msgParentId) = 0;
|
2010-05-25 05:32:14 -04:00
|
|
|
|
2010-11-02 17:11:11 -04:00
|
|
|
virtual bool MessageDelete(const std::string &mid) = 0;
|
2011-05-23 19:45:31 -04:00
|
|
|
virtual bool MessageRead(const std::string &mid, bool unreadByUser) = 0;
|
2010-11-02 17:11:11 -04:00
|
|
|
virtual bool MessageReplied(const std::string &mid, bool replied) = 0;
|
|
|
|
virtual bool MessageForwarded(const std::string &mid, bool forwarded) = 0;
|
2011-05-23 19:45:31 -04:00
|
|
|
virtual bool MessageStar(const std::string &mid, bool mark) = 0;
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2010-08-19 17:47:26 -04:00
|
|
|
/* message tagging */
|
|
|
|
|
2010-08-22 18:12:26 -04:00
|
|
|
virtual bool getMessageTagTypes(MsgTagType& tags) = 0;
|
|
|
|
/* set == false && tagId == 0 --> remove all */
|
|
|
|
virtual bool setMessageTagType(uint32_t tagId, std::string& text, uint32_t rgb_color) = 0;
|
|
|
|
virtual bool removeMessageTagType(uint32_t tagId) = 0;
|
|
|
|
|
2010-11-02 17:11:11 -04:00
|
|
|
virtual bool getMessageTag(const std::string &msgId, MsgTagInfo& info) = 0;
|
|
|
|
virtual bool setMessageTag(const std::string &msgId, uint32_t tagId, bool set) = 0;
|
2010-08-19 17:47:26 -04:00
|
|
|
|
2010-08-22 18:12:26 -04:00
|
|
|
virtual bool resetMessageStandardTagTypes(MsgTagType& tags) = 0;
|
2010-08-19 17:47:26 -04:00
|
|
|
|
2013-04-29 16:44:48 -04:00
|
|
|
/* private distant messages */
|
|
|
|
|
|
|
|
virtual bool createDistantOfflineMessengingInvite(time_t validity_time_stamp, std::string& hash)=0 ;
|
|
|
|
virtual bool getDistantOfflineMessengingInvites(std::vector<DistantOfflineMessengingInvite>& invites) = 0 ;
|
|
|
|
|
2008-02-04 12:55:13 -05:00
|
|
|
/****************************************/
|
2013-04-10 17:21:52 -04:00
|
|
|
/* Chat */
|
|
|
|
/****************************************/
|
2011-09-29 05:20:09 -04:00
|
|
|
virtual bool sendPublicChat(const std::wstring& msg) = 0;
|
|
|
|
virtual bool sendPrivateChat(const std::string& id, const std::wstring& msg) = 0;
|
2011-11-23 17:10:37 -05:00
|
|
|
virtual int getPublicChatQueueCount() = 0;
|
2010-09-01 13:56:15 -04:00
|
|
|
virtual bool getPublicChatQueue(std::list<ChatInfo> &chats) = 0;
|
2011-11-23 17:10:37 -05:00
|
|
|
virtual int getPrivateChatQueueCount(bool incoming) = 0;
|
2010-09-20 20:08:06 -04:00
|
|
|
virtual bool getPrivateChatQueueIds(bool incoming, std::list<std::string> &ids) = 0;
|
2011-09-29 05:20:09 -04:00
|
|
|
virtual bool getPrivateChatQueue(bool incoming, const std::string& id, std::list<ChatInfo> &chats) = 0;
|
|
|
|
virtual bool clearPrivateChatQueue(bool incoming, const std::string& id) = 0;
|
2011-11-23 17:10:37 -05:00
|
|
|
|
2009-05-05 09:18:53 -04:00
|
|
|
virtual void sendStatusString(const std::string& id,const std::string& status_string) = 0 ;
|
2009-09-29 16:37:20 -04:00
|
|
|
virtual void sendGroupChatStatusString(const std::string& status_string) = 0 ;
|
|
|
|
|
|
|
|
virtual void setCustomStateString(const std::string& status_string) = 0 ;
|
|
|
|
virtual std::string getCustomStateString() = 0 ;
|
2009-10-04 18:27:42 -04:00
|
|
|
virtual std::string getCustomStateString(const std::string& peer_id) = 0 ;
|
2008-02-04 12:55:13 -05:00
|
|
|
|
2009-01-30 14:52:47 -05:00
|
|
|
// get avatar data for peer pid
|
2011-09-29 05:20:09 -04:00
|
|
|
virtual void getAvatarData(const std::string& pid,unsigned char *& data,int& size) = 0 ;
|
2009-01-30 14:52:47 -05:00
|
|
|
// set own avatar data
|
|
|
|
virtual void setOwnAvatarData(const unsigned char *data,int size) = 0 ;
|
|
|
|
virtual void getOwnAvatarData(unsigned char *& data,int& size) = 0 ;
|
|
|
|
|
2013-04-10 17:21:52 -04:00
|
|
|
/****************************************/
|
|
|
|
/* Chat lobbies */
|
|
|
|
/****************************************/
|
|
|
|
|
2012-12-04 16:36:05 -05:00
|
|
|
virtual bool joinVisibleChatLobby(const ChatLobbyId& lobby_id) = 0 ;
|
2011-12-04 09:31:48 -05:00
|
|
|
virtual bool isLobbyId(const std::string& virtual_peer_id,ChatLobbyId& lobby_id) = 0;
|
2011-12-04 17:03:54 -05:00
|
|
|
virtual bool getVirtualPeerId(const ChatLobbyId& lobby_id,std::string& vpid) = 0;
|
2011-11-23 17:10:37 -05:00
|
|
|
virtual void getChatLobbyList(std::list<ChatLobbyInfo>& cl_info) = 0;
|
2012-12-04 16:36:05 -05:00
|
|
|
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) = 0 ;
|
2011-11-23 17:10:37 -05:00
|
|
|
virtual void invitePeerToLobby(const ChatLobbyId& lobby_id,const std::string& peer_id) = 0;
|
2011-11-28 17:36:13 -05:00
|
|
|
virtual bool acceptLobbyInvite(const ChatLobbyId& id) = 0 ;
|
|
|
|
virtual void denyLobbyInvite(const ChatLobbyId& id) = 0 ;
|
|
|
|
virtual void getPendingChatLobbyInvites(std::list<ChatLobbyInvite>& invites) = 0;
|
2011-11-27 16:04:10 -05:00
|
|
|
virtual void unsubscribeChatLobby(const ChatLobbyId& lobby_id) = 0;
|
|
|
|
virtual bool setNickNameForChatLobby(const ChatLobbyId& lobby_id,const std::string& nick) = 0;
|
|
|
|
virtual bool getNickNameForChatLobby(const ChatLobbyId& lobby_id,std::string& nick) = 0 ;
|
2011-12-26 17:43:54 -05:00
|
|
|
virtual bool setDefaultNickNameForChatLobby(const std::string& nick) = 0;
|
|
|
|
virtual bool getDefaultNickNameForChatLobby(std::string& nick) = 0 ;
|
2012-03-16 18:47:49 -04:00
|
|
|
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 ;
|
2011-11-23 17:10:37 -05:00
|
|
|
|
2013-04-10 17:21:52 -04:00
|
|
|
/****************************************/
|
|
|
|
/* Distant chat */
|
2008-02-04 12:55:13 -05:00
|
|
|
/****************************************/
|
|
|
|
|
2013-04-10 17:21:52 -04:00
|
|
|
virtual bool createDistantChatInvite(const std::string& pgp_id,time_t time_of_validity,std::string& encrypted_string) = 0 ;
|
2013-04-14 11:05:24 -04:00
|
|
|
virtual bool getDistantChatInviteList(std::vector<DistantChatInviteInfo>& invites) = 0;
|
2013-04-16 17:13:42 -04:00
|
|
|
virtual bool initiateDistantChatConnexion(const std::string& encrypted_string,std::string& hash,uint32_t& error_code) = 0;
|
2013-04-23 18:43:19 -04:00
|
|
|
virtual bool getDistantChatStatus(const std::string& hash,uint32_t& status,std::string& pgp_id) = 0;
|
2013-06-12 17:10:09 -04:00
|
|
|
virtual bool closeDistantChatConnexion(const std::string& hash) = 0;
|
2013-04-14 11:05:24 -04:00
|
|
|
|
2008-02-04 12:55:13 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
2011-11-27 16:04:10 -05:00
|
|
|
|