📄 vcard.h
字号:
const std::string& jabberid() const { return m_jabberid; } /** * Sets the person's title. * @param title The title. */ void setTitle( const std::string& title ) { m_title = title; } /** * Returns the title. * @return The title. */ const std::string& title() const { return m_title; } /** * Sets the person's role. * @param role The role. */ void setRole( const std::string& role ) { m_role = role; } /** * Returns the role. * @return The role. */ const std::string& role() const { return m_role; } /** * Sets a "Commentary note". * @param note The note. */ void setNote( const std::string& note ) { m_note = note; } /** * Returns the note. * @return The note. */ const std::string& note() const { return m_note; } /** * Sets a "free-form descriptive text". * @param desc The descriptive text. */ void setDesc( const std::string& desc ) { m_desc = desc; } /** * Returns the "free-form descriptive text". * @return The descriptive text. */ const std::string& desc() const { return m_desc; } /** * Sets the "Mailer (e.g., Mail User Agent Type) property". * @param mailer The mailer. */ void setMailer( const std::string& mailer ) { m_mailer = mailer; } /** * Returns the mailer. * @return The mailer. */ const std::string& mailer() const { return m_mailer; } /** * Sets the "Last revised property. The value must be an ISO 8601 formatted UTC date/time." * @param rev The date of the last revision. */ void setRev( const std::string& rev ) { m_rev = rev; } /** * Returns the date of the last revision. * @return The date of the last revision. */ const std::string& rev() const { return m_rev; } /** * Sets the "Unique identifier property." * @param uid The unique identifier. */ void setUid( const std::string& uid ) { m_uid = uid; } /** * Returns the unique identifier. * @return The unique identifier. */ const std::string& uid() const { return m_uid; } /** * Sets the "Time zone's Standard Time UTC offset. Value must be an ISO 8601 * formatted UTC offset. * @param tz The timezone offset. */ void setTz( const std::string& tz ) { m_tz = tz; } /** * Returns the timezone offset. * @return The timezone offset. */ const std::string& tz() const { return m_tz; } /** * Sets the "Identifier of product that generated the vCard property." * @param prodid The product identifier. */ void setProdid( const std::string& prodid ) { m_prodid = prodid; } /** * Returns the product identifier. * @return The product identifier. */ const std::string& prodid() const { return m_prodid; } /** * Sets the "Sort string property." * @param sortstring The sort string. */ void setSortstring( const std::string& sortstring ) { m_sortstring = sortstring; } /** * Returns the sort string. * @return The sort string. */ const std::string& sortstring() const { return m_sortstring; } /** * Sets a URI to a photo. * @param extval The URI to the photo. */ void setPhoto( const std::string& extval ); /** * Sets the photo directly. * @param type Format type parameter. * @param binval The binary photo data. */ void setPhoto( const std::string& type, const std::string& binval ); /** * Returns photo information. * @return Info about the photo. */ const Photo& photo() const { return m_photo; } /** * Sets a URI to a organization logo. * @param extval The URI to the logo. */ void setLogo( const std::string& extval ); /** * Sets the organization logo directly. * @param type Format type parameter. * @param binval The binary logo data. */ void setLogo( const std::string& type, const std::string& binval ); /** * Returns logo information. * @return Info about the logo. */ const Photo& logo() const { return m_logo; } /** * Adds an email address. * @param userid The email address. * @param type Bit-wise ORed @ref AddressType. */ void addEmail( const std::string& userid, int type ); /** * Returns a list of email addresses. * @return A list of email addresses. */ EmailList& emailAddresses() { return m_emailList; } /** * Adds an address. * @param pobox A PO Box. * @param extadd Some extra field (extended address). * @param street The street. * @param locality The village, city, etc. * @param region The region. * @param pcode The post code. * @param ctry The country. * @param type Bit-wise ORed @ref AddressType. */ 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 label. * @param lines A list of address label lines. * @param type Bit-wise ORed @c AddressType. */ void addLabel( const StringList& lines, int type ); /** * Returns a list of addresses. * @return A list of addresses. */ AddressList& addresses() { return m_addressList; } /** * Returns a list of address labels. * @return A list of address labels. */ LabelList& labels() { return m_labelList; } /** * Adds a telephone number. * @param number The telephone number. * @param type Bit-wise ORed @ref AddressType. */ void addTelephone( const std::string& number, int type ); /** * Returns a list of telephone numbers. * @return A list of telephone numbers. */ TelephoneList& telephone() { return m_telephoneList; } /** * Sets "Geographical position. Values are the decimal degrees of * Latitude and Longitude. The value should be specified to six decimal places." * @param lat The latitude. * @param lon The longitude. */ void setGeo( const std::string& lat, const std::string& lon ); /** * Returns geo location information. * @return Info about the geo location. */ const Geo& geo() const { return m_geo; } /** * Sets "Organizational name and units property." * @param orgname The organization's name. * @param orgunits A list of organizational units. */ void setOrganization( const std::string& orgname, const StringList& orgunits ); /** * Returns organization information. * @return Info about the organization. */ const Org& org() const { return m_org; } /** * Sets the "Privacy classification property." * @param vclass The classification value. */ void setClass( VCardClassification vclass ) { m_class = vclass; } /** * Returns information about classification. * @return Info about the classification. */ VCardClassification classification() const { return m_class; } private: void checkField( Tag *vcard, const std::string& field, std::string& var ); void insertField( Tag *vcard, const std::string& field, const std::string& var ) const; void insertField( Tag *vcard, const std::string& field, bool var ) const; EmailList m_emailList; TelephoneList m_telephoneList; AddressList m_addressList; LabelList m_labelList; Name m_name; Geo m_geo; Org m_org; Photo m_photo; Photo m_logo; VCardClassification m_class; std::string m_formattedname; std::string m_nickname; std::string m_url; std::string m_bday; std::string m_jabberid; std::string m_title; std::string m_role; std::string m_note; std::string m_desc; std::string m_mailer; std::string m_tz; std::string m_prodid; std::string m_rev; std::string m_sortstring; std::string m_uid; bool m_N; bool m_PHOTO; bool m_LOGO; };}#endif // VCARD_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -