diff options
Diffstat (limited to 'docs/_event_broadcaster_8h_source.html')
-rw-r--r-- | docs/_event_broadcaster_8h_source.html | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/docs/_event_broadcaster_8h_source.html b/docs/_event_broadcaster_8h_source.html new file mode 100644 index 0000000..a983b00 --- /dev/null +++ b/docs/_event_broadcaster_8h_source.html @@ -0,0 +1,120 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="viewport" content="width=device-width, initial-scale=1"/> +<title>tgbot-cpp: include/tgbot/EventBroadcaster.h Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtreedata.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/searchdata.js"></script> +<script type="text/javascript" src="search/search.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">tgbot-cpp + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> +<script type="text/javascript" src="menudata.js"></script> +<script type="text/javascript" src="menu.js"></script> +<script type="text/javascript"> +$(function() { + initMenu('',true,false,'search.php','Search'); + $(document).ready(function() { init_search(); }); +}); +</script> +<div id="main-nav"></div> +</div><!-- top --> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + <div id="nav-sync" class="sync"></div> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> +$(document).ready(function(){initNavTree('_event_broadcaster_8h_source.html','');}); +</script> +<div id="doc-content"> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +</div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">EventBroadcaster.h</div> </div> +</div><!--header--> +<div class="contents"> +<a href="_event_broadcaster_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2015 Oleg Morozenkov</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to deal</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> */</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#ifndef TGBOT_EVENTBROADCASTER_H</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#define TGBOT_EVENTBROADCASTER_H</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <functional></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_message_8h.html">tgbot/types/Message.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="_inline_query_8h.html">tgbot/types/InlineQuery.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="_chosen_inline_result_8h.html">tgbot/types/ChosenInlineResult.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="_callback_query_8h.html">tgbot/types/CallbackQuery.h</a>"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">namespace </span><a class="code" href="namespace_tg_bot.html">TgBot</a> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">class </span>EventHandler;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html"> 44</a></span> <span class="keyword">class </span><a class="code" href="class_tg_bot_1_1_event_broadcaster.html">EventBroadcaster</a> {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">friend</span> <a class="code" href="class_tg_bot_1_1_event_handler.html">EventHandler</a>;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a9fda4ac3089dc101be4fd3a2a104185c"> 49</a></span>  <span class="keyword">typedef</span> std::function<void (const Message::Ptr&)> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a9fda4ac3089dc101be4fd3a2a104185c">MessageListener</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a437f0af514141d0a5d4fb684a56fe199"> 50</a></span>  <span class="keyword">typedef</span> std::function<void (const InlineQuery::Ptr&)> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a437f0af514141d0a5d4fb684a56fe199">InlineQueryListener</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#af9b674f16ddd707748f7ca8bf7f3ef91"> 51</a></span>  <span class="keyword">typedef</span> std::function<void (const ChosenInlineResult::Ptr&)> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#af9b674f16ddd707748f7ca8bf7f3ef91">ChosenInlineResultListener</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a1b5bf368b89d78d9c1582a1523a66b4e"> 52</a></span>  <span class="keyword">typedef</span> std::function<void (const CallbackQuery::Ptr&)> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a1b5bf368b89d78d9c1582a1523a66b4e">CallbackQueryListener</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a21adc85e9ed2a08a186423a5231342a9"> 58</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a21adc85e9ed2a08a186423a5231342a9">onAnyMessage</a>(<span class="keyword">const</span> MessageListener& listener) {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  _onAnyMessageListeners.push_back(listener);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  }</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a13e4a906203fe43a950f1420b68c7583"> 67</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a13e4a906203fe43a950f1420b68c7583">onCommand</a>(<span class="keyword">const</span> std::string& commandName, <span class="keyword">const</span> MessageListener& listener) {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  _onCommandListeners[commandName] = listener;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a5bed996221f047ec0469ae19e7bd00eb"> 75</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a5bed996221f047ec0469ae19e7bd00eb">onUnknownCommand</a>(<span class="keyword">const</span> MessageListener& listener) {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  _onUnknownCommandListeners.push_back(listener);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a22e70b8493ea455e70734a36968f3d55"> 83</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a22e70b8493ea455e70734a36968f3d55">onNonCommandMessage</a>(<span class="keyword">const</span> MessageListener& listener) {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  _onNonCommandMessageListeners.push_back(listener);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a9d3f31225ea84af8cb47ab2a53186ef0"> 91</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a9d3f31225ea84af8cb47ab2a53186ef0">onInlineQuery</a>(<span class="keyword">const</span> InlineQueryListener& listener) {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  _onInlineQueryListeners.push_back(listener);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a7397520ff294c863b306142e29030482"> 99</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a7397520ff294c863b306142e29030482">onChosenInlineResult</a>(<span class="keyword">const</span> ChosenInlineResultListener& listener){</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  _onChosenInlineResultListeners.push_back(listener);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="class_tg_bot_1_1_event_broadcaster.html#a3ec551ffdcf5be1b9b39ed081ea078d4"> 103</a></span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_tg_bot_1_1_event_broadcaster.html#a3ec551ffdcf5be1b9b39ed081ea078d4">onCallbackQuery</a>(<span class="keyword">const</span> CallbackQueryListener& listener){</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  _onCallbackQueryListeners.push_back(listener);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  }</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keyword">template</span><<span class="keyword">typename</span> ListenerType, <span class="keyword">typename</span> ObjectType></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcast(<span class="keyword">const</span> std::vector<ListenerType>& listeners, <span class="keyword">const</span> ObjectType& <span class="keywordtype">object</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">if</span> (!<span class="keywordtype">object</span>)</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> ListenerType& item : listeners) {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  item(<span class="keywordtype">object</span>);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastAnyMessage(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_message.html#a3805a5dc013c6ab23ac5efc91282c11d">Message::Ptr</a>& message)<span class="keyword"> const </span>{</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  broadcast<MessageListener, Message::Ptr>(_onAnyMessageListeners, message);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keyword">inline</span> <span class="keywordtype">bool</span> broadcastCommand(<span class="keyword">const</span> std::string command, <span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_message.html#a3805a5dc013c6ab23ac5efc91282c11d">Message::Ptr</a>& message)<span class="keyword"> const </span>{</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  std::map<std::string, MessageListener>::const_iterator iter = _onCommandListeners.find(command);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">if</span> (iter == _onCommandListeners.end()) {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  iter->second(message);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastUnknownCommand(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_message.html#a3805a5dc013c6ab23ac5efc91282c11d">Message::Ptr</a>& message)<span class="keyword"> const </span>{</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  broadcast<MessageListener, Message::Ptr>(_onUnknownCommandListeners, message);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastNonCommandMessage(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_message.html#a3805a5dc013c6ab23ac5efc91282c11d">Message::Ptr</a>& message)<span class="keyword"> const </span>{</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  broadcast<MessageListener, Message::Ptr>(_onNonCommandMessageListeners, message);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  }</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastInlineQuery(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_inline_query.html#a82b36b38b3587e6a721b6fa579759b0c">InlineQuery::Ptr</a>& query)<span class="keyword"> const </span>{</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  broadcast<InlineQueryListener, InlineQuery::Ptr>(_onInlineQueryListeners, query);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  }</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastChosenInlineResult(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_chosen_inline_result.html#ad4b7edd30fd0d876fa99493fe19b3247">ChosenInlineResult::Ptr</a>& result)<span class="keyword"> const </span>{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  broadcast<ChosenInlineResultListener, ChosenInlineResult::Ptr>(_onChosenInlineResultListeners, result);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keyword">inline</span> <span class="keywordtype">void</span> broadcastCallbackQuery(<span class="keyword">const</span> <a class="code" href="class_tg_bot_1_1_callback_query.html#a5a5e4f8368bd95ba214e68cde5d1c7c0">CallbackQuery::Ptr</a>& result)<span class="keyword"> const </span>{</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  broadcast<CallbackQueryListener, CallbackQuery::Ptr>(_onCallbackQueryListeners, result);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  std::vector<MessageListener> _onAnyMessageListeners;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  std::map<std::string, MessageListener> _onCommandListeners;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  std::vector<MessageListener> _onUnknownCommandListeners;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  std::vector<MessageListener> _onNonCommandMessageListeners;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  std::vector<InlineQueryListener> _onInlineQueryListeners;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  std::vector<ChosenInlineResultListener> _onChosenInlineResultListeners;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  std::vector<CallbackQueryListener> _onCallbackQueryListeners;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> };</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="preprocessor">#endif //TGBOT_EVENTBROADCASTER_H</span></div><div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a21adc85e9ed2a08a186423a5231342a9"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a21adc85e9ed2a08a186423a5231342a9">TgBot::EventBroadcaster::onAnyMessage</a></div><div class="ttdeci">void onAnyMessage(const MessageListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00058">EventBroadcaster.h:58</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html">TgBot::EventBroadcaster</a></div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00044">EventBroadcaster.h:44</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a9fda4ac3089dc101be4fd3a2a104185c"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a9fda4ac3089dc101be4fd3a2a104185c">TgBot::EventBroadcaster::MessageListener</a></div><div class="ttdeci">std::function< void(const Message::Ptr &)> MessageListener</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00049">EventBroadcaster.h:49</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_callback_query_html_a5a5e4f8368bd95ba214e68cde5d1c7c0"><div class="ttname"><a href="class_tg_bot_1_1_callback_query.html#a5a5e4f8368bd95ba214e68cde5d1c7c0">TgBot::CallbackQuery::Ptr</a></div><div class="ttdeci">std::shared_ptr< CallbackQuery > Ptr</div><div class="ttdef"><b>Definition:</b> <a href="_callback_query_8h_source.html#l00022">CallbackQuery.h:22</a></div></div> +<div class="ttc" id="namespace_tg_bot_html"><div class="ttname"><a href="namespace_tg_bot.html">TgBot</a></div><div class="ttdef"><b>Definition:</b> <a href="_api_8h_source.html#l00044">Api.h:44</a></div></div> +<div class="ttc" id="_callback_query_8h_html"><div class="ttname"><a href="_callback_query_8h.html">CallbackQuery.h</a></div></div> +<div class="ttc" id="_inline_query_8h_html"><div class="ttname"><a href="_inline_query_8h.html">InlineQuery.h</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_message_html_a3805a5dc013c6ab23ac5efc91282c11d"><div class="ttname"><a href="class_tg_bot_1_1_message.html#a3805a5dc013c6ab23ac5efc91282c11d">TgBot::Message::Ptr</a></div><div class="ttdeci">std::shared_ptr< Message > Ptr</div><div class="ttdef"><b>Definition:</b> <a href="_message_8h_source.html#l00052">Message.h:52</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a1b5bf368b89d78d9c1582a1523a66b4e"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a1b5bf368b89d78d9c1582a1523a66b4e">TgBot::EventBroadcaster::CallbackQueryListener</a></div><div class="ttdeci">std::function< void(const CallbackQuery::Ptr &)> CallbackQueryListener</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00052">EventBroadcaster.h:52</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_handler_html"><div class="ttname"><a href="class_tg_bot_1_1_event_handler.html">TgBot::EventHandler</a></div><div class="ttdef"><b>Definition:</b> <a href="_event_handler_8h_source.html#l00032">EventHandler.h:32</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_chosen_inline_result_html_ad4b7edd30fd0d876fa99493fe19b3247"><div class="ttname"><a href="class_tg_bot_1_1_chosen_inline_result.html#ad4b7edd30fd0d876fa99493fe19b3247">TgBot::ChosenInlineResult::Ptr</a></div><div class="ttdeci">std::shared_ptr< ChosenInlineResult > Ptr</div><div class="ttdef"><b>Definition:</b> <a href="_chosen_inline_result_8h_source.html#l00022">ChosenInlineResult.h:22</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a9d3f31225ea84af8cb47ab2a53186ef0"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a9d3f31225ea84af8cb47ab2a53186ef0">TgBot::EventBroadcaster::onInlineQuery</a></div><div class="ttdeci">void onInlineQuery(const InlineQueryListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00091">EventBroadcaster.h:91</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_af9b674f16ddd707748f7ca8bf7f3ef91"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#af9b674f16ddd707748f7ca8bf7f3ef91">TgBot::EventBroadcaster::ChosenInlineResultListener</a></div><div class="ttdeci">std::function< void(const ChosenInlineResult::Ptr &)> ChosenInlineResultListener</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00051">EventBroadcaster.h:51</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a3ec551ffdcf5be1b9b39ed081ea078d4"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a3ec551ffdcf5be1b9b39ed081ea078d4">TgBot::EventBroadcaster::onCallbackQuery</a></div><div class="ttdeci">void onCallbackQuery(const CallbackQueryListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00103">EventBroadcaster.h:103</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a5bed996221f047ec0469ae19e7bd00eb"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a5bed996221f047ec0469ae19e7bd00eb">TgBot::EventBroadcaster::onUnknownCommand</a></div><div class="ttdeci">void onUnknownCommand(const MessageListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00075">EventBroadcaster.h:75</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a437f0af514141d0a5d4fb684a56fe199"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a437f0af514141d0a5d4fb684a56fe199">TgBot::EventBroadcaster::InlineQueryListener</a></div><div class="ttdeci">std::function< void(const InlineQuery::Ptr &)> InlineQueryListener</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00050">EventBroadcaster.h:50</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a13e4a906203fe43a950f1420b68c7583"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a13e4a906203fe43a950f1420b68c7583">TgBot::EventBroadcaster::onCommand</a></div><div class="ttdeci">void onCommand(const std::string &commandName, const MessageListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00067">EventBroadcaster.h:67</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a22e70b8493ea455e70734a36968f3d55"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a22e70b8493ea455e70734a36968f3d55">TgBot::EventBroadcaster::onNonCommandMessage</a></div><div class="ttdeci">void onNonCommandMessage(const MessageListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00083">EventBroadcaster.h:83</a></div></div> +<div class="ttc" id="_chosen_inline_result_8h_html"><div class="ttname"><a href="_chosen_inline_result_8h.html">ChosenInlineResult.h</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_event_broadcaster_html_a7397520ff294c863b306142e29030482"><div class="ttname"><a href="class_tg_bot_1_1_event_broadcaster.html#a7397520ff294c863b306142e29030482">TgBot::EventBroadcaster::onChosenInlineResult</a></div><div class="ttdeci">void onChosenInlineResult(const ChosenInlineResultListener &listener)</div><div class="ttdef"><b>Definition:</b> <a href="_event_broadcaster_8h_source.html#l00099">EventBroadcaster.h:99</a></div></div> +<div class="ttc" id="class_tg_bot_1_1_inline_query_html_a82b36b38b3587e6a721b6fa579759b0c"><div class="ttname"><a href="class_tg_bot_1_1_inline_query.html#a82b36b38b3587e6a721b6fa579759b0c">TgBot::InlineQuery::Ptr</a></div><div class="ttdeci">std::shared_ptr< InlineQuery > Ptr</div><div class="ttdef"><b>Definition:</b> <a href="_inline_query_8h_source.html#l00022">InlineQuery.h:22</a></div></div> +<div class="ttc" id="_message_8h_html"><div class="ttname"><a href="_message_8h.html">Message.h</a></div></div> +</div><!-- fragment --></div><!-- contents --> +</div><!-- doc-content --> +<!-- start footer part --> +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_25b26b9fa3b0bd1537052b03f43dd617.html">tgbot</a></li><li class="navelem"><a class="el" href="_event_broadcaster_8h.html">EventBroadcaster.h</a></li> + <li class="footer">Generated on Sun Jan 15 2017 02:46:16 for tgbot-cpp by + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> + </ul> +</div> +</body> +</html> |