HIVE SDK for C++

Static Public Member Functions | List of all members
Chat Class Reference

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...

#include <HIVE_Chat.h>

Static Public Member Functions

static void 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 getChannels (GetChannelsParams const *params, onGetChannels listener)
 Get channel list
Retrieves a list of accessible channels. More...
 
static void getChannelInfo (const char *channelId, onGetChannelInfo listener)
 Get channel information
Receives the channel ID and retrieves the information of the corresponding channel. More...
 
static void 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 deleteChannel (const char *channelId, onDeleteChannel listener)
 Delete channel
Receives the channel ID and deletes the corresponding channel. More...
 
static void enterChannel (EnterChannelParams const &params, onEnterChannel listener)
 Enter channel
Receives the channel ID and connects to the channel. More...
 
static void exitChannel (const char *channelId, onExitChannel listener)
 Exit channel
Receives the channel ID and exits the corresponding channel. More...
 
static void getChannelsByUser (onGetChannelsByUser listener)
 Get a list of channels the user is participating in. More...
 
static void getBlockMembers (onGetBlockMembers listener)
 Get a list of blocked users. More...
 
static void blockMember (int64_t blockPlayerId, onBlockMember listener)
 Block user
Receives the user ID and blocks the corresponding user. More...
 
static void unblockMember (int64_t blockPlayerId, onUnblockMember listener)
 Unblock user
Receives the user ID and unblocks the corresponding user. More...
 
static void translate (TranslateParams const &params, onTranslate listener)
 Message translation request. More...
 
static void 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 connect (onConnect listener)
 Connects the Chat Server
Attempts to connect to the Chat Server. More...
 
static void reconnect (onReconnect listener)
 The reconnection will rejoin the previously connected channels if the disconnection occurred less than 10 minutes ago. More...
 
static void disconnect (onDisconnect listener)
 Disconnects the Chat Server
Disconnects from the Chat Server. More...
 
static void 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 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 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 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 addChannelListener (const char *uniqueKey, ChannelListener *listener)
 Register Channel Listener
Register a listener to receive channel events. More...
 
static void addDirectMessageListener (const char *uniqueKey, DirectMessageListener *listener)
 Register Direct Message Listener
Register a listener to receive 1:1 messages. More...
 
static void addUserListener (const char *uniqueKey, UserListener *listener)
 Register User Listener
Register a listener to receive user events. More...
 
static void addConnectionListener (const char *uniqueKey, ConnectionListener *listener)
 Register Connection Listener
Register a listener to receive the connection status of the Chat Server. More...
 
static void addCustomDataListener (const char *uniqueKey, CustomDataListener *listener)
 Register Custom Data Listener
More...
 
static void removeChannelListener (const char *uniqueKey)
 Remove Channel Listener
Remove the registered channel listener. More...
 
static void removeDirectMessageListener (const char *uniqueKey)
 Remove Direct Message Listener
Remove the registered 1:1 message listener. More...
 
static void removeUserListener (const char *uniqueKey)
 Remove User Listener
Remove the registered user event listener. More...
 
static void removeConnectionListener (const char *uniqueKey)
 Remove Connection Listener
Remove the registered connection listener. More...
 
static void removeCustomDataListener (const char *uniqueKey)
 Remove Custom Data Listener
More...
 
static bool isConnected ()
 Check the socket connection status
Check if the socket is currently connected. More...
 

Detailed Description

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.


Without additional complex development, you can use the AI chat filtering feature provided by Hive Chat to detect and block prohibited words and advertising chats, improving the user's play environment.

Since
4.25.0.0

The documentation for this class was generated from the following file:
Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy