Twitch SDK (Internal)
chatroomleavechanneltask.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) 2012-2016 Twitch Interactive, Inc.
7  *********************************************************************************************/
8 
9 #pragma once
10 
14 
15 namespace ttv
16 {
17  namespace chat
18  {
19  class ChatRoomLeaveChannelTask;
20  }
21 }
22 
24 {
25 public:
26  using Callback = std::function<void(ChatRoomLeaveChannelTask* source, TTV_ErrorCode ec)>;
27 
28  ChatRoomLeaveChannelTask(ChannelId channelId, const std::string& authToken, Callback&& callback);
29 
30  virtual void OnComplete() override;
31 
32 protected:
33  virtual const char* GetTaskName() const override { return "ChatRoomLeaveChannelTask"; }
34 
35  virtual void FillHttpRequestInfo(HttpRequestInfo& requestInfo) override;
36  virtual void ProcessResponse(uint statusCode, const std::vector<char>& response) override;
37 
38 private:
41 };
virtual void ProcessResponse(uint statusCode, const std::vector< char > &response) override
virtual void FillHttpRequestInfo(HttpRequestInfo &requestInfo) override
std::function< void(ChatRoomLeaveChannelTask *source, TTV_ErrorCode ec)> Callback
Definition: chatroomleavechanneltask.h:26
virtual void OnComplete() override
ChannelId mChannelId
Definition: chatroomleavechanneltask.h:40
ChatRoomLeaveChannelTask(ChannelId channelId, const std::string &authToken, Callback &&callback)
Definition: httptask.h:19
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
unsigned int uint
Definition: coretypes.h:18
Callback mCallback
Definition: chatroomleavechanneltask.h:39
Definition: chatroomleavechanneltask.h:23
uint32_t ChannelId
Definition: coretypes.h:23
virtual const char * GetTaskName() const override
Definition: chatroomleavechanneltask.h:33
Definition: httptask.h:22