Author: abhinavsingh
Exemple #1
0
 public function test_xmpp_stanza_nested()
 {
     $xml = new JAXLXml('message', array('to' => '1@a.z', 'from' => '2@b.c'));
     $xml->c('body')->attrs(array('xml:lang' => 'en'))->t('hello')->up()->c('thread')->t('1234')->up()->c('nested')->c('nest')->t('nest1')->up()->c('nest')->t('nest2')->up()->c('nest')->t('nest3')->up()->up()->c('c')->attrs(array('hash' => '84jsdmnskd'));
     $stanza = new XMPPStanza($xml);
     $this->assertEquals('<message to="1@a.z" from="2@b.c"><body xml:lang="en">hello</body><thread>1234</thread><nested>' . '<nest>nest1</nest><nest>nest2</nest><nest>nest3</nest></nested><c hash="84jsdmnskd"></c></message>', $stanza->to_string());
 }
 public function set_form($domain, $form)
 {
     $query = new JAXLXml('query', NS_INBAND_REGISTER);
     foreach ($form as $k => $v) {
         $query->c($k, null, array(), $v)->up();
     }
     $pkt = $this->jaxl->get_iq_pkt(array('to' => $domain, 'type' => 'set'), $query);
     $this->jaxl->send($pkt);
 }
Exemple #3
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('presence', 'itemJid', '//presence/x/item/@jid');
     JAXLXml::addTag('presence', 'itemAffiliation', '//presence/x/item/@affiliation');
     JAXLXml::addTag('presence', 'itemRole', '//presence/x/item/@role');
 }
Exemple #4
0
 public static function init($jaxl)
 {
     // requires PEP XEP
     $jaxl->requires('JAXL0163');
     // update client feature list
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'geoloc', '//message/event/items/item/geoloc/@xmlns');
     JAXLXml::addTag('message', 'geolocLang', '//message/event/items/item/geoloc/@xml:lang');
     JAXLXml::addTag('message', 'geolocAccuracy', '//message/event/items/item/geoloc/accuracy');
     JAXLXml::addTag('message', 'geolocAlt', '//message/event/items/item/geoloc/alt');
     JAXLXml::addTag('message', 'geolocBearing', '//message/event/items/item/geoloc/bearing');
     JAXLXml::addTag('message', 'geolocBuilding', '//message/event/items/item/geoloc/building');
     JAXLXml::addTag('message', 'geolocCountry', '//message/event/items/item/geoloc/country');
     JAXLXml::addTag('message', 'geolocCountryCode', '//message/event/items/item/geoloc/countrycode');
     JAXLXml::addTag('message', 'geolocDatum', '//message/event/items/item/geoloc/datum');
     JAXLXml::addTag('message', 'geolocDescription', '//message/event/items/item/geoloc/description');
     JAXLXml::addTag('message', 'geolocError', '//message/event/items/item/geoloc/error');
     JAXLXml::addTag('message', 'geolocFloor', '//message/event/items/item/geoloc/floor');
     JAXLXml::addTag('message', 'geolocLat', '//message/event/items/item/geoloc/lat');
     JAXLXml::addTag('message', 'geolocLocality', '//message/event/items/item/geoloc/locality');
     JAXLXml::addTag('message', 'geolocLon', '//message/event/items/item/geoloc/lon');
     JAXLXml::addTag('message', 'geolocPostalCode', '//message/event/items/item/geoloc/postalcode');
     JAXLXml::addTag('message', 'geolocRegion', '//message/event/items/item/geoloc/region');
     JAXLXml::addTag('message', 'geolocRoom', '//message/event/items/item/geoloc/room');
     JAXLXml::addTag('message', 'geolocSpeed', '//message/event/items/item/geoloc/speed');
     JAXLXml::addTag('message', 'geolocStreet', '//message/event/items/item/geoloc/street');
     JAXLXml::addTag('message', 'geolocText', '//message/event/items/item/geoloc/text');
     JAXLXml::addTag('message', 'geolocTimestamp', '//message/event/items/item/geoloc/timestamp');
     JAXLXml::addTag('message', 'geolocURI', '//message/event/items/item/geoloc/uri');
 }
Exemple #5
0
 public static function init($jaxl)
 {
     JAXLXml::addTag('iq', 'registerInstruction', '//iq/query/instructions');
     JAXLXml::addTag('iq', 'registerUsername', '//iq/query/username');
     JAXLXml::addTag('iq', 'registerPassword', '//iq/query/password');
     $jaxl->features[] = self::$ns;
 }
Exemple #6
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'vCard', '//iq/vCard/@xmlns');
     JAXLXml::addTag('iq', 'vCardFN', '//iq/vCard/FN');
     JAXLXml::addTag('iq', 'vCardNFamily', '//iq/vCard/N/FAMILY');
     JAXLXml::addTag('iq', 'vCardNGiven', '//iq/vCard/N/GIVEN');
     JAXLXml::addTag('iq', 'vCardNMiddle', '//iq/vCard/N/MIDDLE');
     JAXLXml::addTag('iq', 'vCardNickname', '//iq/vCard/NICKNAME');
     JAXLXml::addTag('iq', 'vCardPhotoType', '//iq/vCard/PHOTO/TYPE');
     JAXLXml::addTag('iq', 'vCardPhotoBinVal', '//iq/vCard/PHOTO/BINVAL');
     JAXLXml::addTag('iq', 'vCardUrl', '//iq/vCard/URL');
     JAXLXml::addTag('iq', 'vCardBDay', '//iq/vCard/BDAY');
     JAXLXml::addTag('iq', 'vCardOrgName', '//iq/vCard/ORGNAME');
     JAXLXml::addTag('iq', 'vCardOrgUnit', '//iq/vCard/ORGUNIT');
     JAXLXml::addTag('iq', 'vCardTitle', '//iq/vCard/TITLE');
     JAXLXml::addTag('iq', 'vCardRole', '//iq/vCard/ROLE');
     JAXLXml::addTag('iq', 'vCardTelWork', '//iq/vCard/TEL/WORK');
     JAXLXml::addTag('iq', 'vCardTelVoice', '//iq/vCard/TEL/VOICE');
     JAXLXml::addTag('iq', 'vCardTelFax', '//iq/vCard/TEL/FAX');
     JAXLXml::addTag('iq', 'vCardTelMsg', '//iq/vCard/TEL/MSG');
     JAXLXml::addTag('iq', 'vCardAdrWork', '//iq/vCard/ADR/WORK');
     JAXLXml::addTag('iq', 'vCardAdrExtadd', '//iq/vCard/ADR/EXTADD');
     JAXLXml::addTag('iq', 'vCardAdrStreet', '//iq/vCard/ADR/STREET');
     JAXLXml::addTag('iq', 'vCardAdrLocality', '//iq/vCard/ADR/LOCALITY');
     JAXLXml::addTag('iq', 'vCardAdrRegion', '//iq/vCard/ADR/REGION');
     JAXLXml::addTag('iq', 'vCardAdrPcode', '//iq/vCard/ADR/PCODE');
     JAXLXml::addTag('iq', 'vCardAdrCtry', '//iq/vCard/ADR/CTRY');
     JAXLXml::addTag('iq', 'vCardDesc', '//iq/vCard/DESC');
 }
Exemple #7
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'gAutoAccept', '//iq/usersetting/autoacceptsuggestions/@value');
     JAXLXml::addTag('iq', 'gMailNotify', '//iq/usersetting/mailnotifications/@value');
     JAXLXml::addTag('iq', 'gArchiveEnable', '//iq/usersetting/archivingenabled/@value');
 }
Exemple #8
0
 public function __set($prop, $val)
 {
     switch ($prop) {
         // access to jaxl xml properties
         case 'name':
         case 'ns':
         case 'text':
         case 'attrs':
         case 'children':
             return $this->xml->{$prop} = $val;
             break;
             // access to common xml attributes
         // access to common xml attributes
         case 'to':
         case 'from':
         case 'id':
         case 'type':
             $this->xml->attrs[$prop] = $val;
             return true;
             break;
             // access to parts of common xml attributes
         // access to parts of common xml attributes
         case 'to_node':
         case 'to_domain':
         case 'to_resource':
         case 'from_node':
         case 'from_domain':
         case 'from_resource':
             list($attr, $key) = explode('_', $prop);
             $val1 = isset($this->xml->attrs[$attr]) ? $this->xml->attrs[$attr] : null;
             if (!$val1) {
                 $val1 = '';
             }
             $val1 = new XMPPJid($val1);
             $val1->{$key} = $val;
             $this->xml->attrs[$attr] = $val1->to_string();
             return true;
             break;
             // access to first child element text
         // access to first child element text
         case 'status':
         case 'show':
         case 'priority':
         case 'body':
         case 'thread':
         case 'subject':
             $val1 = $this->xml->exists($prop);
             if (!$val1) {
                 $this->xml->c($prop)->t($val)->up();
             } else {
                 $this->xml->update($prop, $val1->ns, $val1->attrs, $val);
             }
             return true;
             break;
         default:
             return null;
             break;
     }
 }
Exemple #9
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'si', '//iq/si/@xmlns');
     JAXLXml::addTag('iq', 'siId', '//iq/si/@id');
     JAXLXml::addTag('iq', 'siMime', '//iq/si/@mime-type');
     JAXLXml::addTag('iq', 'siProfile', '//iq/si/@profile');
 }
Exemple #10
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'request', '//message/request/@xmlns');
     JAXLXml::addTag('message', 'received', '//message/received/@xmlns');
     JAXLXml::addTag('message', 'receivedId', '//message/received/@id');
     $jaxl->addPlugin('jaxl_get_message', array('JAXL0184', 'handleMessage'));
 }
Exemple #11
0
 public static function init($jaxl)
 {
     // requires PEP XEP
     $jaxl->requires('JAXL0163');
     // update client feature list
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'activity', '//message/event/items/item/activity/@xmlns');
 }
Exemple #12
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'softwareName', '//iq/query[@xmlns="' . self::$ns . '"]/name');
     JAXLXml::addTag('iq', 'softwareVersion', '//iq/query[@xmlns="' . self::$ns . '"]/version');
     JAXLXml::addTag('iq', 'softwareOS', '//iq/query[@xmlns="' . self::$ns . '"]/os');
     JAXLPlugin::add('jaxl_get_iq_get', array('JAXL0092', 'getIq'));
 }
Exemple #13
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'time', '//iq/time/@xmlns');
     JAXLXml::addTag('iq', 'timeTZO', '//iq/time/tzo');
     JAXLXml::addTag('iq', 'timeUTC', '//iq/time/utc');
     JAXLPlugin::add('jaxl_get_iq_get', array('JAXL0202', 'handleIq'));
 }
Exemple #14
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'xData', '/iq/query/x/@xmlns');
     JAXLXml::addTag('iq', 'xDataType', '/iq/query/x/@type');
     JAXLXml::addTag('iq', 'xDataVar', '/iq/query/x/field/@var');
     JAXLXml::addTag('iq', 'xDataLabel', '/iq/query/x/field/@label');
     JAXLXml::addTag('iq', 'xDataValue', '/iq/query/x/field/value');
 }
Exemple #15
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('presence', 'cXmlns', '//presence/c/@xmlns');
     JAXLXml::addTag('presence', 'cHash', '//presence/c/@hash');
     JAXLXml::addTag('presence', 'cNode', '//presence/c/@node');
     JAXLXml::addTag('presence', 'cVer', '//presence/c/@ver');
     JAXLXml::addTag('iq', 'queryNode', '//iq/query/@node');
 }
Exemple #16
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'composing', '//message/composing/@xmlns');
     JAXLXml::addTag('message', 'active', '//message/active/@xmlns');
     JAXLXml::addTag('message', 'inactive', '//message/inactive/@xmlns');
     JAXLXml::addTag('message', 'paused', '//message/paused/@xmlns');
     JAXLXml::addTag('message', 'gone', '//message/gone/@xmlns');
     $jaxl->addPlugin('jaxl_get_message', array('JAXL0085', 'getMessage'));
 }
Exemple #17
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     $jaxl->pingInterval = 0;
     $jaxl->pingInterval = $jaxl->getConfigByPriority($jaxl->config['pingInterval'], "JAXL_PING_INTERVAL", $jaxl->pingInterval);
     if ($jaxl->pingInterval > 0) {
         JAXLCron::add(array('JAXL0199', 'ping'), $jaxl->pingInterval, $jaxl->domain, $jaxl->jid, array('JAXL0199', 'pinged'));
     }
     JAXLXml::addTag('iq', 'ping', '//iq/ping/@xmlns');
     $jaxl->addPlugin('jaxl_get_iq_get', array('JAXL0199', 'handleIq'));
 }
Exemple #18
0
function on_auth_success_callback()
{
    global $client;
    JAXLLogger::info("got on_auth_success cb, jid " . $client->full_jid->to_string());
    // create node
    //$client->xeps['0060']->create_node('pubsub.localhost', 'dummy_node');
    // publish
    $item = new JAXLXml('item', null, array('id' => time()));
    $item->c('entry', 'http://www.w3.org/2005/Atom');
    $item->c('title')->t('Soliloquy')->up();
    $item->c('summary')->t('To be, or not to be: that is the question')->up();
    $item->c('link', null, array('rel' => 'alternate', 'type' => 'text/html', 'href' => 'http://denmark.lit/2003/12/13/atom03'))->up();
    $item->c('id')->t('tag:denmark.lit,2003:entry-32397')->up();
    $item->c('published')->t('2003-12-13T18:30:02Z')->up();
    $item->c('updated')->t('2003-12-13T18:30:02Z')->up();
    $client->xeps['0060']->publish_item('pubsub.localhost', 'dummy_node', $item);
}
Exemple #19
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns['info'];
     $jaxl->features[] = self::$ns['items'];
     JAXLXml::addTag('iq', 'identityCategory', '//iq/query/identity/@category');
     JAXLXml::addTag('iq', 'identityText', '//iq/query/identity/@text');
     JAXLXml::addTag('iq', 'identityName', '//iq/query/identity/@name');
     JAXLXml::addTag('iq', 'identityLang', '//iq/query/identity/@xml:lang');
     JAXLXml::addTag('iq', 'featureVar', '//iq/query/feature/@var');
     // register callbacks
     JAXLPlugin::add('jaxl_get_iq_get', array('JAXL0030', 'handleIq'));
 }
Exemple #20
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'activeList', '//iq/query/active/@name');
     JAXLXml::addTag('iq', 'defaultList', '//iq/query/default/@name');
     JAXLXml::addTag('iq', 'listName', '//iq/query/list/@name');
     JAXLXml::addTag('iq', 'listItemType', '//iq/query/list/item/@type');
     JAXLXml::addTag('iq', 'listItemValue', '//iq/query/list/item/@value');
     JAXLXml::addTag('iq', 'listItemAction', '//iq/query/list/item/@action');
     JAXLXml::addTag('iq', 'listItemOrder', '//iq/query/list/item/@order');
     JAXLXml::addTag('iq', 'listItemChild', '//iq/query/list/item/*/name()');
 }
Exemple #21
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'event', '//message/event/@xmlns');
     JAXLXml::addTag('message', 'retractId', '//message/items/retract/@id');
     JAXLXml::addTag('message', 'itemNode', '//message/items/@node');
     JAXLXml::addTag('message', 'itemId', '//message/items/item/@id');
     JAXLXml::addTag('message', 'itemPublisher', '//message/items/item/@publisher');
     JAXLXml::addTag('message', 'headers', '//message/headers/@xmlns');
     JAXLXml::addTag('message', 'header', '//message/headers/header');
     JAXLXml::addTag('message', 'headerName', '//message/headers/header/@name');
 }
Exemple #22
0
 public static function init($jaxl)
 {
     jaxl_require('JAXLS5B');
     // SOCKS5
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'streamSid', '//iq/query/@sid');
     JAXLXml::addTag('iq', 'streamMode', '//iq/query/@mode');
     JAXLXml::addTag('iq', 'streamHost', '//iq/query/streamhost/@host');
     JAXLXml::addTag('iq', 'streamPort', '//iq/query/streamhost/@port');
     JAXLXml::addTag('iq', 'streamJid', '//iq/query/streamhost/@jid');
     JAXLXml::addTag('iq', 'streamHostUsed', '//iq/query/streamhost-used/@jid');
     $jaxl->addPlugin('jaxl_get_iq_set', array('JAXL0065', 'getStreamHost'));
 }
Exemple #23
0
 public static function init($jaxl)
 {
     // add message specific tag maps
     JAXLXml::addTag('message', 'offline', '//message/delay/@xmlns');
     JAXLXml::addTag('message', 'delayFrom', '//message/delay/@from');
     JAXLXml::addTag('message', 'delayStamp', '//message/delay/@stamp');
     JAXLXml::addTag('message', 'delayDesc', '//message/delay');
     // add presence specific tag maps
     JAXLXml::addTag('presence', 'offline', '//message/delay/@xmlns');
     JAXLXml::addTag('presence', 'delayFrom', '//message/delay/@from');
     JAXLXml::addTag('presence', 'delayStamp', '//message/delay/@stamp');
     JAXLXml::addTag('presence', 'delayDesc', '//message/delay');
 }
Exemple #24
0
 public static function init($jaxl)
 {
     $jaxl->requires(array('JAXL0095', 'JAXL0047', 'JAXL0065'));
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'file', '//iq/si/file/@xmlns');
     JAXLXml::addTag('iq', 'fileSize', '//iq/si/file/@size');
     JAXLXml::addTag('iq', 'fileName', '//iq/si/file/@name');
     JAXLXml::addTag('iq', 'fileDate', '//iq/si/file/@date');
     JAXLXml::addTag('iq', 'fileHash', '//iq/si/file/@hash');
     JAXLXml::addTag('iq', 'fileDesc', '//iq/si/file/desc');
     JAXLXml::addTag('iq', 'fileStreamMethod', '//iq/si/feature/x/field/value');
     JAXLXml::addTag('iq', 'fileStreamMethods', '//iq/si/feature/x/field/option/value');
     $jaxl->addPlugin('jaxl_get_iq_set', array('JAXL0096', 'getFile'));
 }
Exemple #25
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'open', '//iq/open/@xmlns');
     JAXLXml::addTag('iq', 'openSid', '//iq/open/@sid');
     JAXLXml::addTag('iq', 'openBlkSize', '//iq/open/@block-size');
     JAXLXml::addTag('iq', 'data', '//iq/data/@xmlns');
     JAXLXml::addTag('iq', 'dataSid', '//iq/data/@sid');
     JAXLXml::addTag('iq', 'dataSeq', '//iq/data/@seq');
     JAXLXml::addTag('iq', 'dataEncoded', '//iq/data');
     JAXLXml::addTag('iq', 'close', '//iq/close/@xmlns');
     JAXLXml::addTag('iq', 'closeSid', '//iq/close/@sid');
     $jaxl->addPlugin('jaxl_get_iq_set', array('JAXL0047', 'handleTransfer'));
 }
Exemple #26
0
 public static function init($jaxl)
 {
     // requires PEP XEP
     $jaxl->requires('JAXL0163');
     // update client feature list
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('message', 'tune', '//message/event/items/item/tune/@xmlns');
     JAXLXml::addTag('message', 'tuneArtist', '//message/event/items/item/tune/artist');
     JAXLXml::addTag('message', 'tuneLength', '//message/event/items/item/tune/length');
     JAXLXml::addTag('message', 'tuneRating', '//message/event/items/item/tune/rating');
     JAXLXml::addTag('message', 'tuneSource', '//message/event/items/item/tune/source');
     JAXLXml::addTag('message', 'tuneTitle', '//message/event/items/item/tune/title');
     JAXLXml::addTag('message', 'tuneTrack', '//message/event/items/item/tune/track');
     JAXLXml::addTag('message', 'tuneURI', '//message/event/items/item/tune/uri');
 }
Exemple #27
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'j', '//iq/jingle/@xmlns');
     JAXLXml::addTag('iq', 'jAction', '//iq/jingle/@action');
     JAXLXml::addTag('iq', 'jSid', '//iq/jingle/@sid');
     JAXLXml::addTag('iq', 'jInitiator', '//iq/jingle/@initiator');
     JAXLXml::addTag('iq', 'jResponder', '//iq/jingle/@responder');
     JAXLXml::addTag('iq', 'jcCreator', '//iq/jingle/content/@creator');
     JAXLXml::addTag('iq', 'jcName', '//iq/jingle/content/@name');
     JAXLXml::addTag('iq', 'jcDisposition', '//iq/jingle/content/@disposition');
     JAXLXml::addTag('iq', 'jcSenders', '//iq/jingle/content/@senders');
     JAXLXml::addTag('iq', 'jrCondition', '//iq/jingle/reason/*[1]/name()');
     JAXLXml::addTag('iq', 'jrText', '//iq/jingle/reason/text');
 }
Exemple #28
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'jtpTrans', '//iq/jingle/content/transport/@xmlns');
     JAXLXml::addTag('iq', 'jtpTransPWD', '//iq/jingle/content/transport/@pwd');
     JAXLXml::addTag('iq', 'jtpTransUFrag', '//iq/jingle/content/transport/@ufrag');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@component');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@foundation');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@generation');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@id');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@ip');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@network');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@port');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@priority');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@protocol');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@rel-addr');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@rel-port');
     JAXLXml::addTag('iq', 'jtpCandiComp', '//iq/jingle/content/transport/candidate/@type');
 }
Exemple #29
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'gMailResultTime', '//iq/mailbox/@result-time');
     JAXLXml::addTag('iq', 'gMailUrl', '//iq/mailbox/@url');
     JAXLXml::addTag('iq', 'gMailTotalMatched', '//iq/mailbox/@total-matched');
     JAXLXml::addTag('iq', 'gMailTotalEstimate', '//iq/mailbox/@total-estimate');
     JAXLXml::addTag('iq', 'gMailThreadTid', '//iq/mailbox/mail-thread-info/@tid');
     JAXLXml::addTag('iq', 'gMailThreadParticipation', '//iq/mailbox/mail-thread-info/@participation');
     JAXLXml::addTag('iq', 'gMailThreadMessages', '//iq/mailbox/mail-thread-info/@messages');
     JAXLXml::addTag('iq', 'gMailThreadDate', '//iq/mailbox/mail-thread-info/@date');
     JAXLXml::addTag('iq', 'gMailThreadUrl', '//iq/mailbox/mail-thread-info/@url');
     JAXLXml::addTag('iq', 'gMailLabels', '//iq/mailbox/mail-thread-info/labels');
     JAXLXml::addTag('iq', 'gMailSubject', '//iq/mailbox/mail-thread-info/subject');
     JAXLXml::addTag('iq', 'gMailSnippet', '//iq/mailbox/mail-thread-info/snippet');
     JAXLXml::addTag('iq', 'gMailSenderName', '//iq/mailbox/mail-thread-info/senders/@name');
     JAXLXml::addTag('iq', 'gMailSenderAddress', '//iq/mailbox/mail-thread-info/senders/@address');
     JAXLXml::addTag('iq', 'gMailSenderOriginator', '//iq/mailbox/mail-thread-info/senders/@originator');
     JAXLXml::addTag('iq', 'gMailSenderUnread', '//iq/mailbox/mail-thread-info/senders/@unread');
     JAXLXml::addTag('iq', 'gMailNotify', '//iq/new-mail/@xmlns');
 }
Exemple #30
0
 public static function init($jaxl)
 {
     $jaxl->features[] = self::$ns;
     JAXLXml::addTag('iq', 'jtpDescription', '//iq/jingle/content/description/@xmlns');
     JAXLXml::addTag('iq', 'jtpMedia', '//iq/jingle/content/description/@media');
     JAXLXml::addTag('iq', 'jtpSSRC', '//iq/jingle/content/description/@ssrc');
     JAXLXml::addTag('iq', 'jtpPTypeId', '//iq/jingle/content/description/payload-type/@id');
     JAXLXml::addTag('iq', 'jtpPTypeName', '//iq/jingle/content/description/payload-type/@name');
     JAXLXml::addTag('iq', 'jtpPTypeClockRate', '//iq/jingle/content/description/payload-type/@clockrate');
     JAXLXml::addTag('iq', 'jtpPTypeChannels', '//iq/jingle/content/description/payload-type/@channels');
     JAXLXml::addTag('iq', 'jtpPTypeMAXPTime', '//iq/jingle/content/description/payload-type/@maxptime');
     JAXLXml::addTag('iq', 'jtpPTypePTime', '//iq/jingle/content/description/payload-type/@ptime');
     JAXLXml::addTag('iq', 'jtpEncryptReq', '//iq/jingle/content/description/encryption/@required');
     JAXLXml::addTag('iq', 'jtpCryptoSuite', '//iq/jingle/content/description/encryption/crypto/@crypto-suite');
     JAXLXml::addTag('iq', 'jtpCryptoKey', '//iq/jingle/content/description/encryption/crypto/@key-params');
     JAXLXml::addTag('iq', 'jtpCryptoSession', '//iq/jingle/content/description/encryption/crypto/@session-params');
     JAXLXml::addTag('iq', 'jtpCryptoTag', '//iq/jingle/content/description/encryption/crypto/@tag');
     JAXLXml::addTag('iq', 'jtpBWType', '//iq/jingle/content/description/bandwidth/@type');
     JAXLXml::addTag('iq', 'jtpBW', '//iq/jingle/content/description/bandwidth');
     JAXLXml::addTag('iq', 'jtpPTypeParamName', '//iq/jingle/content/description/payload-type/parameter/@name');
     JAXLXml::addTag('iq', 'jtpPTypeParamValue', '//iq/jingle/content/description/payload-type/parameter/@value');
 }