C++SDK
1.0.0
|
#include <mchat.h>
类 | |
class | IListener |
Public 成员函数 | |
virtual Result | setListener (IListener *listener)=0 |
virtual Result | sendPublicMessage (const String &message)=0 |
virtual Result | sendPrivateMessage (const String &message, const UserId &toId)=0 |
virtual Result | getPublicHistoryMessage (bool latest, uint32 begindex, uint32 &ncount, MessagesType &msgs)=0 |
virtual Result | getPrivateHistoryMessage (const UserId &userId, bool latest, uint32 begindex, uint32 &ncount, MessagesType &msgs)=0 |
![]() | |
virtual IRoom * | getRoom ()=0 |
virtual IMUserManager * | getUserManager ()=0 |
virtual bool | isSelfUser (const UserId &userId) const =0 |
virtual bool | isSelfDevice (const DeviceId &deviceId) const =0 |
virtual const UserId | getOwnerId (const DeviceId &deviceId) const =0 |
virtual const String & | getOwnerName (const DeviceId &deviceId) const =0 |
静态 Public 成员函数 | |
static IMChat * | getChat (IRoom *room) |
Protected 成员函数 | |
virtual | ~IMChat () |
![]() | |
virtual | ~IModule () |
房间中聊天模块接口.
房间聊天模块定义房间中公聊和私聊等聊天功能接口。
|
inlineprotectedvirtual |
|
pure virtual |
获取私聊历史消息记录
[in] | userId | 聊天对方的用户Id。 |
[in] | latest | 是否是最新记录(即反序)。 |
[in] | begindex | 消息起始索引。 |
[in,out] | ncount | 请求消息数量;实际消息返回数量。 |
[out] | msgs | 保存消息列表。 |
|
pure virtual |
获取公聊历史消息记录
[in] | latest | 是否是最新记录(即反序)。 |
[in] | begindex | 消息起始索引。 |
[in,out] | ncount | 请求消息数量;实际消息返回数量。 |
[out] | msgs | 保存消息列表。 |
|
pure virtual |
发送私聊消息
[in] | message | 消息内容。 |
[in] | toId | 私聊消息目的用户Id。 |
发送公聊消息
[in] | message | 消息内容。 |