PTLib  Version 2.10.10
PvCard Class Reference

Class to represent a vCard as per RFC2426. More...

#include <vcard.h>

Inheritance diagram for PvCard:
PObject

Classes

struct  Address
 
struct  EMail
 
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, ParamValuesParamMap
 
typedef std::map< Token, ExtendedTypeExtendedTypeMap
 
- Public Types inherited from PObject
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)
 
- Public Member Functions inherited from PObject
virtual ~PObject ()
 
virtual PObjectClone () 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...
 

Public Attributes

Token m_group
 
TextValue m_fullName
 
TextValue m_version
 
TextValue m_familyName
 
TextValue m_givenName
 
TextValues m_additionalNames
 
TextValue m_honorificPrefixes
 
TextValue m_honorificSuffixes
 
TextValues m_nickNames
 
TextValue m_sortString
 
PTime m_birthday
 
URIValue m_url
 
InlineValue m_photo
 
InlineValue m_sound
 
TextValue m_timeZone
 
double m_latitude
 
double m_longitude
 
TextValue m_title
 
TextValue m_role
 
InlineValue m_logo
 
TextValue m_agent
 
TextValue m_organisationName
 
TextValue m_organisationUnit
 
TextValue m_mailer
 
TextValues m_categories
 
TextValue m_note
 
TextValue m_productId
 
TextValue m_guid
 
TextValue m_revision
 
TextValue m_class
 
TextValue m_publicKey
 
PArray< Addressm_addresses
 
PArray< Addressm_labels
 
PArray< Telephonem_telephoneNumbers
 
PArray< EMailm_emailAddresses
 
ExtendedTypeMap m_extensions
 

Additional Inherited Members

- Static Public Member Functions inherited from PObject
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...
 
- Protected Member Functions inherited from PObject
 PObject ()
 Constructor for PObject, made protected so cannot ever create one on its own. More...
 

Detailed Description

Class to represent a vCard as per RFC2426.

Member Typedef Documentation

typedef std::map<Token, ParamValues> PvCard::ParamMap

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

PvCard::PvCard ( )

Member Function Documentation

PString PvCard::AsString ( Format  fmt = e_Standard)
bool PvCard::IsValid ( ) const
bool PvCard::Parse ( const PString str)
virtual void PvCard::PrintOn ( ostream &  strm) const
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 void PvCard::ReadFrom ( istream &  strm)
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.

Member Data Documentation

TextValues PvCard::m_additionalNames
PArray<Address> PvCard::m_addresses
TextValue PvCard::m_agent
PTime PvCard::m_birthday
TextValues PvCard::m_categories
TextValue PvCard::m_class
PArray<EMail> PvCard::m_emailAddresses
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
PArray<Address> PvCard::m_labels
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
PArray<Telephone> PvCard::m_telephoneNumbers
TextValue PvCard::m_timeZone
TextValue PvCard::m_title
URIValue PvCard::m_url
TextValue PvCard::m_version

The documentation for this class was generated from the following file: