Twitch SDK (Internal)
implicitgrantlistenertask.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 // TODO: This needs evaluation as to whether we want to support this
10 #if 0
11 
12 #pragma once
13 
16 #include "twitchsdk/core/socket.h"
17 #include <string>
18 
19 namespace ttv
20 {
21  namespace broadcast
22  {
23  class ImplicitGrantListenerTask;
24  class Streamer;
25  }
26 }
27 
28 class ttv::broadcast::ImplicitGrantListenerTask : public ttv::Task
29 {
30 public:
31  ImplicitGrantListenerTask(TTV_TaskCallback clientCallback,
32  void* userData,
33  const std::string& clientId,
34  const std::string& port,
35  const std::string& successRedirect,
36  const std::string& failureRedirect,
37  const std::vector<std::string>& scopes,
38  TwitchAPI::AuthToken* authToken);
39 
40  virtual ~ImplicitGrantListenerTask() {}
41 
42  virtual void Run();
43  virtual void OnComplete();
44  virtual const char* GetTaskName() const { return "ImplicitGrantListener"; }
45 
46 protected:
47  ImplicitGrantListenerTask operator=(ImplicitGrantListenerTask& rhs);
48 
49  std::string mClientId;
50  std::string mPort;
51  std::string mScopes;
52  std::string mSuccessRedirect;
53  std::string mFailureRedirect;
54 
55  std::shared_ptr<ISocket> mLoginListener;
56 
57  TTV_ErrorCode mResult;
58  TwitchAPI::AuthToken* mResultAuthToken;
59  std::string mHttpError;
60  std::string mHttpErrorDescription;
61 };
62 
63 #endif
Definition: task.h:19
virtual void Run()=0
virtual const char * GetTaskName() const =0
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
void(* TTV_TaskCallback)(TTV_ErrorCode result, void *userData)
Definition: tasktypes.h:16
virtual void OnComplete()=0