Twitch SDK (Internal)
chatwriter.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 #ifndef TTVSDK_CHATWRITER_H
10 #define TTVSDK_CHATWRITER_H
11 
14 
15 namespace ttv
16 {
17  namespace chat
18  {
19  class ChatWriter;
20  }
21 }
22 
23 
28 {
29 public:
30  ChatWriter();
31  ~ChatWriter();
32 
33  void SetTransport(std::shared_ptr<IChatTransport> pTransport);
34 
35 // IWriteNetworkEvent
36  void WriteEvent(const ChatNetworkEvent& evt);
37 
38 
39 protected:
40  void WriteRaw(const std::string& message);
41 
42  std::shared_ptr<IChatTransport> mTransport;
44 };
45 
46 #endif // TTVSDK_CHATWRITER_H
void WriteEvent(const ChatNetworkEvent &evt)
static const uint32_t kMaxBufferSize
Definition: ichattransport.h:58
char mParseBuffer[IChatTransport::kMaxBufferSize]
A scratch buffer for parsing lines.
Definition: chatwriter.h:43
void SetTransport(std::shared_ptr< IChatTransport > pTransport)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Definition: chatwriter.h:27
Definition: chatnetworkevent.h:98
std::shared_ptr< IChatTransport > mTransport
Definition: chatwriter.h:42
void WriteRaw(const std::string &message)
Definition: chatnetworkevent.h:29