Twitch SDK (Internal)
ichatchannelpropertylistener.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 
12 
13 namespace ttv
14 {
15  namespace chat
16  {
17  class IChatChannelPropertyListener;
18  class ChatChannelPropertyListenerProxy;
19  }
20 }
21 
26 {
27 public:
33  virtual void RitualsEnabled(bool ritualsEnabled) = 0;
34 
35 
41  virtual void HostTargetChanged(const HostTargetChange& hostTargetChange) = 0;
42 };
43 
44 
46 {
47 public:
48  using RitualsEnabledCallback = std::function<void(bool ritualsEnabled)>;
49  using HostTargetChangedCallback = std::function<void(const HostTargetChange& hostTargetChange)>;
50 
51  // IChatChannelPropertyListener implementation
52  virtual void RitualsEnabled(bool ritualsEnabled) override
53  {
54  if (ritualsEnabledCallback != nullptr)
55  {
56  ritualsEnabledCallback(ritualsEnabled);
57  }
58  }
59 
60  virtual void HostTargetChanged(const HostTargetChange& hostTargetChange) override
61  {
62  if (hostTargetChanged != nullptr)
63  {
64  hostTargetChanged(hostTargetChange);
65  }
66  }
67 
70 };
std::function< void(bool ritualsEnabled)> RitualsEnabledCallback
Definition: ichatchannelpropertylistener.h:48
virtual void HostTargetChanged(const HostTargetChange &hostTargetChange) override
Definition: ichatchannelpropertylistener.h:60
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual void RitualsEnabled(bool ritualsEnabled)=0
virtual void HostTargetChanged(const HostTargetChange &hostTargetChange)=0
Definition: chattypes.h:874
Definition: ichatchannelpropertylistener.h:25
virtual void RitualsEnabled(bool ritualsEnabled) override
Definition: ichatchannelpropertylistener.h:52
Definition: ichatchannelpropertylistener.h:45
std::function< void(const HostTargetChange &hostTargetChange)> HostTargetChangedCallback
Definition: ichatchannelpropertylistener.h:49
HostTargetChangedCallback hostTargetChanged
Definition: ichatchannelpropertylistener.h:69
RitualsEnabledCallback ritualsEnabledCallback
Definition: ichatchannelpropertylistener.h:68