PTLib
Version 2.10.11
|
Class to represent a vCard as per RFC2426. More...
#include <vcard.h>
Classes | |
struct | Address |
struct | |
struct | ExtendedType |
class | InlineValue |
Representation of EBNF img-inline-value/snd-inline-value. More... | |
struct | MultiValue |
class | ParamValue |
Representation of EBNF param-value. More... | |
class | ParamValues |
Comma separated list of param-value's. More... | |
class | Separator |
struct | Telephone |
class | TextValue |
Representation of EBNF text-value. More... | |
class | TextValues |
Comma separated list of text-value's. More... | |
class | Token |
Representation of token (EBNF group, name, iana-token or x-name) More... | |
class | TypeValues |
class | URIValue |
Public Types | |
enum | Format { e_Standard, e_XML_XMPP, e_XML_RDF, e_XML_RFC } |
Output string formats. More... | |
typedef std::map< Token, ParamValues > | ParamMap |
typedef std::map< Token, ExtendedType > | ExtendedTypeMap |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
Public Member Functions | |
PvCard () | |
bool | IsValid () const |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. More... | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. More... | |
bool | Parse (const PString &str) |
PString | AsString (Format fmt=e_Standard) |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. More... | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. More... | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. More... | |
PBoolean | IsClass (const char *cls) const |
virtual PBoolean | InternalIsDescendant (const char *clsName) const |
Determine if the dynamic type of the current instance is a descendent of the specified class. More... | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. More... | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. More... | |
bool | operator== (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator< (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator> (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. More... | |
Additional Inherited Members | |
![]() | |
static const char * | Class () |
Get the name of the class as a C string. More... | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() More... | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. More... | |
Class to represent a vCard as per RFC2426.
typedef std::map<Token, ExtendedType> PvCard::ExtendedTypeMap |
typedef std::map<Token, ParamValues> PvCard::ParamMap |
enum PvCard::Format |
Output string formats.
If operator<< or PrintOn() is used the stream width() parameter may be set to this to indicate the output format. e.g. stream << setw(PvCard::e_XML_XMPP) << card;
Enumerator | |
---|---|
e_Standard |
As per RFC2425. |
e_XML_XMPP |
Jabber XML. |
e_XML_RDF |
W3C version. |
e_XML_RFC |
Draft RFC. |
PvCard::PvCard | ( | ) |
PString PvCard::AsString | ( | Format | fmt = e_Standard | ) |
bool PvCard::IsValid | ( | ) | const |
bool PvCard::Parse | ( | const PString & | str | ) |
|
virtual |
Output the contents of the object to the stream.
The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard operator<<
function.
The default behaviour is to print the class name.
Reimplemented from PObject.
|
virtual |
Input the contents of the object from the stream.
The exact input is dependent on the exact semantics of the descendent class. This is primarily used by the standard operator>>
function.
The default behaviour is to do nothing.
Reimplemented from PObject.
TextValues PvCard::m_additionalNames |
TextValue PvCard::m_agent |
PTime PvCard::m_birthday |
TextValues PvCard::m_categories |
TextValue PvCard::m_class |
ExtendedTypeMap PvCard::m_extensions |
TextValue PvCard::m_familyName |
TextValue PvCard::m_fullName |
TextValue PvCard::m_givenName |
Token PvCard::m_group |
TextValue PvCard::m_guid |
TextValue PvCard::m_honorificPrefixes |
TextValue PvCard::m_honorificSuffixes |
double PvCard::m_latitude |
InlineValue PvCard::m_logo |
double PvCard::m_longitude |
TextValue PvCard::m_mailer |
TextValues PvCard::m_nickNames |
TextValue PvCard::m_note |
TextValue PvCard::m_organisationName |
TextValue PvCard::m_organisationUnit |
InlineValue PvCard::m_photo |
TextValue PvCard::m_productId |
TextValue PvCard::m_publicKey |
TextValue PvCard::m_revision |
TextValue PvCard::m_role |
TextValue PvCard::m_sortString |
InlineValue PvCard::m_sound |
TextValue PvCard::m_timeZone |
TextValue PvCard::m_title |
URIValue PvCard::m_url |
TextValue PvCard::m_version |