Twitch SDK (Internal)
setstreaminfotask.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 
12 
13 namespace ttv
14 {
15  namespace broadcast
16  {
17  class SetStreamInfoTask;
18  }
19 }
20 
21 
26 {
27 public:
28  struct Result
29  {
30  };
31 
32  typedef std::function<void(SetStreamInfoTask* source, TTV_ErrorCode ec, const std::shared_ptr<Result>& result)> Callback;
33 
34 public:
35  SetStreamInfoTask(ChannelId channelId, const std::string& oauthToken, const std::string& streamTitle, const std::string& gameName, Callback callback);
36 
37  virtual const char* GetTaskName() const override { return "SetStreamInfoTask"; }
38 
39 protected:
40  virtual void FillHttpRequestInfo(HttpRequestInfo& requestInfo) override;
41  virtual void OnComplete() override;
42 
43 private:
44  std::shared_ptr<Result> mResult;
47  std::string mStreamTitle;
48  std::string mGameName;
49 };
std::function< void(SetStreamInfoTask *source, TTV_ErrorCode ec, const std::shared_ptr< Result > &result)> Callback
Definition: setstreaminfotask.h:32
std::string mGameName
Definition: setstreaminfotask.h:48
virtual void FillHttpRequestInfo(HttpRequestInfo &requestInfo) override
Definition: httptask.h:19
virtual const char * GetTaskName() const override
Definition: setstreaminfotask.h:37
std::shared_ptr< Result > mResult
Definition: setstreaminfotask.h:44
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Definition: setstreaminfotask.h:25
virtual void OnComplete() override
std::string mStreamTitle
Definition: setstreaminfotask.h:47
Definition: setstreaminfotask.h:28
SetStreamInfoTask(ChannelId channelId, const std::string &oauthToken, const std::string &streamTitle, const std::string &gameName, Callback callback)
uint32_t ChannelId
Definition: coretypes.h:23
ChannelId mChannelId
Definition: setstreaminfotask.h:46
Definition: httptask.h:22
Callback mCallback
Definition: setstreaminfotask.h:45