public
Description: Mozilla-based instant messaging client
Home | Edit | New

API: Accounts

accounts


    var acct = XMPP.accounts;

This returns an array of objects, giving access to the following public properties on each object:

  • jid: full JID, including resource
  • password: password
  • connectionHost: host
  • connectionPort: port
  • connectionSecurity: SSL (1 is SSL, 0 is none)
  • address : JID without resource
  • resource : Resource portion of JID
  • autoLogin : Used in SamePlace to determine whether or not user is to be logged in automatically
  • key : A unique key for this object/account preferences

The following properties are also obtained within xmpp4moz as preferences, prefixed by “xmpp.account” and then by some account-specific key. They must be set in another program (as they are in SamePlace but not in this xmpp4moz API): address, resource, autoLogin, connectionHost, connectionPort, connectionSecurity. autoLogin can be used within extensions (as in SamePlace), but it has no other role in xmpp4moz.

accounts.forEach


    XMPP.accounts.forEach(function(account) { doSomethingWith(account); });

Perform some action for each of the accounts stored previously with the XMPP object.

Last edited by bard, Mon Sep 08 12:09:04 -0700 2008
Home | Edit | New
Versions: