3#ifndef SENDBIRD_SBDOPENCHANNEL_H_
4#define SENDBIRD_SBDOPENCHANNEL_H_
6#include "SBDBaseChannel.h"
9#include "SBDOpenChannelListQuery.h"
10#include "SBDUserListQuery.h"
11#include "SBDOpenChannelParams.h"
61 const std::wstring&
data,
const std::vector<std::wstring>& operator_user_ids,
const std::wstring&
custom_type,
77 const std::wstring& file_mime_type,
const std::wstring&
data,
const std::vector<std::wstring>& operator_user_ids,
99 void UpdateChannel(
const std::wstring& new_name,
const std::wstring& new_cover_url,
const std::wstring& new_data,
const std::vector<std::wstring>& new_operator_user_ids,
113 void UpdateChannel(
const std::wstring& new_name,
const std::wstring& new_cover_image_file_path,
const std::wstring& new_cover_file_mime_type,
114 const std::wstring& new_data,
const std::vector<std::wstring>& new_operator_user_ids,
const std::wstring& new_custom_type,
217 std::mutex operators_lock;
218 int64_t operators_updated_at;
219 static std::vector<std::unique_ptr<SBDOpenChannelListQuery>> open_channel_list_queries;
220 static std::vector<std::unique_ptr<SBDUserListQuery>> user_list_queries;
221 static std::map<std::wstring, std::shared_ptr<SBDOpenChannel>> cached_channels;
222 static std::map<std::wstring, std::shared_ptr<SBDOpenChannel>> entered_channels;
223 static std::mutex cached_channels_mutex;
226 void UpdateOperators(std::vector<SBDUser>
operators, int64_t update_ts);
229 static void ClearCache();
230 static void ClearEnteredChannels();
231 static void RemoveChannelFromCache(
const std::wstring&
channel_url);
232 static void RemoveChannelFromEnteredChannels(
const std::wstring&
channel_url);
236 friend FSBDOpenChannel;
Definition: SBDBaseChannel.h:271
std::wstring name
Definition: SBDBaseChannel.h:281
std::wstring data
Definition: SBDBaseChannel.h:296
std::wstring channel_url
Definition: SBDBaseChannel.h:276
std::wstring custom_type
Definition: SBDBaseChannel.h:301
std::wstring cover_url
Definition: SBDBaseChannel.h:286
Definition: SBDError.h:13
Definition: SBDOpenChannel.h:25
static void GetChannel(const std::wstring &channel_url, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
bool IsOperator(const SBDUser &user)
SBDUserListQuery * CreateBannedUserListQuery()
bool is_frozen
Definition: SBDOpenChannel.h:40
void UnmuteUser(const SBDUser &user, std::function< void(SBDError *)> completion_handler)
void BanUser(const SBDUser &user, int seconds, std::function< void(SBDError *)> completion_handler)
void UpdateChannel(const std::wstring &new_name, const std::wstring &new_cover_url, const std::wstring &new_data, const std::vector< std::wstring > &new_operator_user_ids, const std::wstring &new_custom_type, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
void RefreshChannel(std::function< void(SBDError *)> completion_handler)
std::vector< SBDUser > operators
Definition: SBDOpenChannel.h:35
void Exit(std::function< void(SBDError *)> completion_handler)
void UpdateChannel(const std::wstring &new_name, const std::wstring &new_cover_image_file_path, const std::wstring &new_cover_file_mime_type, const std::wstring &new_data, const std::vector< std::wstring > &new_operator_user_ids, const std::wstring &new_custom_type, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
void UnbanUser(const SBDUser &user, std::function< void(SBDError *)> completion_handler)
void DeleteChannel(std::function< void(SBDError *)> completion_handler)
void Enter(std::function< void(SBDError *)> completion_handler)
static void CreateChannel(const std::wstring &name, const std::wstring &channel_url, const std::wstring &cover_image_file_path, const std::wstring &file_mime_type, const std::wstring &data, const std::vector< std::wstring > &operator_user_ids, const std::wstring &custom_type, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
int64_t participant_count
Definition: SBDOpenChannel.h:30
static void CreateChannel(SBDOpenChannelParams ¶ms, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
SBDUserListQuery * CreateParticipantListQuery()
void MuteUser(const SBDUser &user, std::function< void(SBDError *)> completion_handler)
static void CreateChannel(const std::wstring &name, const std::wstring &channel_url, const std::wstring &cover_url, const std::wstring &data, const std::vector< std::wstring > &operator_user_ids, const std::wstring &custom_type, std::function< void(SBDOpenChannel *, SBDError *)> completion_handler)
static SBDOpenChannelListQuery * CreateOpenChannelListQuery()
SBDUserListQuery * CreateMutedUserListQuery()
Definition: SBDOpenChannelListQuery.h:15
Definition: SBDOpenChannelParams.h:16
Definition: SBDUserListQuery.h:35