nbxmpp.features_nb

Package nbxmpp :: Module features_nb |
[hide private]
[frames] | no frames]

# Module features_nb

source code

Different stuff that wasn't worth separating it into modules (Registration, Privacy Lists, ...)

Functions | [hide private]
_on_default_response(disp, iq, cb) | source code
getRegInfo(disp, host, info=`{``}`, sync=True) Get registration form from remote host. Info dict can be prefilled :param disp: plugged dispatcher instance :param info: dict, like {'username':'joey'}. | source code
_ReceivedRegInfo(con, resp, agent) | source code
register(disp, host, info, cb, args=None) Perform registration on remote server with provided info | source code
unregister(disp, host, cb) Unregisters with host (permanently removes account). Returns true on success | source code
changePasswordTo(disp, newpassword, host=None, cb=None) Changes password on specified or current (if not specified) server. Returns true on success. | source code
getPrivacyLists(disp) Request privacy lists from connected server. Returns dictionary of existing lists on success. | source code
getActiveAndDefaultPrivacyLists(disp) | source code
getPrivacyList(disp, listname) Request specific privacy list listname. Returns list of XML nodes (rules) taken from the server responce. | source code
setActivePrivacyList(disp, listname=None, typ=`'``active``'`, cb=None) Switch privacy list 'listname' to specified type. By default the type is 'active'. Returns true on success. | source code
setDefaultPrivacyList(disp, listname=None) Set the default privacy list as 'listname'. Returns true on success | source code
setPrivacyList(disp, listname, tags) Set the ruleset | source code
delPrivacyList(disp, listname, cb=None) Deletes privacy list 'listname'. Returns true on success. | source code

Variables | [hide private]
| REGISTER_DATA_RECEIVED = ``'``REGISTER DATA RECEIVED``'``
| PL_TYPE_JID = ``'``jid``'``
| PL_TYPE_GROUP = ``'``group``'``
| PL_TYPE_SUBC = ``'``subscription``'``
| PL_ACT_ALLOW = ``'``allow``'``
| PL_ACT_DENY = ``'``deny``'``
| PRIVACY_LISTS_RECEIVED = ``'``PRIVACY LISTS RECEIVED``'``
| PRIVACY_LIST_RECEIVED = ``'``PRIVACY LIST RECEIVED``'``
| PRIVACY_LISTS_ACTIVE_DEFAULT = ``'``PRIVACY LISTS ACTIVE DEFAULT``'``
| __package__ = ``'``nbxmpp``'``

Imports: NS_REGISTER, NS_PRIVACY, NS_DATA, Iq, isResultNode, Node

Function Details | [hide private]

### _on_default_response(disp, iq, cb) | source code

### getRegInfo(disp, host, info=`{``}`, sync=True) | source code
Get registration form from remote host. Info dict can be prefilled :param disp: plugged dispatcher instance :param info: dict, like {'username':'joey'}. See JEP-0077 for details.

### _ReceivedRegInfo(con, resp, agent) | source code

### register(disp, host, info, cb, args=None) | source code
Perform registration on remote server with provided info If registration fails you can get additional info from the dispatcher's owner attributes lastErrNode, lastErr and lastErrCode.

### unregister(disp, host, cb) | source code
Unregisters with host (permanently removes account). Returns true on success

### changePasswordTo(disp, newpassword, host=None, cb=None) | source code
Changes password on specified or current (if not specified) server. Returns true on success.

### getPrivacyLists(disp) | source code
Request privacy lists from connected server. Returns dictionary of existing lists on success.

### getActiveAndDefaultPrivacyLists(disp) | source code

### getPrivacyList(disp, listname) | source code
Request specific privacy list listname. Returns list of XML nodes (rules) taken from the server responce.

### setActivePrivacyList(disp, listname=None, typ=`'``active``'`, cb=None) | source code
Switch privacy list 'listname' to specified type. By default the type is 'active'. Returns true on success.

### setDefaultPrivacyList(disp, listname=None) | source code
Set the default privacy list as 'listname'. Returns true on success

### setPrivacyList(disp, listname, tags) | source code
Set the ruleset 'list' should be the simpleXML node formatted according to RFC 3921 (XMPP-IM) I.e. Node('list',{'name':listname},payload=[...]). Returns true on success.

### delPrivacyList(disp, listname, cb=None) | source code
Deletes privacy list 'listname'. Returns true on success.

Variables Details | [hide private]

  ### REGISTER_DATA_RECEIVED Value:
      'REGISTER DATA RECEIVED'

  ### PL_TYPE_JID Value:
      'jid'

  ### PL_TYPE_GROUP Value:
      'group'

  ### PL_TYPE_SUBC Value:
      'subscription'

  ### PL_ACT_ALLOW Value:
      'allow'

  ### PL_ACT_DENY Value:
      'deny'

  ### PRIVACY_LISTS_RECEIVED Value:
      'PRIVACY LISTS RECEIVED'

  ### PRIVACY_LIST_RECEIVED Value:
      'PRIVACY LIST RECEIVED'

  ### PRIVACY_LISTS_ACTIVE_DEFAULT Value:
      'PRIVACY LISTS ACTIVE DEFAULT'

  ### __package__ Value:
      'nbxmpp'