HIVE SDK for C++

Classes | Enumerations | Functions
HiveChat

This class manage HIVE Chat Service

More...

Classes

class  Chat
 HiveChat provides essential features for smooth chatting in games, such as real-time, group, 1:1 chat, and user blocking functions, which can increase user collaboration and improve game play satisfaction. More...
 
class  Channel
 채팅 채널 정보
More...
 
class  ChannelPage
 채널 조회 페이지 정보
More...
 
class  Member
 채널 멤버 정보
More...
 
class  BlockMember
 차단된 사용자 정보
More...
 
class  CreateChannelParams
 채널 생성 파라미터
More...
 
class  GetChannelsParams
 채널 목록 조회 파라미터
More...
 
class  EnterChannelParams
 채널 입장 파라미터
More...
 
class  ChannelSendMessageParams
 채널 메시지 전송 파라미터
More...
 
class  DirectSendMessageParams
 1:1 메시지 전송 파라미터
More...
 
class  ChannelMessageListQueryParams
 채널 대화 이력 조회 파라미터
More...
 
class  EnteredMember
 입장 멤버 정보
More...
 
class  ExitedMember
 퇴장 멤버 정보
More...
 
class  DeletedChannel
 삭제된 채널 정보
More...
 
class  ChannelNoticeMessage
 채널 공지 메시지 정보
More...
 
class  ChannelMessage
 채널 메시지 정보
More...
 
class  DirectMessage
 1:1 메시지 정보
More...
 
class  NoticeMessage
 유저 대상 공지 메시지 정보
More...
 
class  ChannelMessageListQueryResponse
 채널 대화 이력 정보
More...
 
class  TranslationData
 메시지 번역 결과
More...
 
class  ChannelListener
 채널 이벤트 리스너
More...
 
class  DirectMessageListener
 1:1 메시지 리스너
More...
 
class  UserListener
 유저 이벤트 리스너
More...
 
class  ConnectionListener
 연결 리스너
More...
 
class  CustomDataListener
 커스텀 데이터 리스너
More...
 

Enumerations

enum class  ChannelType
 채팅 채널 타입 정보
More...
 
enum class  SortType
 채널 정렬 타입 정보
More...
 

Functions

static void Chat::createChannel (CreateChannelParams const &params, onCreateChannel listener)
 Create a channel
Channel Name, Maximum Number of People, and Type can be specified, and if it is not PUBLIC, a password must also be specified. More...
 
static void Chat::getChannels (GetChannelsParams const *params, onGetChannels listener)
 Get channel list
Retrieves a list of accessible channels. More...
 
static void Chat::getChannelInfo (const char *channelId, onGetChannelInfo listener)
 Get channel information
Receives the channel ID and retrieves the information of the corresponding channel. More...
 
static void Chat::getChannelMembers (const char *channelId, onGetChannelMembers listener)
 Get channel members
Receives the channel ID and retrieves the list of members in the corresponding channel. More...
 
static void Chat::deleteChannel (const char *channelId, onDeleteChannel listener)
 Delete channel
Receives the channel ID and deletes the corresponding channel. More...
 
static void Chat::enterChannel (EnterChannelParams const &params, onEnterChannel listener)
 Enter channel
Receives the channel ID and connects to the channel. More...
 
static void Chat::exitChannel (const char *channelId, onExitChannel listener)
 Exit channel
Receives the channel ID and exits the corresponding channel. More...
 
static void Chat::getChannelsByUser (onGetChannelsByUser listener)
 Get a list of channels the user is participating in. More...
 
static void Chat::getBlockMembers (onGetBlockMembers listener)
 Get a list of blocked users. More...
 
static void Chat::blockMember (int64_t blockPlayerId, onBlockMember listener)
 Block user
Receives the user ID and blocks the corresponding user. More...
 
static void Chat::unblockMember (int64_t blockPlayerId, onUnblockMember listener)
 Unblock user
Receives the user ID and unblocks the corresponding user. More...
 
static void Chat::translate (TranslateParams const &params, onTranslate listener)
 Message translation request. More...
 
static void Chat::connect (const char *extraData, onResult listener)
 Connects the Chat Server (Deprecated)
This method is no longer recommended and will be removed in future versions. More...
 
static void Chat::connect (onConnect listener)
 Connects the Chat Server
Attempts to connect to the Chat Server. More...
 
static void Chat::reconnect (onReconnect listener)
 The reconnection will rejoin the previously connected channels if the disconnection occurred less than 10 minutes ago. More...
 
static void Chat::disconnect (onDisconnect listener)
 Disconnects the Chat Server
Disconnects from the Chat Server. More...
 
static void Chat::sendMessageWithChannelSendMessageParams (ChannelSendMessageParams const &params)
 Send a channel message
Receives the channel ID and message and sends the message to the corresponding channel. More...
 
static void Chat::sendMessageWithChannelSendMessageParams (ChannelSendMessageParams const &params, onChannelSendMessage listener)
 Send a channel message
Receives the channel ID and message and sends the message to the corresponding channel. More...
 
static void Chat::sendMessageWithDirectSendMessageParams (DirectSendMessageParams const &params)
 Send a 1:1 message
Receives the recipient ID and message and sends the message to the corresponding user. More...
 
static void Chat::sendMessageWithDirectSendMessageParams (DirectSendMessageParams const &params, onDirectSendMessage listener)
 Send a 1:1 message
Receives the recipient ID and message and sends the message to the corresponding user. More...
 
static void Chat::addChannelListener (const char *uniqueKey, ChannelListener *listener)
 Register Channel Listener
Register a listener to receive channel events. More...
 
static void Chat::addDirectMessageListener (const char *uniqueKey, DirectMessageListener *listener)
 Register Direct Message Listener
Register a listener to receive 1:1 messages. More...
 
static void Chat::addUserListener (const char *uniqueKey, UserListener *listener)
 Register User Listener
Register a listener to receive user events. More...
 
static void Chat::addConnectionListener (const char *uniqueKey, ConnectionListener *listener)
 Register Connection Listener
Register a listener to receive the connection status of the Chat Server. More...
 
static void Chat::addCustomDataListener (const char *uniqueKey, CustomDataListener *listener)
 Register Custom Data Listener
More...
 
static void Chat::removeChannelListener (const char *uniqueKey)
 Remove Channel Listener
Remove the registered channel listener. More...
 
static void Chat::removeDirectMessageListener (const char *uniqueKey)
 Remove Direct Message Listener
Remove the registered 1:1 message listener. More...
 
static void Chat::removeUserListener (const char *uniqueKey)
 Remove User Listener
Remove the registered user event listener. More...
 
static void Chat::removeConnectionListener (const char *uniqueKey)
 Remove Connection Listener
Remove the registered connection listener. More...
 
static void Chat::removeCustomDataListener (const char *uniqueKey)
 Remove Custom Data Listener
More...
 
static bool Chat::isConnected ()
 Check the socket connection status
Check if the socket is currently connected. More...
 

Detailed Description

This class manage HIVE Chat Service

Enumeration Type Documentation

◆ ChannelType

enum class ChannelType
strong

채팅 채널 타입 정보

◆ SortType

enum class SortType
strong

채널 정렬 타입 정보

Function Documentation

◆ addChannelListener()

static void Chat::addChannelListener ( const char *  uniqueKey,
ChannelListener listener 
)
static

Register Channel Listener
Register a listener to receive channel events.


Registered listeners receive events (messages, notice messages, channel access notifications, channel exit notifications, channel deletion notifications) whenever they occur.

Since
4.25.0.0

◆ addConnectionListener()

static void Chat::addConnectionListener ( const char *  uniqueKey,
ConnectionListener listener 
)
static

Register Connection Listener
Register a listener to receive the connection status of the Chat Server.


Registered listeners receive events whenever the connection status of the Chat Server changes.

Since
4.25.0.0

◆ addCustomDataListener()

static void Chat::addCustomDataListener ( const char *  uniqueKey,
CustomDataListener listener 
)
static

Register Custom Data Listener

Since
4.25.4.0

◆ addDirectMessageListener()

static void Chat::addDirectMessageListener ( const char *  uniqueKey,
DirectMessageListener listener 
)
static

Register Direct Message Listener
Register a listener to receive 1:1 messages.


Registered listeners receive events whenever a 1:1 message occurs.

Since
4.25.0.0

◆ addUserListener()

static void Chat::addUserListener ( const char *  uniqueKey,
UserListener listener 
)
static

Register User Listener
Register a listener to receive user events.


Registered listeners receive events (1:1 messages, notice messages) whenever they occur.

Since
4.25.0.0

◆ blockMember()

static void Chat::blockMember ( int64_t  blockPlayerId,
onBlockMember  listener 
)
static

Block user
Receives the user ID and blocks the corresponding user.


The result of blocking the user is delivered through the listener.

Since
4.25.0.0

◆ connect() [1/2]

static void Chat::connect ( const char *  extraData,
onResult  listener 
)
static

Connects the Chat Server (Deprecated)
This method is no longer recommended and will be removed in future versions.


Use connect(onResult) instead.

Deprecated:
4.25.2.0 버전부터 사용되지 않음.
See also
connect(onResult)
Since
4.25.0.0

◆ connect() [2/2]

static void Chat::connect ( onConnect  listener)
static

Connects the Chat Server
Attempts to connect to the Chat Server.


The result of the connection is delivered through the listener.

Since
4.25.2.0

◆ createChannel()

static void Chat::createChannel ( CreateChannelParams const &  params,
onCreateChannel  listener 
)
static

Create a channel
Channel Name, Maximum Number of People, and Type can be specified, and if it is not PUBLIC, a password must also be specified.


The result of creating a channel is delivered through the listener.

Since
4.25.0.0

◆ deleteChannel()

static void Chat::deleteChannel ( const char *  channelId,
onDeleteChannel  listener 
)
static

Delete channel
Receives the channel ID and deletes the corresponding channel.


The result of deleting the channel is delivered through the listener.

Since
4.25.0.0

◆ disconnect()

static void Chat::disconnect ( onDisconnect  listener)
static

Disconnects the Chat Server
Disconnects from the Chat Server.


The result of the disconnection is delivered through the listener.

Since
4.25.0.0

◆ enterChannel()

static void Chat::enterChannel ( EnterChannelParams const &  params,
onEnterChannel  listener 
)
static

Enter channel
Receives the channel ID and connects to the channel.


If it is not a PUBLIC channel, you must enter the password.
The result of entering the channel is delivered through the listener.

Since
4.25.0.0

◆ exitChannel()

static void Chat::exitChannel ( const char *  channelId,
onExitChannel  listener 
)
static

Exit channel
Receives the channel ID and exits the corresponding channel.


The result of exiting the channel is delivered through the listener.

Since
4.25.0.0

◆ getBlockMembers()

static void Chat::getBlockMembers ( onGetBlockMembers  listener)
static

Get a list of blocked users.


Retrieves a list of blocked users.
The blocked user list includes the ID of the blocked user and the time of blocking.
The result of the blocked user list retrieval is delivered through the listener.

Since
4.25.0.0

◆ getChannelInfo()

static void Chat::getChannelInfo ( const char *  channelId,
onGetChannelInfo  listener 
)
static

Get channel information
Receives the channel ID and retrieves the information of the corresponding channel.


The result of the query includes information about the channel and a list of members participating in the channel.

Since
4.25.0.0

◆ getChannelMembers()

static void Chat::getChannelMembers ( const char *  channelId,
onGetChannelMembers  listener 
)
static

Get channel members
Receives the channel ID and retrieves the list of members in the corresponding channel.


The result of the query includes a list of members in the corresponding channel.

Since
4.25.0.0

◆ getChannels()

static void Chat::getChannels ( GetChannelsParams const *  params,
onGetChannels  listener 
)
static

Get channel list
Retrieves a list of accessible channels.


You can specify the channel type, channel name, page order, page size, and page number.
The result of the channel list retrieval is delivered through the listener.

Since
4.25.0.0

◆ getChannelsByUser()

static void Chat::getChannelsByUser ( onGetChannelsByUser  listener)
static

Get a list of channels the user is participating in.


Retrieves a list of channels the user is participating in.
The result of the channel list retrieval is delivered through the listener.

Since
4.25.0.0

◆ isConnected()

static bool Chat::isConnected ( )
static

Check the socket connection status
Check if the socket is currently connected.


Since
4.25.0.0

◆ reconnect()

static void Chat::reconnect ( onReconnect  listener)
static

The reconnection will rejoin the previously connected channels if the disconnection occurred less than 10 minutes ago.


If the last disconnection was more than 10 minutes ago or there is no previous connection record, this will behave the same as connect.

To detect connection status and receive status change events, you must register the Chat.addConnectionHandler event handler.

Since
4.25.2.0

◆ removeChannelListener()

static void Chat::removeChannelListener ( const char *  uniqueKey)
static

Remove Channel Listener
Remove the registered channel listener.


Since
4.25.0.0

◆ removeConnectionListener()

static void Chat::removeConnectionListener ( const char *  uniqueKey)
static

Remove Connection Listener
Remove the registered connection listener.


Since
4.25.0.0

◆ removeCustomDataListener()

static void Chat::removeCustomDataListener ( const char *  uniqueKey)
static

Remove Custom Data Listener

Since
4.25.4.0

◆ removeDirectMessageListener()

static void Chat::removeDirectMessageListener ( const char *  uniqueKey)
static

Remove Direct Message Listener
Remove the registered 1:1 message listener.


Since
4.25.0.0

◆ removeUserListener()

static void Chat::removeUserListener ( const char *  uniqueKey)
static

Remove User Listener
Remove the registered user event listener.


Since
4.25.0.0

◆ sendMessageWithChannelSendMessageParams() [1/2]

static void Chat::sendMessageWithChannelSendMessageParams ( ChannelSendMessageParams const &  params)
static

Send a channel message
Receives the channel ID and message and sends the message to the corresponding channel.


To receive the sent channel message, you need to register an event handler using Chat.addChannelHandler.

Since
4.25.0.0

◆ sendMessageWithChannelSendMessageParams() [2/2]

static void Chat::sendMessageWithChannelSendMessageParams ( ChannelSendMessageParams const &  params,
onChannelSendMessage  listener 
)
static

Send a channel message
Receives the channel ID and message and sends the message to the corresponding channel.


The result of sending the message is delivered through the listener.

Since
4.25.0.0

◆ sendMessageWithDirectSendMessageParams() [1/2]

static void Chat::sendMessageWithDirectSendMessageParams ( DirectSendMessageParams const &  params)
static

Send a 1:1 message
Receives the recipient ID and message and sends the message to the corresponding user.


To receive the sent 1:1 message, you need to register an event handler using Chat.addDirectMessageHandler.

Since
4.25.0.0

◆ sendMessageWithDirectSendMessageParams() [2/2]

static void Chat::sendMessageWithDirectSendMessageParams ( DirectSendMessageParams const &  params,
onDirectSendMessage  listener 
)
static

Send a 1:1 message
Receives the recipient ID and message and sends the message to the corresponding user.


The result of sending the message is delivered through the listener.

Since
4.25.0.0

◆ translate()

static void Chat::translate ( TranslateParams const &  params,
onTranslate  listener 
)
static

Message translation request.


Takes the target language and the message to be translated as input, and translates the message accordingly.
A single message can be translated into multiple languages.

Since
4.25.4.0

◆ unblockMember()

static void Chat::unblockMember ( int64_t  blockPlayerId,
onUnblockMember  listener 
)
static

Unblock user
Receives the user ID and unblocks the corresponding user.


The result of unblocking the user is delivered through the listener.

Since
4.25.0.0
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy