|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : AddressBookContact.h 00004 * Part of : AddressBook 00005 * Interface : 00006 * Description : CAddressBookContact class - 00007 * responsible for work with personal card of an employee, 00008 * who was found 00009 * Version : 00010 * 00011 * Copyright (c) 2002-2006 Nokia Corporation. 00012 * This material, including documentation and any related 00013 * computer programs, is protected by copyright controlled by 00014 * Nokia Corporation. 00015 * ============================================================================== 00016 */ 00017 00018 #ifndef ADDRESSBOOKCONTACT_H 00019 #define ADDRESSBOOKCONTACT_H 00020 00021 // INCLUDES 00022 #include <SenDomFragment.h> 00023 00024 // CONSTANTS 00025 _LIT8(KElementNameCard, "Card"); 00026 _LIT8(KQualifiedNameCard, "ab:Card"); 00027 _LIT8(KNsUri, "urn:nokia:test:addrbook:2004-09"); 00028 00029 _LIT8(KElementNameN, "N"); 00030 _LIT8(KElementNameGiven, "GIVEN"); 00031 _LIT8(KElementNameFamily, "FAMILY"); 00032 _LIT8(KElementNameAdr, "ADR"); 00033 _LIT8(KElementNameStreet, "STREET"); 00034 _LIT8(KElementNamePCode, "PCODE"); 00035 _LIT8(KElementNamePref, "PREF"); 00036 _LIT8(KElementNameCell, "CELL"); 00037 _LIT8(KElementNameEmail, "EMAIL"); 00038 _LIT8(KElementNameCountry, "COUNTRY"); 00039 _LIT8(KElementNameMiddle, "MIDDLE"); 00040 _LIT8(KElementNameExtAdr, "EXTADR"); 00041 _LIT8(KElementNameLocality, "LOCALITY"); 00042 _LIT8(KElementNameRegion, "REGION"); 00043 _LIT8(KElementNameFax, "FAX"); 00044 _LIT8(KElementNameTitle, "TITLE"); 00045 _LIT8(KElementNameOrg, "ORG"); 00046 _LIT8(KElementNameOrgName, "ORGNAME"); 00047 _LIT8(KElementNameOrgUnit, "ORGUNIT"); 00048 _LIT8(KElementNameTel, "TEL"); 00049 00050 _LIT8(KAttrNameTypeUpperCase, "TYPE"); 00051 _LIT8(KAttrNameTypeLowerCase, "type"); 00052 00053 // CLASS DECLARATION 00054 00055 /** 00056 * CAddressBookContact class, responsible for work with personal card of an employee, who was found 00057 */ 00058 class CAddressBookContact : public CSenDomFragment 00059 { 00060 public: // Constructors 00061 00062 /** 00063 * Two-phased constructor 00064 */ 00065 static CAddressBookContact* NewL(); 00066 00067 // New functions 00068 00069 /** 00070 * The function gets first name of the person who was found 00071 * @return first name 00072 */ 00073 const TPtrC8 FirstName(); 00074 00075 /** 00076 * The function gets last name of the person who was found 00077 * @return last name 00078 */ 00079 const TPtrC8 LastName(); 00080 00081 /** 00082 * The function gets street where the person who was found lives 00083 * @return street 00084 */ 00085 const TPtrC8 Street(); 00086 00087 /** 00088 * The function gets post code where the person who was found lives 00089 * @return post code 00090 */ 00091 const TPtrC8 PostCode(); 00092 00093 /** 00094 * The function gets phone of the person who was found 00095 * @return phone 00096 */ 00097 const TPtrC8 PhoneL(); 00098 00099 /** 00100 * The function gets mobile phone of the person who was found 00101 * @return mobile phone 00102 */ 00103 const TPtrC8 MobilePhoneL(); 00104 00105 /** 00106 * The function gets email of the person who was found 00107 * @return email 00108 */ 00109 const TPtrC8 Email(); 00110 00111 /** 00112 * The function gets middle name of the person who was found 00113 * @return middle name 00114 */ 00115 const TPtrC8 MiddleName(); 00116 00117 /** 00118 * The function gets additional address where the person who was found lives 00119 * @return extra address 00120 */ 00121 const TPtrC8 ExtraAddress(); 00122 00123 /** 00124 * The function gets locality where the person who was found lives 00125 * @return locality 00126 */ 00127 const TPtrC8 Locality(); 00128 00129 /** 00130 * The function gets region where the person who was found lives 00131 * @return region 00132 */ 00133 const TPtrC8 Region(); 00134 00135 /** 00136 * The function gets country where the person who was found lives 00137 * @return country 00138 */ 00139 const TPtrC8 Country(); 00140 00141 /** 00142 * The function gets fax of the person who was found 00143 * @return fax 00144 */ 00145 const TPtrC8 FaxL(); 00146 00147 /** 00148 * The function gets title of the person who was found 00149 * @return title 00150 */ 00151 const TPtrC8 Title(); 00152 00153 /** 00154 * The function gets organization where the person who was found works 00155 * @return organization 00156 */ 00157 const TPtrC8 Organization(); 00158 00159 /** 00160 * The function gets unit where the person who was found works 00161 * @return unit 00162 */ 00163 const TPtrC8 Unit(); 00164 00165 private: // Constructors 00166 00167 /** 00168 * C++ default constructor 00169 */ 00170 CAddressBookContact(); 00171 00172 /** 00173 * By default Symbian 2nd phase constructor is private. 00174 */ 00175 void ConstructL(); 00176 00177 // New functions 00178 00179 /** 00180 * The function binds two elements 00181 * @param aFirstElement 00182 * @param aSecondElement 00183 * @return content of two elements 00184 */ 00185 const TPtrC8 ChildValue(const TDesC8& aFirstElement, 00186 const TDesC8& aSecondElement); 00187 00188 /** 00189 * The function check a type of phone 00190 * @param aType - mobile, general, fax 00191 * @return phone content 00192 */ 00193 const TPtrC8 SelectedPhoneL(const TDesC8& aType); 00194 }; 00195 00196 #endif // ADDRESSBOOKCONTACT_H 00197 00198 // End of File 00199
|
© Nokia 2006 |