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. More...
 
static void getChannels (GetChannelsParams const *params, onGetChannels listener)
 Get channel list
Retrieves a list of accessible channels. More...
 
static void getChannelInfo (std::string const &channelId, onGetChannelInfo listener)
 Get channel information
Receives the channel ID and retrieves the information of the corresponding channel. More...
 
static void getChannelMembers (std::string const &channelId, onGetChannelMembers listener)
 Get channel members
Receives the channel ID and retrieves the list of members in the corresponding channel. More...
 
static void deleteChannel (std::string const &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 (std::string const &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 reportMessage (ReportMessageParams const &params, onResult listener)
 Report a message
Channel id, message id, message author, and report reason for the message can be specified. More...
 
static void connect (std::string const &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)
 Reconnects to the Chat Server (Deprecated)
This method is no longer recommended and will be removed in future versions. 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 (std::string const &uniqueKey, ChannelListener *listener)
 Register Channel Listener
Register a listener to receive channel events. More...
 
static void addDirectMessageListener (std::string const &uniqueKey, DirectMessageListener *listener)
 Register Direct Message Listener
Register a listener to receive 1:1 messages. More...
 
static void addUserListener (std::string const &uniqueKey, UserListener *listener)
 Register User Listener
Register a listener to receive user events. More...
 
static void addConnectionListener (std::string const &uniqueKey, ConnectionListener *listener)
 Register Connection Listener
Register a listener to receive the connection status of the Chat Server. More...
 
static void addCustomDataListener (std::string const &uniqueKey, CustomDataListener *listener)
 Register Custom Data Listener
More...
 
static void removeChannelListener (std::string const &uniqueKey)
 Remove Channel Listener
Remove the registered channel listener. More...
 
static void removeDirectMessageListener (std::string const &uniqueKey)
 Remove Direct Message Listener
Remove the registered 1:1 message listener. More...
 
static void removeUserListener (std::string const &uniqueKey)
 Remove User Listener
Remove the registered user event listener. More...
 
static void removeConnectionListener (std::string const &uniqueKey)
 Remove Connection Listener
Remove the registered connection listener. More...
 
static void removeCustomDataListener (std::string const &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