1
0

Interface.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <?php
  2. /**
  3. * @file
  4. * TeamSpeak 3 PHP Framework
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. * @package TeamSpeak3
  20. * @author Sven 'ScP' Paulsen
  21. * @copyright Copyright (c) Planet TeamSpeak. All rights reserved.
  22. */
  23. /**
  24. * @class TeamSpeak3_Helper_Signal_Interface
  25. * @brief Interface class describing the layout for TeamSpeak3_Helper_Signal callbacks.
  26. */
  27. interface TeamSpeak3_Helper_Signal_Interface
  28. {
  29. /**
  30. * Possible callback for '<adapter>Connected' signals.
  31. *
  32. * === Examples ===
  33. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryConnected", array($object, "onConnect"));
  34. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferConnected", array($object, "onConnect"));
  35. *
  36. * @param TeamSpeak3_Adapter_Abstract $adapter
  37. * @return void
  38. */
  39. public function onConnect(TeamSpeak3_Adapter_Abstract $adapter);
  40. /**
  41. * Possible callback for '<adapter>Disconnected' signals.
  42. *
  43. * === Examples ===
  44. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryDisconnected", array($object, "onDisconnect"));
  45. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDisconnected", array($object, "onDisconnect"));
  46. *
  47. * @return void
  48. */
  49. public function onDisconnect();
  50. /**
  51. * Possible callback for 'serverqueryCommandStarted' signals.
  52. *
  53. * === Examples ===
  54. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryCommandStarted", array($object, "onCommandStarted"));
  55. *
  56. * @param string $cmd
  57. * @return void
  58. */
  59. public function onCommandStarted($cmd);
  60. /**
  61. * Possible callback for 'serverqueryCommandFinished' signals.
  62. *
  63. * === Examples ===
  64. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryCommandFinished", array($object, "onCommandFinished"));
  65. *
  66. * @param string $cmd
  67. * @param TeamSpeak3_Adapter_ServerQuery_Reply $reply
  68. * @return void
  69. */
  70. public function onCommandFinished($cmd, TeamSpeak3_Adapter_ServerQuery_Reply $reply);
  71. /**
  72. * Possible callback for 'notifyEvent' signals.
  73. *
  74. * === Examples ===
  75. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyEvent", array($object, "onEvent"));
  76. *
  77. * @param TeamSpeak3_Adapter_ServerQuery_Event $event
  78. * @param TeamSpeak3_Node_Host $host
  79. * @return void
  80. */
  81. public function onEvent(TeamSpeak3_Adapter_ServerQuery_Event $event, TeamSpeak3_Node_Host $host);
  82. /**
  83. * Possible callback for 'notifyError' signals.
  84. *
  85. * === Examples ===
  86. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyError", array($object, "onError"));
  87. *
  88. * @param TeamSpeak3_Adapter_ServerQuery_Reply $reply
  89. * @return void
  90. */
  91. public function onError(TeamSpeak3_Adapter_ServerQuery_Reply $reply);
  92. /**
  93. * Possible callback for 'notifyServerselected' signals.
  94. *
  95. * === Examples ===
  96. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServerselected", array($object, "onServerselected"));
  97. *
  98. * @param TeamSpeak3_Node_Host $host
  99. * @return void
  100. */
  101. public function onServerselected(TeamSpeak3_Node_Host $host);
  102. /**
  103. * Possible callback for 'notifyServercreated' signals.
  104. *
  105. * === Examples ===
  106. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServercreated", array($object, "onServercreated"));
  107. *
  108. * @param TeamSpeak3_Node_Host $host
  109. * @param integer $sid
  110. * @return void
  111. */
  112. public function onServercreated(TeamSpeak3_Node_Host $host, $sid);
  113. /**
  114. * Possible callback for 'notifyServerdeleted' signals.
  115. *
  116. * === Examples ===
  117. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServerdeleted", array($object, "onServerdeleted"));
  118. *
  119. * @param TeamSpeak3_Node_Host $host
  120. * @param integer $sid
  121. * @return void
  122. */
  123. public function onServerdeleted(TeamSpeak3_Node_Host $host, $sid);
  124. /**
  125. * Possible callback for 'notifyServerstarted' signals.
  126. *
  127. * === Examples ===
  128. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServerstarted", array($object, "onServerstarted"));
  129. *
  130. * @param TeamSpeak3_Node_Host $host
  131. * @param integer $sid
  132. * @return void
  133. */
  134. public function onServerstarted(TeamSpeak3_Node_Host $host, $sid);
  135. /**
  136. * Possible callback for 'notifyServerstopped' signals.
  137. *
  138. * === Examples ===
  139. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServerstopped", array($object, "onServerstopped"));
  140. *
  141. * @param TeamSpeak3_Node_Host $host
  142. * @param integer $sid
  143. * @return void
  144. */
  145. public function onServerstopped(TeamSpeak3_Node_Host $host, $sid);
  146. /**
  147. * Possible callback for 'notifyServershutdown' signals.
  148. *
  149. * === Examples ===
  150. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyServershutdown", array($object, "onServershutdown"));
  151. *
  152. * @param TeamSpeak3_Node_Host $host
  153. * @return void
  154. */
  155. public function onServershutdown(TeamSpeak3_Node_Host $host);
  156. /**
  157. * Possible callback for 'notifyLogin' signals.
  158. *
  159. * === Examples ===
  160. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyLogin", array($object, "onLogin"));
  161. *
  162. * @param TeamSpeak3_Node_Host $host
  163. * @return void
  164. */
  165. public function onLogin(TeamSpeak3_Node_Host $host);
  166. /**
  167. * Possible callback for 'notifyLogout' signals.
  168. *
  169. * === Examples ===
  170. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyLogout", array($object, "onLogout"));
  171. *
  172. * @param TeamSpeak3_Node_Host $host
  173. * @return void
  174. */
  175. public function onLogout(TeamSpeak3_Node_Host $host);
  176. /**
  177. * Possible callback for 'notifyTokencreated' signals.
  178. *
  179. * === Examples ===
  180. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTokencreated", array($object, "onTokencreated"));
  181. *
  182. * @param TeamSpeak3_Node_Server $server
  183. * @param string $token
  184. * @return void
  185. */
  186. public function onTokencreated(TeamSpeak3_Node_Server $server, $token);
  187. /**
  188. * Possible callback for 'filetransferHandshake' signals.
  189. *
  190. * === Examples ===
  191. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferHandshake", array($object, "onFtHandshake"));
  192. *
  193. * @param TeamSpeak3_Adapter_FileTransfer $adapter
  194. * @return void
  195. */
  196. public function onFtHandshake(TeamSpeak3_Adapter_FileTransfer $adapter);
  197. /**
  198. * Possible callback for 'filetransferUploadStarted' signals.
  199. *
  200. * === Examples ===
  201. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferUploadStarted", array($object, "onFtUploadStarted"));
  202. *
  203. * @param string $ftkey
  204. * @param integer $seek
  205. * @param integer $size
  206. * @return void
  207. */
  208. public function onFtUploadStarted($ftkey, $seek, $size);
  209. /**
  210. * Possible callback for 'filetransferUploadProgress' signals.
  211. *
  212. * === Examples ===
  213. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferUploadProgress", array($object, "onFtUploadProgress"));
  214. *
  215. * @param string $ftkey
  216. * @param integer $seek
  217. * @param integer $size
  218. * @return void
  219. */
  220. public function onFtUploadProgress($ftkey, $seek, $size);
  221. /**
  222. * Possible callback for 'filetransferUploadFinished' signals.
  223. *
  224. * === Examples ===
  225. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferUploadFinished", array($object, "onFtUploadFinished"));
  226. *
  227. * @param string $ftkey
  228. * @param integer $seek
  229. * @param integer $size
  230. * @return void
  231. */
  232. public function onFtUploadFinished($ftkey, $seek, $size);
  233. /**
  234. * Possible callback for 'filetransferDownloadStarted' signals.
  235. *
  236. * === Examples ===
  237. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDownloadStarted", array($object, "onFtDownloadStarted"));
  238. *
  239. * @param string $ftkey
  240. * @param integer $buff
  241. * @param integer $size
  242. * @return void
  243. */
  244. public function onFtDownloadStarted($ftkey, $buff, $size);
  245. /**
  246. * Possible callback for 'filetransferDownloadProgress' signals.
  247. *
  248. * === Examples ===
  249. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDownloadProgress", array($object, "onFtDownloadProgress"));
  250. *
  251. * @param string $ftkey
  252. * @param integer $buff
  253. * @param integer $size
  254. * @return void
  255. */
  256. public function onFtDownloadProgress($ftkey, $buff, $size);
  257. /**
  258. * Possible callback for 'filetransferDownloadFinished' signals.
  259. *
  260. * === Examples ===
  261. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDownloadFinished", array($object, "onFtDownloadFinished"));
  262. *
  263. * @param string $ftkey
  264. * @param integer $buff
  265. * @param integer $size
  266. * @return void
  267. */
  268. public function onFtDownloadFinished($ftkey, $buff, $size);
  269. /**
  270. * Possible callback for '<adapter>DataRead' signals.
  271. *
  272. * === Examples ===
  273. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryDataRead", array($object, "onDebugDataRead"));
  274. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDataRead", array($object, "onDebugDataRead"));
  275. *
  276. * @param string $data
  277. * @return void
  278. */
  279. public function onDebugDataRead($data);
  280. /**
  281. * Possible callback for '<adapter>DataSend' signals.
  282. *
  283. * === Examples ===
  284. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryDataSend", array($object, "onDebugDataSend"));
  285. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferDataSend", array($object, "onDebugDataSend"));
  286. *
  287. * @param string $data
  288. * @return void
  289. */
  290. public function onDebugDataSend($data);
  291. /**
  292. * Possible callback for '<adapter>WaitTimeout' signals.
  293. *
  294. * === Examples ===
  295. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("serverqueryWaitTimeout", array($object, "onWaitTimeout"));
  296. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("filetransferWaitTimeout", array($object, "onWaitTimeout"));
  297. *
  298. * @param integer $time
  299. * @param TeamSpeak3_Adapter_Abstract $adapter
  300. * @return void
  301. */
  302. public function onWaitTimeout($time, TeamSpeak3_Adapter_Abstract $adapter);
  303. /**
  304. * Possible callback for 'errorException' signals.
  305. *
  306. * === Examples ===
  307. * - TeamSpeak3_Helper_Signal::getInstance()->subscribe("errorException", array($object, "onException"));
  308. *
  309. * @param TeamSpeak3_Exception $e
  310. * @return void
  311. */
  312. public function onException(TeamSpeak3_Exception $e);
  313. }