123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class QueuedXMPP extends XMPPHP_XMPP
- {
-
- public $plugin;
-
- public function __construct($plugin, $host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null)
- {
- $this->plugin = $plugin;
- parent::__construct($host, $port, $user, $password, $resource, $server, $printlog, $loglevel);
-
-
-
-
- if (!$server) {
- $server = $this->host;
- }
- $this->basejid = $this->user . '@' . $server;
-
-
- $this->fulljid = "{$this->basejid}/{$this->resource}";
- }
-
- public function send($msg, $timeout=NULL)
- {
- $this->plugin->enqueueOutgoingRaw($msg);
- }
-
-
- public function connect($timeout = 30, $persistent = false, $sendinit = true)
- {
-
- throw new Exception('Cannot connect to server from fake XMPP.');
- }
- public function disconnect()
- {
-
- throw new Exception('Cannot connect to server from fake XMPP.');
- }
- public function process()
- {
-
- throw new Exception('Cannot read stream from fake XMPP.');
- }
- public function processUntil($event, $timeout=-1)
- {
-
- throw new Exception('Cannot read stream from fake XMPP.');
- }
- public function read()
- {
-
- throw new Exception('Cannot read stream from fake XMPP.');
- }
- public function readyToProcess()
- {
-
- throw new Exception('Cannot read stream from fake XMPP.');
- }
-
- }
|