#include <vcard.h>
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 |
Classes | |
struct | Address |
struct | |
struct | Geo |
struct | Label |
struct | Name |
struct | Org |
struct | Photo |
struct | Telephone |
See VCardManager for info on how to fetch VCards.
Definition at line 33 of file vcard.h.
typedef std::list<Telephone> TelephoneList |
typedef std::list<Address> AddressList |
enum AddressType |
Addressing type indicators.
AddrTypeDom
and AddrTypeIntl
are mutually exclusive. If both are present, AddrTypeDom
takes precendence.
Also note that not all adress types are applicable everywhere. For example, AddrTypeIsdn
does not make sense for a postal address. Check XEP-0054 for details.
enum VCardClassification |
Tag * tag | ( | ) | const |
void setFormattedname | ( | const std::string & | name | ) | [inline] |
const std::string& formattedname | ( | ) | const [inline] |
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 [inline] |
void setNickname | ( | const std::string & | nickname | ) | [inline] |
const std::string& nickname | ( | ) | const [inline] |
void setUrl | ( | const std::string & | url | ) | [inline] |
const std::string& url | ( | ) | const [inline] |
void setBday | ( | const std::string & | bday | ) | [inline] |
const std::string& bday | ( | ) | const [inline] |
void setJabberid | ( | const std::string & | jabberid | ) | [inline] |
const std::string& jabberid | ( | ) | const [inline] |
void setTitle | ( | const std::string & | title | ) | [inline] |
const std::string& title | ( | ) | const [inline] |
void setRole | ( | const std::string & | role | ) | [inline] |
const std::string& role | ( | ) | const [inline] |
void setNote | ( | const std::string & | note | ) | [inline] |
const std::string& note | ( | ) | const [inline] |
void setDesc | ( | const std::string & | desc | ) | [inline] |
const std::string& desc | ( | ) | const [inline] |
void setMailer | ( | const std::string & | mailer | ) | [inline] |
const std::string& mailer | ( | ) | const [inline] |
void setRev | ( | const std::string & | rev | ) | [inline] |
const std::string& rev | ( | ) | const [inline] |
void setUid | ( | const std::string & | uid | ) | [inline] |
const std::string& uid | ( | ) | const [inline] |
void setTz | ( | const std::string & | tz | ) | [inline] |
const std::string& tz | ( | ) | const [inline] |
void setProdid | ( | const std::string & | prodid | ) | [inline] |
const std::string& prodid | ( | ) | const [inline] |
void setSortstring | ( | const std::string & | sortstring | ) | [inline] |
const std::string& sortstring | ( | ) | const [inline] |
void setPhoto | ( | const std::string & | extval | ) |
void setPhoto | ( | const std::string & | type, | |
const std::string & | binval | |||
) |
const Photo& photo | ( | ) | const [inline] |
void setLogo | ( | const std::string & | extval | ) |
void setLogo | ( | const std::string & | type, | |
const std::string & | binval | |||
) |
const Photo& logo | ( | ) | const [inline] |
void addEmail | ( | const std::string & | userid, | |
int | type | |||
) |
Adds an email address.
userid | The email address. | |
type | Bit-wise ORed AddressType. |
EmailList& emailAddresses | ( | ) | [inline] |
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 addLabel | ( | const StringList & | lines, | |
int | type | |||
) |
AddressList& addresses | ( | ) | [inline] |
LabelList& labels | ( | ) | [inline] |
void addTelephone | ( | const std::string & | number, | |
int | type | |||
) |
Adds a telephone number.
number | The telephone number. | |
type | Bit-wise ORed AddressType. |
TelephoneList& telephone | ( | ) | [inline] |
void setGeo | ( | const std::string & | lat, | |
const std::string & | lon | |||
) |
const Geo& geo | ( | ) | const [inline] |
void setOrganization | ( | const std::string & | orgname, | |
const StringList & | orgunits | |||
) |
const Org& org | ( | ) | const [inline] |
void setClass | ( | VCardClassification | vclass | ) | [inline] |
VCardClassification classification | ( | ) | const [inline] |