pyxmpp.jabber.vcard

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
  - RFC 2425
  - RFC 2426

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
`str` | ``rfc2425encode`(name, value, parameters, charset)` Encodes a vCard field into an RFC2425 line.

Variable Summary
`str` | `__revision__` = `'$Id: vcard.py 616 2005-12-26 15:28:56Z 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 (type=`str`) `value` - field value (type=`unicode` or `str`) `parameters` - optional parameters (type=`dict` of `str` -> `str`) `charset` - encoding of the output and of the `value` (if not `unicode`) (type=`str`) Returns: the encoded RFC2425 line (possibly folded) (type=`str`)

Variable Details

    ### __revision__ Type: `str` Value:
        '$Id: vcard.py 616 2005-12-26 15:28:56Z jajcus $'

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

    ### VCARD_NS Type: `str` Value:
        'vcard-temp'