Sendbird Chat SDK for Unreal
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SBDUser Class Reference

#include <SBDUser.h>

Inheritance diagram for SBDUser:
SBDMember

Public Member Functions

void CreateMetaData (const std::map< std::wstring, std::wstring > &meta_data, std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)> completion_handler)
 
void UpdateMetaData (const std::map< std::wstring, std::wstring > &meta_data, std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)> completion_handler)
 
void DeleteMetaData (const std::wstring &key, std::function< void(SBDError *)> completion_handler)
 
void DeleteAllMetaData (std::function< void(SBDError *)> completion_handler)
 

Public Attributes

std::wstring user_id
 
std::wstring nickname
 
std::wstring profile_url
 
SBDUserConnectionStatus connection_status
 
int64_t last_seen_at
 
std::map< std::wstring, std::wstring > meta_data
 

Protected Member Functions

 SBDUser (const std::string &dict)
 

Protected Attributes

friend FSBDUser
 

Detailed Description

The SBDUser class represents a user. The user is identified by the user_id, so the user_id has to be unique. The user_id, nickname and profile_url are valid in every SBDUser instance, however the connection_status and GetLastSeenAt() is valid in SBDUser instance from SBDUserListQuery.

Member Function Documentation

◆ CreateMetaData()

void SBDUser::CreateMetaData ( const std::map< std::wstring, std::wstring > &  meta_data,
std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)>  completion_handler 
)

Creates the meta data for the current user.

Parameters
meta_dataThe meta data to be set.
completion_handlerThe handler interface to execute. meta_data is the meta data which are set on Sendbird server.

◆ DeleteAllMetaData()

void SBDUser::DeleteAllMetaData ( std::function< void(SBDError *)>  completion_handler)

Deletes all meta data for the current user.

Parameters
completion_handlerThe handler interface to execute.

◆ DeleteMetaData()

void SBDUser::DeleteMetaData ( const std::wstring &  key,
std::function< void(SBDError *)>  completion_handler 
)

Deletes meta data with key for the current user.

Parameters
keyThe key to be deleted.
completion_handlerThe handler interface to execute.

◆ UpdateMetaData()

void SBDUser::UpdateMetaData ( const std::map< std::wstring, std::wstring > &  meta_data,
std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)>  completion_handler 
)

Updates the meta data for the current user.

Parameters
meta_dataThe meta data to be updated.
completion_handlerThe handler interface to execute. meta_data is the meta data which are updated on Sendbird server.

Member Data Documentation

◆ connection_status

SBDUserConnectionStatus SBDUser::connection_status

User connection status. This is defined in SBDUserConnectionStatus.

◆ last_seen_at

int64_t SBDUser::last_seen_at

The lastest time when the user became offline.

◆ meta_data

std::map<std::wstring, std::wstring> SBDUser::meta_data

Meta data.

◆ nickname

std::wstring SBDUser::nickname

User nickname.

◆ profile_url

std::wstring SBDUser::profile_url

Profile image url.

◆ user_id

std::wstring SBDUser::user_id

User ID. This has to be unique.