|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <AddressBookContact.h>
Public Member Functions | |
| const TPtrC8 | FirstName () |
| const TPtrC8 | LastName () |
| const TPtrC8 | Street () |
| const TPtrC8 | PostCode () |
| const TPtrC8 | PhoneL () |
| const TPtrC8 | MobilePhoneL () |
| const TPtrC8 | Email () |
| const TPtrC8 | MiddleName () |
| const TPtrC8 | ExtraAddress () |
| const TPtrC8 | Locality () |
| const TPtrC8 | Region () |
| const TPtrC8 | Country () |
| const TPtrC8 | FaxL () |
| const TPtrC8 | Title () |
| const TPtrC8 | Organization () |
| const TPtrC8 | Unit () |
Static Public Member Functions | |
| static CAddressBookContact * | NewL () |
Private Member Functions | |
| CAddressBookContact () | |
| void | ConstructL () |
| const TPtrC8 | ChildValue (const TDesC8 &aFirstElement, const TDesC8 &aSecondElement) |
| const TPtrC8 | SelectedPhoneL (const TDesC8 &aType) |
Definition at line 58 of file AddressBookContact.h.
|
|
C++ default constructor Definition at line 28 of file AddressBookContact.cpp.
|
|
|
Two-phased constructor Definition at line 37 of file AddressBookContact.cpp. References CAddressBookContact(), and ConstructL(). 00038 { 00039 CAddressBookContact* pNew = new (ELeave) CAddressBookContact(); 00040 CleanupStack::PushL(pNew); 00041 pNew->ConstructL(); 00042 CleanupStack::Pop(pNew); 00043 return pNew; 00044 }
|
|
|
The function gets first name of the person who was found
Definition at line 60 of file AddressBookContact.cpp. References ChildValue(). 00061 { 00062 return ChildValue(KElementNameN, KElementNameGiven); 00063 }
|
|
|
The function gets last name of the person who was found
Definition at line 70 of file AddressBookContact.cpp. References ChildValue(). 00071 { 00072 return ChildValue(KElementNameN, KElementNameFamily); 00073 }
|
|
|
The function gets street where the person who was found lives
Definition at line 80 of file AddressBookContact.cpp. References ChildValue(). 00081 { 00082 return ChildValue(KElementNameAdr, KElementNameStreet); 00083 }
|
|
|
The function gets post code where the person who was found lives
Definition at line 90 of file AddressBookContact.cpp. References ChildValue(). 00091 { 00092 return ChildValue(KElementNameAdr, KElementNamePCode); 00093 }
|
|
|
The function gets phone of the person who was found
Definition at line 100 of file AddressBookContact.cpp. References SelectedPhoneL(). 00101 { 00102 return SelectedPhoneL(KElementNamePref); 00103 }
|
|
|
The function gets mobile phone of the person who was found
Definition at line 110 of file AddressBookContact.cpp. References SelectedPhoneL(). 00111 { 00112 return SelectedPhoneL(KElementNameCell); 00113 }
|
|
|
The function gets email of the person who was found
Definition at line 120 of file AddressBookContact.cpp.
|
|
|
The function gets middle name of the person who was found
Definition at line 130 of file AddressBookContact.cpp. References ChildValue(). 00131 { 00132 return ChildValue(KElementNameN, KElementNameMiddle); 00133 }
|
|
|
The function gets additional address where the person who was found lives
Definition at line 140 of file AddressBookContact.cpp. References ChildValue(). 00141 { 00142 return ChildValue(KElementNameAdr, KElementNameExtAdr); 00143 }
|
|
|
The function gets locality where the person who was found lives
Definition at line 150 of file AddressBookContact.cpp. References ChildValue(). 00151 { 00152 return ChildValue(KElementNameAdr, KElementNameLocality); 00153 }
|
|
|
The function gets region where the person who was found lives
Definition at line 160 of file AddressBookContact.cpp. References ChildValue(). 00161 { 00162 return ChildValue(KElementNameAdr, KElementNameRegion); 00163 }
|
|
|
The function gets country where the person who was found lives
Definition at line 170 of file AddressBookContact.cpp. References ChildValue(). 00171 { 00172 return ChildValue(KElementNameAdr, KElementNameCountry); 00173 }
|
|
|
The function gets fax of the person who was found
Definition at line 180 of file AddressBookContact.cpp. References SelectedPhoneL(). 00181 { 00182 return SelectedPhoneL(KElementNameFax); 00183 }
|
|
|
The function gets title of the person who was found
Definition at line 190 of file AddressBookContact.cpp.
|
|
|
The function gets organization where the person who was found works
Definition at line 200 of file AddressBookContact.cpp. References ChildValue(). 00201 { 00202 return ChildValue(KElementNameOrg, KElementNameOrgName); 00203 }
|
|
|
The function gets unit where the person who was found works
Definition at line 210 of file AddressBookContact.cpp. References ChildValue(). 00211 { 00212 return ChildValue(KElementNameOrg, KElementNameOrgUnit); 00213 }
|
|
|
By default Symbian 2nd phase constructor is private. Definition at line 50 of file AddressBookContact.cpp. 00051 { 00052 CSenDomFragment::BaseConstructL(KNsUri, KElementNameCard, KQualifiedNameCard); 00053 }
|
|
||||||||||||
|
The function binds two elements
Definition at line 221 of file AddressBookContact.cpp. 00223 { 00224 CSenElement* pElement = AsElement().Element(aFirstElement); 00225 if (pElement) 00226 { 00227 pElement = pElement->Element(aSecondElement); 00228 if (pElement) 00229 { 00230 return pElement->Content(); 00231 } 00232 } 00233 return KNullDesC8(); 00234 }
|
|
|
The function check a type of phone
Definition at line 241 of file AddressBookContact.cpp. 00242 { 00243 RPointerArray<CSenElement> elements = AsElement().ElementsL(); 00244 CSenElement* pElement = NULL; 00245 for (TInt i=0; i<elements.Count(); i++) 00246 { 00247 pElement = elements[i]; 00248 if (pElement->LocalName() == KElementNameTel) 00249 { 00250 const TDesC8* value = pElement->AttrValue(KAttrNameTypeUpperCase); 00251 if (!value) 00252 { 00253 // lower case type check just in case 00254 value = pElement->AttrValue(KAttrNameTypeLowerCase); 00255 } 00256 if (value && *value == aType) 00257 { 00258 return pElement->Content(); 00259 } 00260 } 00261 } 00262 return KNullDesC8(); 00263 }
|
|
© Nokia 2006 |