Twitch SDK (Internal)
matchgamenamestask.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  namespace broadcast
17  {
18  class MatchGameNamesTask;
19  }
20 }
21 
23 {
24 public:
25  struct Result
26  {
27  Result();
28 
30  };
31 
32  typedef std::function<void(MatchGameNamesTask* source, TTV_ErrorCode ec, const std::shared_ptr<Result>& result)> Callback;
33 
34 public:
35  MatchGameNamesTask(const std::string& str, Callback callback);
36 
37  virtual void OnComplete() override;
38  virtual const char* GetTaskName() const override { return "MatchGameNamesTask"; }
39 
40 protected:
41  virtual void FillHttpRequestInfo(HttpRequestInfo& requestInfo) override;
42  virtual void ProcessResponse(uint status, const std::vector<char>& response) override;
43 
44 private:
45  std::shared_ptr<Result> mResult;
47  std::string mString;
48 };
virtual const char * GetTaskName() const override
Definition: matchgamenamestask.h:38
MatchGameNamesTask(const std::string &str, Callback callback)
Definition: httptask.h:19
Callback mCallback
Definition: matchgamenamestask.h:46
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual void ProcessResponse(uint status, const std::vector< char > &response) override
Definition: matchgamenamestask.h:22
virtual void FillHttpRequestInfo(HttpRequestInfo &requestInfo) override
std::shared_ptr< Result > mResult
Definition: matchgamenamestask.h:45
virtual void OnComplete() override
unsigned int uint
Definition: coretypes.h:18
std::string mString
Definition: matchgamenamestask.h:47
std::function< void(MatchGameNamesTask *source, TTV_ErrorCode ec, const std::shared_ptr< Result > &result)> Callback
Definition: matchgamenamestask.h:32
GameInfoList games
Definition: matchgamenamestask.h:29
Definition: httptask.h:22
Definition: broadcasttypes.h:220
Definition: matchgamenamestask.h:25