Sendbird Chat SDK for Unreal
|
#include <Sendbird.h>
Static Public Member Functions | |
static std::wstring | GetApplicationId () |
static std::wstring | GetSdkVersion () |
static bool | IsInitialized () |
static void | Init (std::wstring application_id) |
static SBDConnectionState | GetConnectionState () |
static void | AddConnectionHandler (std::wstring identifier, SBDConnectionHandler *handler) |
static void | RemoveConnectionHandler (std::wstring identifier) |
static void | RemoveAllConnectionHandlers () |
static void | AddUserEventHandler (std::wstring identifier, SBDUserEventHandler *handler) |
static void | RemoveUserEventHandler (std::wstring identifier) |
static void | RemoveAllUserEventHandlers () |
static void | AddChannelHandler (std::wstring identifier, SBDChannelHandler *handler) |
static void | RemoveChannelHandler (std::wstring identifier) |
static void | RemoveAllChannelHandlers () |
static void | Connect (std::wstring user_id, std::wstring access_token, std::function< void(SBDUser *, SBDError *)> completion_handler) |
static void | Disconnect (std::function< void()> completion_handler) |
static SBDUser * | GetCurrentUser () |
static void | UpdateCurrentUserInfo (std::wstring nickname, std::wstring profile_url, std::function< void(SBDError *)> completion_handler) |
static void | UpdateCurrentUserInfoWithBinaryProfileImage (std::wstring nickname, std::wstring profile_image_file_path, std::wstring mime_type, std::function< void(SBDError *)> completion_handler) |
static SBDUserListQuery * | CreateAllUserListQuery () |
static SBDUserListQuery * | CreateUserListQuery (std::vector< std::wstring > user_ids) |
static SBDUserListQuery * | CreateBlockedUserListQuery () |
static void | BlockUser (const SBDUser &user, std::function< void(SBDUser *blocked_user, SBDError *)> completion_handler) |
static void | UnblockUser (const SBDUser &user, std::function< void(SBDError *)> completion_handler) |
static bool | Reconnect () |
static void | SetChannelInvitationPreference (bool auto_accept, std::function< void(SBDError *)> completion_handler) |
static void | GetChannelInvitationPreference (std::function< void(bool is_auto_accept, SBDError *)> completion_handler) |
static void | GetTotalUnreadChannelCount (std::function< void(int total_unread_channel_count, SBDError *)> completion_handler) |
static void | GetTotalUnreadMessageCount (SBDGroupChannelTotalUnreadMessageCountParams ¶ms, std::function< void(int total_unread_message_count, SBDError *)> completion_handler) |
static int | GetSubscribedTotalUnreadMessageCount () |
static int | GetSubscribedCustomTypeTotalUnreadMessageCount () |
static int | GetSubscribedCustomTypeUnreadMessageCount (std::wstring custom_type) |
static void | RegisterPushTokenForCurrentUser (SBDPushTokenType type, std::wstring token, bool unique, std::function< void(SBDPushTokenRegistrationStatus, SBDError *)> completion_handler) |
static std::wstring | GetPendingPushToken () |
static void | UnregisterPushTokenForCurrentUser (SBDPushTokenType type, std::wstring token, std::function< void(SBDError *)> completion_handler) |
static void | UnregisterPushTokenAllForCurrentUser (std::function< void(SBDError *)> completion_handler) |
The SBDMain
is the core class for Sendbird. This class is singletone instance which is initialized by Application ID. This class provides the methods for overall. The methods include SBDConnectionHandler
registration for receiving events are related to channels, SBDConnectionHandler
for managing the connection status, updating the current user's information, and blocking other users.
|
static |
Adds the SBDChannelHandler
.
identifier | The identifier for handler. |
handler | SBDChannelHandler handler. |
|
static |
Adds the SBDConnectionHandler
.
identifier | The identifier for the handler. |
handler | SBDConnectionHandler handler. |
|
static |
Adds a user event handler. All added handlers will be notified when events occur.
identifier | ID of handler to be added. |
handler | Handler to be added. |
|
static |
Blocks the specified user.
user | The user to be blocked. |
completion_handler | The handler interface to execute. blockedUser is the blocked user by the current user. |
|
static |
Performs a connection to Sendbird with the user ID and the access token.
user_id | The user ID. |
access_token | The access token. If the user doesn't have access token, set nil. |
completion_handler | The handler interface to execute. user is the object to represent the current user. |
|
static |
Creates SBDUserListQuery
instance for getting a list of all users of this application.
SBDUserListQuery
instance.
|
static |
Creates SBDUserListQuery
instance for getting a list of blocked users by the current user.
SBDUserListQuery
instance.
|
static |
Creates SBDUserListQuery
instance for gettting a list of users of this application with user IDs.
user_ids | The user IDs to get user objects. |
SBDUserListQuery
instance.
|
static |
Disconnects from Sendbird. If this method is invoked, the current user will be invalidated.
completion_handler | The handler interface to execute. |
|
static |
Gets the Application ID which was used for initialization.
|
static |
Gets group channel inviation preference for auto acceptance.
completion_handler | The handler interface to execute. |
|
static |
Gets the WebSocket server connection state.
Connecting
- Connecting to the chat serverOpen
- Connected to the chat serverClosing
- Disconnecting from the chat serverClosed
- Disconnected from the chat serverSBDConnectionState
|
static |
Gets the current user.
|
static |
Gets the pending push token.
|
static |
Retrieves the SDK version.
|
static |
Gets the total number of unread message of GroupChannel
s with subscribed custom types.
|
static |
Gets the number of unread message of GroupChannel
with subscribed custom type.
custom_type | The subscribed custom type. |
|
static |
Gets the subscribed total number of unread message of all GroupChannel
s the current user has joined.
|
static |
Gets total unread channel count.
completion_handler | The handler interface to execute. |
|
static |
Gets total unread message count.
params | SBDGroupChannelTotalUnreadMessageCountParams. |
completion_handler | The handler interface to execute. |
|
static |
Initializes SBDMain
singleton instance with Sendbird Application ID. The Application ID is on Sendbird dashboard. This method has to be run first in order to user Sendbird.
applicationId | The Applicatin ID of Sendbird. It can be founded on Sendbird Dashboard. |
|
static |
Gets initializing state.
SBDMain
instance is initialized.
|
static |
Starts reconnection explictly. The SBDConnectionHandler
handlers will be invoked by the reconnection process.
|
static |
Registers push token for the current SBDUser
to receive push notification. Push token registration succeeds only when the connection is made. Otherwise, callback will return with SBDPushTokenRegistrationStatus::Pending<code> status. Then, you can register push token again by calling this function after the connection is done.
type | Push token type. |
token | Push token. |
unique | If true, all the previously registered token for the current SBDUser will be deleted and this token will be the unique one. |
handler | Callback handler. |
|
static |
Removes all channel handlers.
|
static |
Removes all reconnection handlers.
|
static |
Removes all user event handlers.
|
static |
Removes the SBDChannelHandler
by identifier.
identifier | The identifier for the handler to be removed. |
|
static |
Removes the SBDConnectionHandler
by identifier.
identifier | The identifier for the handler to be removed. |
|
static |
Removes a user event handler. The deleted handler no longer be notified.
identifier | ID of handler to be removed. |
|
static |
Sets group channel invitation preference for auto acceptance.
auto_accept | If true, the current user will accept the group channel invitation automatically. |
completion_handler | The handler interface to execute. |
|
static |
Unblocks the specified user.
userId | The user ID which was blocked. |
completion_handler | The handler interface to execute. |
|
static |
Unregisters all push token bound to the current SBDUser
.
handler | Callback handler. |
|
static |
Unregisters push token for the current SBDUser
.
type | Push token type. |
token | Push token. |
handler | Callback handler. |
|
static |
Updates the current user's information.
nickname | New nickname. |
profile_url | New profile image url. |
completion_handler | The handler interface to execute. |
|
static |
Updates the current user's information.
nickname | New nickname. |
profile_image_file_path | New profile image file path. |
mime_type | The image file's mime type. |
completion_handler | The handler interface to execute. |