![]() |
Cisco AJAX XMPP Library :: Cisco-Specific Add-ons |
This module provides a number of Cisco-specific extensions to the Cisco AJAX XMPP Library.
To install this module, copy the "jabberwerx.cisco.js" file into the same directory that contains "jabberwerx.js" and "jabberwerx.ui.js". Then modify your HTML pages to load "jabberwerx.cisco.js" after "jabberwerx.js" or "jabberwerx.ui.js".
The quick contacts feature provides support for managing temporary subscriptions to other contacts. This support is provided via a controller (jabberwerx.cisco.QuickContactController) and a model (jabberwerx.cisco.QuickContact). The controller provides methods for subscribing to, and unsubscribing from quick contacts. The model provides a Contact-based reprenstation of a QuickContact, allowing most other features of the Cisco AJAX XMPP Library to operate on QuickContacts as if it were another person in the roster.
To use QuickContacts, create a QuickContactController:
var quickCtrl = client.controller.quickContact || new jabberwerx.cisco.QuickContactController(client);
Once the client is connected, to add a quick contact, call QuickContactController's subscribe(jid) method:
quickCtrl.subscribe("user-a@example.com"); var contact = client.entitySet.entity("user-a@example.com");There should now be an entity for "user-a@example.com" in the client's entitySet. Usually this will be an instance of "jabberwerx.cisco.QuickContact". Now all presence changes for that contact are evented through the standard "resourcePresenceChanged" and "primaryPresenceChanged" events.
To remove a quick contact, call the entity's remove() method:
contact.remove();Alternatively, a quick contact can be removed by JID via the QuickContactController's unsubscribe(jid) method:
quickCtrl.unsubscribe("user-a@example.com");
Once the client disconnects, all quick contacts are removed from the client's entitySet.
The quick contacts feature is meant to supplement the core roster features. As such, certain methods may behave slightly differently to accomodate roster-based contacts:
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED "AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL:http://www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
© 2014 Cisco Systems, Inc. All rights reserved.