Package pyxmpp :: Package jabber :: Module vcard
[show private | hide private]
[frames | no frames]

Module pyxmpp.jabber.vcard

Jabber vCard and MIME (RFC 2426) vCard implementation.

Normative reference:
  - `JEP 54 <http://www.jabber.org/jeps/jep-0054.html>`__
  - `RFC 2425 <http://www.ietf.org/rfc/rfc2425.txt>`__
  - `RFC 2426 <http://www.ietf.org/rfc/rfc2426.txt>`__

Classes
VCard Jabber (vcard-temp) or RFC2426 vCard.
VCardAdr Address vCard field.
VCardCategories Categories vCard field.
VCardEmail E-mail vCard field.
VCardField Base class for vCard fields.
VCardGeo Geographical location vCard field.
VCardImage Image vCard field.
VCardJID JID vCard field.
VCardKey Key vCard field.
VCardLabel Address label vCard field.
VCardName Name vCard field.
VCardOrg Organization vCard field.
VCardPrivacy Privacy vCard field.
VCardSound Sound vCard field.
VCardString Generic class for all standard text fields in the vCard.
VCardTel Telephone vCard field.
VCardXString Generic class for all text vCard fields not defined in RFC 2426.

Exceptions
Empty Exception raised when parsing empty vcard element.

Function Summary
  rfc2425encode(name, value, parameters, charset)
Encodes a vCard field into an RFC2425 line.

Variable Summary
str __revision__ = '$Id: vcard.py 623 2006-03-24 19:36:09Z j...
SRE_Pattern valid_string_re = ^[\w\d \t]*$
str VCARD_NS = 'vcard-temp'

Imported modules:
base64, binascii, libxml2, pyxmpp, re
Imported classes:
StanzaPayloadObject
Imported functions:
from_utf8, get_node_ns, to_utf8
Function Details

rfc2425encode(name, value, parameters=None, charset='utf-8')

Encodes a vCard field into an RFC2425 line.

:Parameters:
    - `name`: field type name
    - `value`: field value
    - `parameters`: optional parameters
    - `charset`: encoding of the output and of the `value` (if not
      `unicode`)
:Types:
    - `name`: `str`
    - `value`: `unicode` or `str`
    - `parameters`: `dict` of `str` -> `str`
    - `charset`: `str`

:return: the encoded RFC2425 line (possibly folded)
:returntype: `str`

Variable Details

__revision__

Type:
str
Value:
'$Id: vcard.py 623 2006-03-24 19:36:09Z jajcus $'                      

valid_string_re

Type:
SRE_Pattern
Value:
^[\w\d \t]*$                                                           

VCARD_NS

Type:
str
Value:
'vcard-temp'                                                           

Generated by Epydoc 2.1 on Wed May 31 22:37:04 2006 http://epydoc.sf.net