Twitch SDK (Internal)
getchanneltask.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 
13 
14 namespace ttv
15 {
16  class GetChannelTask;
17  struct ChannelInfo;
18 }
19 
21 {
22 public:
23  struct Result
24  {
26  };
27 
28  typedef std::function<void(GetChannelTask* source, TTV_ErrorCode ec, std::shared_ptr<Result> result)> Callback;
29 
30 public:
31  GetChannelTask(ChannelId channelId, Callback callback);
32 
33  virtual const char* GetTaskName() const override { return "GetChannelTask"; }
34 
35 
36 protected:
37  virtual void FillHttpRequestInfo(HttpRequestInfo& requestInfo) override;
38  virtual void ProcessResponse(uint statusCode, const std::vector<char>& response) override;
39  virtual void OnComplete() override;
40 
41 private:
42  std::shared_ptr<Result> mResult;
45 };
virtual const char * GetTaskName() const override
Definition: getchanneltask.h:33
Definition: getchanneltask.h:23
Definition: httptask.h:19
std::function< void(GetChannelTask *source, TTV_ErrorCode ec, std::shared_ptr< Result > result)> Callback
Definition: getchanneltask.h:28
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
GetChannelTask(ChannelId channelId, Callback callback)
Definition: getchanneltask.h:20
ChannelId mChannelId
Definition: getchanneltask.h:44
ChannelInfo channelInfo
Definition: getchanneltask.h:25
std::shared_ptr< Result > mResult
Definition: getchanneltask.h:42
unsigned int uint
Definition: coretypes.h:18
virtual void OnComplete() override
Callback mCallback
Definition: getchanneltask.h:43
uint32_t ChannelId
Definition: coretypes.h:23
Definition: coretypes.h:58
virtual void FillHttpRequestInfo(HttpRequestInfo &requestInfo) override
Definition: httptask.h:22
virtual void ProcessResponse(uint statusCode, const std::vector< char > &response) override