Sendbird Chat SDK for Unreal
SBDUser.h
1// Copyright (c) 2021 Sendbird, Inc. All rights reserved.
2
3#ifndef SENDBIRD_SBDUSER_H_
4#define SENDBIRD_SBDUSER_H_
5
6#include "SBDTypes.h"
7
8#include <string>
9#include <map>
10#include <functional>
11
12class SBDError;
13class FSBDUser;
14
20class SBDUser {
21public:
25 std::wstring user_id;
26
30 std::wstring nickname;
31
35 std::wstring profile_url;
36
40 SBDUserConnectionStatus connection_status;
41
45 int64_t last_seen_at;
46
50 std::map<std::wstring, std::wstring> meta_data;
51
58 void CreateMetaData(const std::map<std::wstring, std::wstring>& meta_data,
59 std::function<void(const std::map<std::wstring, std::wstring>& meta_data, SBDError* error)> completion_handler);
60
67 void UpdateMetaData(const std::map<std::wstring, std::wstring>& meta_data,
68 std::function<void(const std::map<std::wstring, std::wstring>& meta_data, SBDError* error)> completion_handler);
69
76 void DeleteMetaData(const std::wstring& key, std::function<void(SBDError*)> completion_handler);
77
83 void DeleteAllMetaData(std::function<void(SBDError*)> completion_handler);
84
85public:
86 SBDUser();
87 virtual ~SBDUser() {}
88
89protected:
90 SBDUser(const std::string& dict);
91
92 friend FSBDUser;
93};
94
95#endif /* SENDBIRD_SBDUSER_H_ */
Definition: SBDError.h:13
Definition: SBDUser.h:20
std::map< std::wstring, std::wstring > meta_data
Definition: SBDUser.h:50
int64_t last_seen_at
Definition: SBDUser.h:45
std::wstring user_id
Definition: SBDUser.h:25
SBDUserConnectionStatus connection_status
Definition: SBDUser.h:40
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 DeleteAllMetaData(std::function< void(SBDError *)> completion_handler)
void DeleteMetaData(const std::wstring &key, std::function< void(SBDError *)> completion_handler)
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)
std::wstring nickname
Definition: SBDUser.h:30
std::wstring profile_url
Definition: SBDUser.h:35