Twitch SDK (Internal)
ichannelchatroommanager.h
Go to the documentation of this file.
1 /********************************************************************************************
2  * Twitch Broadcasting SDK
3  *
4  * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5  * may not be copied or used except in accordance with the terms of that agreement
6  * Copyright (c) 2017 Twitch Interactive, Inc.
7  *********************************************************************************************/
8 
9 #pragma once
10 
12 
13 namespace ttv
14 {
15  namespace chat
16  {
17  class IChannelChatRoomManager;
18  }
19 }
20 
21 
26 {
27 public:
28 
36  using JoinCallback = std::function<void(TTV_ErrorCode ec)>;
37 
45  using LeaveCallback = std::function<void(TTV_ErrorCode ec)>;
46 
57  using AddRoomCallback = std::function<void(TTV_ErrorCode ec, CreateRoomError&& error, ChatRoomInfo&& info)>;
58 
67  using FetchRoomsInfoCallback = std::function<void(TTV_ErrorCode ec, std::vector<ChatRoomInfo>&& infos)>;
68 
69  virtual ~IChannelChatRoomManager() = default;
70 
77  virtual TTV_ErrorCode Dispose() = 0;
78 
94  virtual TTV_ErrorCode AddNewChatRoom(const std::string& roomName, const std::string& topic, bool isPreviewable, RoomRole minimumAllowedRole, const AddRoomCallback& callback) = 0;
95 
105  virtual TTV_ErrorCode JoinChatRooms(const JoinCallback& callback) = 0;
106 
116  virtual TTV_ErrorCode LeaveChatRooms(const LeaveCallback& callback) = 0;
117 
127  virtual TTV_ErrorCode FetchChatRoomsInfo(const FetchRoomsInfoCallback& callback) = 0;
128 };
virtual ~IChannelChatRoomManager()=default
RoomRole
Definition: chattypes.h:775
Definition: ichannelchatroommanager.h:25
std::function< void(TTV_ErrorCode ec)> LeaveCallback
Definition: ichannelchatroommanager.h:45
virtual TTV_ErrorCode FetchChatRoomsInfo(const FetchRoomsInfoCallback &callback)=0
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual TTV_ErrorCode JoinChatRooms(const JoinCallback &callback)=0
std::function< void(TTV_ErrorCode ec, CreateRoomError &&error, ChatRoomInfo &&info)> AddRoomCallback
Definition: ichannelchatroommanager.h:57
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
std::function< void(TTV_ErrorCode ec, std::vector< ChatRoomInfo > &&infos)> FetchRoomsInfoCallback
Definition: ichannelchatroommanager.h:67
virtual TTV_ErrorCode LeaveChatRooms(const LeaveCallback &callback)=0
virtual TTV_ErrorCode AddNewChatRoom(const std::string &roomName, const std::string &topic, bool isPreviewable, RoomRole minimumAllowedRole, const AddRoomCallback &callback)=0
virtual TTV_ErrorCode Dispose()=0
std::function< void(TTV_ErrorCode ec)> JoinCallback
Definition: ichannelchatroommanager.h:36