Twitch SDK (Internal)
followersstatus.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-2017 Twitch Interactive, Inc.
7  *********************************************************************************************/
8 
9 #pragma once
10 
13 
14 namespace ttv
15 {
16  namespace chat
17  {
18  class IFollowersListener;
19  class FollowersStatus;
20  }
21 }
22 
23 
27 class ttv::chat::FollowersStatus : public ttv::PubSubComponent<IFollowersListener>, public IFollowersStatus
28 {
29 public:
30  using DisposerFunc = std::function<void()>;
31 
32 public:
33  FollowersStatus(const std::shared_ptr<User>& user, ChannelId channelId);
34 
35  static std::string GetComponentName() { return "ttv::FollowersStatus"; }
36  virtual std::string GetLoggerName() const override;
37 
38  // IFollowersStatus Implementation
39  virtual TTV_ErrorCode Dispose() override;
40 
41  void OnTopicSubscribeStateChanged(const std::string& topic, PubSubClient::SubscribeState::Enum state, TTV_ErrorCode ec) override;
42  void OnTopicMessageReceived(const std::string& topic, const json::Value& msg) override;
43 
44 private:
45  std::string mPubSubTopic;
46 };
std::string mPubSubTopic
Definition: followersstatus.h:45
FollowersStatus(const std::shared_ptr< User > &user, ChannelId channelId)
Definition: ifollowersstatus.h:26
Definition: followersstatus.h:27
void OnTopicSubscribeStateChanged(const std::string &topic, PubSubClient::SubscribeState::Enum state, TTV_ErrorCode ec) override
virtual std::string GetLoggerName() const override
static std::string GetComponentName()
Definition: followersstatus.h:35
Enum
Definition: pubsubclient.h:91
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Represents a JSON value.
Definition: value.h:114
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
virtual TTV_ErrorCode Dispose() override
std::function< void()> DisposerFunc
Definition: followersstatus.h:30
void OnTopicMessageReceived(const std::string &topic, const json::Value &msg) override
uint32_t ChannelId
Definition: coretypes.h:23
Definition: pubsubcomponent.h:21