00001 /* 00002 * ============================================================================ 00003 * Name : CPbkAddressSelect from CPbkAddressSelect.h 00004 * Part of : PbkView.dll 00005 * 00006 * Description: 00007 * Generic Phonebook address selection dialog. Used for selecting recipient 00008 * address from a contact for Call, Send SMS, email and MMS. 00009 * Version: 00010 * 00011 * Copyright (C) 2002 Nokia Corporation. 00012 * This material, including documentation and any related 00013 * computer programs, is protected by copyright controlled by 00014 * Nokia Corporation. All rights are reserved. Copying, 00015 * including reproducing, storing, adapting or translating, any 00016 * or all of this material requires the prior written consent of 00017 * Nokia Corporation. This material also contains confidential 00018 * information which may not be disclosed to others without the 00019 * prior written consent of Nokia Corporation. 00020 * ============================================================================ 00021 */ 00022 00023 #ifndef __CPbkAddressSelect_H__ 00024 #define __CPbkAddressSelect_H__ 00025 00026 // INCLUDES 00027 #include <e32base.h> 00028 #include <coedef.h> // TKeyResponse 00029 #include <w32std.h> // TKeyEvent, TEventCode 00030 00031 00032 // FORWARD DECLARATIONS 00033 class CPbkContactItem; 00034 class TPbkContactItemField; 00035 class CPbkSelectFieldDlg; 00036 class CPbkFieldArray; 00037 00038 00039 // CLASS DECLARATION 00040 00047 class CPbkAddressSelect : public CBase 00048 { 00049 public: // Interface 00054 class TBaseParams 00055 { 00056 public: // Interface 00061 IMPORT_C const CPbkContactItem& ContactItem(); 00062 00069 IMPORT_C void SetFocusedField(const TPbkContactItemField* aFocusedField); 00070 00078 IMPORT_C void SetUseDefaultDirectly(TBool aUseDefaultDirectly); 00079 00084 IMPORT_C const TPbkContactItemField* SelectedField() const; 00085 00091 IMPORT_C const TPbkContactItemField* FocusedField() const; 00092 00093 protected: // Derived class interface 00101 IMPORT_C TBaseParams 00102 (const CPbkContactItem& aContact, 00103 const TPbkContactItemField* aDefaultField); 00104 00105 private: // Data 00107 const CPbkContactItem& iContact; 00109 const TPbkContactItemField* iDefaultField; 00111 const TPbkContactItemField* iFocusedField; 00113 TBool iUseDefaultDirectly; 00115 const TPbkContactItemField* iSelectedField; 00117 TInt32 iSpare1; 00119 TInt32 iSpare2; 00120 00121 private: // friends 00122 friend class CPbkAddressSelect; 00123 }; 00124 00128 IMPORT_C ~CPbkAddressSelect(); 00129 00130 protected: // Base class interface 00134 IMPORT_C CPbkAddressSelect(); 00135 00142 IMPORT_C TBool ExecuteLD(TBaseParams& aParams); 00143 00148 IMPORT_C const CPbkContactItem& ContactItem() const; 00149 00156 IMPORT_C void AttemptExitL(TBool aAccept); 00157 00158 private: // Base class interface. Private because these functions are 00159 // only to be called from this classes implementation. 00165 virtual TBool AddressField(const TPbkContactItemField& aField) const = 0; 00166 00171 virtual void NoAddressesL() = 0; 00172 00177 virtual const TDesC& QueryTitleL() = 0; 00178 00185 virtual TInt QuerySoftkeysResource() const = 0; 00186 00193 IMPORT_C virtual TKeyResponse PbkControlKeyEventL 00194 (const TKeyEvent& aKeyEvent,TEventCode aType); 00195 00196 // Spare virtual functions 00197 IMPORT_C virtual void Reserved_1(); 00198 IMPORT_C virtual void Reserved_2(); 00199 00200 private: // data members 00202 const CPbkContactItem* iContactItem; 00204 class CSelectFieldDlg; 00205 friend class CSelectFieldDlg; 00207 CPbkSelectFieldDlg* iFieldDlg; 00209 CPbkFieldArray* iFields; 00211 TBool* iDestroyedPtr; 00212 // Spare data 00213 TInt32 iSpare1; 00214 }; 00215 00216 00217 // __CPbkAddressSelect_H__ 00218 #endif 00219 00220 // End of File