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

Class VCardString

VCardField --+
             |
            VCardString

Known Subclasses:
VCardXString

Generic class for all standard text fields in the vCard.
Method Summary
  __init__(self, name, value, rfc2425parameters, empty_ok)
Initialize a VCardString object.
  __str__(self)
  __unicode__(self)
libxml2.xmlNode as_xml(self, parent)
Create vcard-tmp XML representation of the field.
str rfc2426(self)
RFC2426-encode the field content.
    Inherited from VCardField
  __repr__(self)

Instance Variable Summary
unicode value: field value.
    Inherited from VCardField
  name: name of the field.

Method Details

__init__(self, name, value, rfc2425parameters=None, empty_ok=False)
(Constructor)

Initialize a VCardString object.
Parameters:
name - field name
           (type=str)
value - field value as string or an XML node
           (type=str or libxml2.xmlNode)
rfc2425parameters - optional RFC 2425 parameters
           (type=dict)
Overrides:
pyxmpp.jabber.vcard.VCardField.__init__

as_xml(self, parent)

Create vcard-tmp XML representation of the field.
Parameters:
parent - parent node for the element
           (type=libxml2.xmlNode)
Returns:
xml node with the field data.
           (type=libxml2.xmlNode)

rfc2426(self)

RFC2426-encode the field content.
Returns:
the field in the RFC 2426 format.
           (type=str)
Overrides:
pyxmpp.jabber.vcard.VCardField.rfc2426

Instance Variable Details

value

field value.
Type:
unicode