pyxmpp.jabber.vcard

Package pyxmpp :: Package jabber :: Module vcard |
[hide private]

# Module vcard

source code

Jabber vCard and MIME (RFC 2426) vCard implementation.

Normative reference:
  - JEP 54
  - RFC 2425
  - RFC 2426

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

Functions | [hide private]
quote_semicolon(value) | source code
unquote_semicolon(value) | source code
`str` |
rfc2425encode(name, value, parameters=None, charset=`'``utf-8``'`) Encodes a vCard field into an RFC2425 line. | source code

Variables | [hide private]
| __revision__ = ``'``$Id: vcard.py 714 2010-04-05 10:20:10Z jajcus $``'``
| VCARD_NS = ``'``vcard-temp``'``
| valid_string_re = `re.compile(r'^`[`\w\d \t`]``*`$')`
| non_quoted_semicolon_re = `re.compile(r'`(?<!`\\`)`;')`
| __package__ = ``'``pyxmpp.jabber``'``

Imports: base64, binascii, libxml2, re, pyxmpp, to_utf8, from_utf8, get_node_ns, StanzaPayloadObject, BadRequestProtocolError, JIDMalformedProtocolError, JIDError

Function Details | [hide private]

### rfc2425encode(name, value, parameters=None, charset=`'``utf-8``'`) | source code
Encodes a vCard field into an RFC2425 line. Parameters: `name` (`str`) - field type name `value` (`unicode` or `str`) - field value `parameters` (`dict` of `str` -> `str`) - optional parameters `charset` (`str`) - encoding of the output and of the `value` (if not `unicode`) Returns: `str` the encoded RFC2425 line (possibly folded)