#include <vcard.h>
Classes | |
struct | Address |
struct | |
struct | Geo |
struct | Label |
struct | Name |
struct | Org |
struct | Photo |
struct | Telephone |
Public Types | |
enum | AddressType { AddrTypeHome = 1, AddrTypeWork = 2, AddrTypePref = 4, AddrTypeX400 = 8, AddrTypeInet = 16, AddrTypeParcel = 32, AddrTypePostal = 64, AddrTypeDom = 128, AddrTypeIntl = 256, AddrTypeVoice = 512, AddrTypeFax = 1024, AddrTypePager = 2048, AddrTypeMsg = 4096, AddrTypeCell = 8192, AddrTypeVideo = 16384, AddrTypeBbs = 32768, AddrTypeModem = 65536, AddrTypeIsdn = 131072, AddrTypePcs = 262144 } |
enum | VCardClassification { ClassNone = 0, ClassPublic = 1, ClassPrivate = 2, ClassConfidential = 4 } |
typedef std::list< Email > | EmailList |
typedef std::list< Telephone > | TelephoneList |
typedef std::list< Address > | AddressList |
typedef std::list< Label > | LabelList |
Public Member Functions | |
VCard () | |
VCard (Tag *vcard) | |
virtual | ~VCard () |
Tag * | tag () const |
void | setFormattedname (const std::string &name) |
const std::string & | formattedname () const |
void | setName (const std::string &family, const std::string &given, const std::string &middle="", const std::string &prefix="", const std::string &suffix="") |
const Name & | name () const |
void | setNickname (const std::string &nickname) |
const std::string & | nickname () const |
void | setUrl (const std::string &url) |
const std::string & | url () const |
void | setBday (const std::string &bday) |
const std::string & | bday () const |
void | setJabberid (const std::string &jabberid) |
const std::string & | jabberid () const |
void | setTitle (const std::string &title) |
const std::string & | title () const |
void | setRole (const std::string &role) |
const std::string & | role () const |
void | setNote (const std::string ¬e) |
const std::string & | note () const |
void | setDesc (const std::string &desc) |
const std::string & | desc () const |
void | setMailer (const std::string &mailer) |
const std::string & | mailer () const |
void | setRev (const std::string &rev) |
const std::string & | rev () const |
void | setUid (const std::string &uid) |
const std::string & | uid () const |
void | setTz (const std::string &tz) |
const std::string & | tz () const |
void | setProdid (const std::string &prodid) |
const std::string & | prodid () const |
void | setSortstring (const std::string &sortstring) |
const std::string & | sortstring () const |
void | setPhoto (const std::string &extval) |
void | setPhoto (const std::string &type, const std::string &binval) |
const Photo & | photo () const |
void | setLogo (const std::string &extval) |
void | setLogo (const std::string &type, const std::string &binval) |
const Photo & | logo () const |
void | addEmail (const std::string &userid, int type) |
EmailList & | emailAddresses () |
void | addAddress (const std::string &pobox, const std::string &extadd, const std::string &street, const std::string &locality, const std::string ®ion, const std::string &pcode, const std::string &ctry, int type) |
void | addLabel (const StringList &lines, int type) |
AddressList & | addresses () |
LabelList & | labels () |
void | addTelephone (const std::string &number, int type) |
TelephoneList & | telephone () |
void | setGeo (const std::string &lat, const std::string &lon) |
const Geo & | geo () const |
void | setOrganization (const std::string &orgname, const StringList &orgunits) |
const Org & | org () const |
void | setClass (VCardClassification vclass) |
VCardClassification | classification () const |
A VCard abstraction.
See VCardManager for info on how to fetch VCards.
Definition at line 33 of file vcard.h.
typedef std::list<Address> AddressList |
typedef std::list<Telephone> TelephoneList |
enum AddressType |
Addressing type indicators.
AddrTypeDom
and AddrTypeIntl
are mutually exclusive. If both are present, AddrTypeDom
takes precendence. AddrTypeIsdn
does not make sense for a postal address. Check XEP-0054 for details. enum VCardClassification |
void addAddress | ( | const std::string & | pobox, | |
const std::string & | extadd, | |||
const std::string & | street, | |||
const std::string & | locality, | |||
const std::string & | region, | |||
const std::string & | pcode, | |||
const std::string & | ctry, | |||
int | type | |||
) |
Adds an address.
pobox | A PO Box. | |
extadd | Some extra field (extended address). | |
street | The street. | |
locality | The village, city, etc. | |
region | The region. | |
pcode | The post code. | |
ctry | The country. | |
type | Bit-wise ORed AddressType. |
void addEmail | ( | const std::string & | userid, | |
int | type | |||
) |
Adds an email address.
userid | The email address. | |
type | Bit-wise ORed AddressType. |
void addLabel | ( | const StringList & | lines, | |
int | type | |||
) |
AddressList& addresses | ( | ) | [inline] |
void addTelephone | ( | const std::string & | number, | |
int | type | |||
) |
Adds a telephone number.
number | The telephone number. | |
type | Bit-wise ORed AddressType. |
const std::string& bday | ( | ) | const [inline] |
VCardClassification classification | ( | ) | const [inline] |
const std::string& desc | ( | ) | const [inline] |
EmailList& emailAddresses | ( | ) | [inline] |
const std::string& formattedname | ( | ) | const [inline] |
const Geo& geo | ( | ) | const [inline] |
const std::string& jabberid | ( | ) | const [inline] |
LabelList& labels | ( | ) | [inline] |
const Photo& logo | ( | ) | const [inline] |
const std::string& mailer | ( | ) | const [inline] |
const Name& name | ( | ) | const [inline] |
const std::string& nickname | ( | ) | const [inline] |
const std::string& note | ( | ) | const [inline] |
const Org& org | ( | ) | const [inline] |
const Photo& photo | ( | ) | const [inline] |
const std::string& prodid | ( | ) | const [inline] |
const std::string& rev | ( | ) | const [inline] |
const std::string& role | ( | ) | const [inline] |
void setBday | ( | const std::string & | bday | ) | [inline] |
void setClass | ( | VCardClassification | vclass | ) | [inline] |
void setDesc | ( | const std::string & | desc | ) | [inline] |
void setFormattedname | ( | const std::string & | name | ) | [inline] |
void setGeo | ( | const std::string & | lat, | |
const std::string & | lon | |||
) |
void setJabberid | ( | const std::string & | jabberid | ) | [inline] |
void setLogo | ( | const std::string & | type, | |
const std::string & | binval | |||
) |
void setLogo | ( | const std::string & | extval | ) |
void setMailer | ( | const std::string & | mailer | ) | [inline] |
void setName | ( | const std::string & | family, | |
const std::string & | given, | |||
const std::string & | middle = "" , |
|||
const std::string & | prefix = "" , |
|||
const std::string & | suffix = "" | |||
) |
void setNickname | ( | const std::string & | nickname | ) | [inline] |
void setNote | ( | const std::string & | note | ) | [inline] |
void setOrganization | ( | const std::string & | orgname, | |
const StringList & | orgunits | |||
) |
void setPhoto | ( | const std::string & | type, | |
const std::string & | binval | |||
) |
void setPhoto | ( | const std::string & | extval | ) |
void setProdid | ( | const std::string & | prodid | ) | [inline] |
void setRev | ( | const std::string & | rev | ) | [inline] |
void setRole | ( | const std::string & | role | ) | [inline] |
void setSortstring | ( | const std::string & | sortstring | ) | [inline] |
void setTitle | ( | const std::string & | title | ) | [inline] |
void setTz | ( | const std::string & | tz | ) | [inline] |
void setUid | ( | const std::string & | uid | ) | [inline] |
void setUrl | ( | const std::string & | url | ) | [inline] |
const std::string& sortstring | ( | ) | const [inline] |
Tag * tag | ( | ) | const |
TelephoneList& telephone | ( | ) | [inline] |
const std::string& title | ( | ) | const [inline] |
const std::string& tz | ( | ) | const [inline] |
const std::string& uid | ( | ) | const [inline] |
const std::string& url | ( | ) | const [inline] |