00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __CPbkDataSaveAppUi_H__
00024 #define __CPbkDataSaveAppUi_H__
00025
00026
00027 #include <e32base.h>
00028
00029
00030 class CEikMenuPane;
00031 class CPbkContactEngine;
00032 class CPbkContactItem;
00033 class CPbkFieldInfo;
00034 class MPbkDataSaveCallback;
00035 class CPbkFFSCheck;
00036 class CPbkExtGlobals;
00037
00038
00039
00040
00049 class CPbkDataSaveAppUi : public CBase
00050 {
00051 public:
00057 IMPORT_C static CPbkDataSaveAppUi* NewL(CPbkContactEngine& aEngine);
00058
00062 ~CPbkDataSaveAppUi();
00063
00079 IMPORT_C void AddMenuItemsL(CEikMenuPane* aMenuPane, TInt aCommandId);
00080
00095 IMPORT_C void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
00096
00118 IMPORT_C TBool HandleCommandL
00119 (TInt aCommandId,
00120 CArrayPtr<CPbkFieldInfo>& aFieldTypes,
00121 const TDesC& aText,
00122 MPbkDataSaveCallback* aCallback=NULL);
00123
00145 IMPORT_C TBool HandleCommandL
00146 (TInt aCommandId,
00147 CArrayPtr<CPbkFieldInfo>& aFieldTypes,
00148 const TTime& aDate,
00149 MPbkDataSaveCallback* aCallback=NULL);
00150
00155 IMPORT_C void HideEditorExitCommand();
00156
00157 private:
00158 class MFieldData;
00159 class CTextFieldData;
00160 class CDateFieldData;
00161 class CCommandBase;
00162 class CCreateNewCommand;
00163 class CAddToExistingCommand;
00164 CPbkDataSaveAppUi(CPbkContactEngine& aEngine);
00165 void ConstructL();
00166 TBool DoHandleCommandL
00167 (TInt aCommandId,
00168 CArrayPtr<CPbkFieldInfo>& aFieldTypes,
00169 MFieldData& aFieldData,
00170 MPbkDataSaveCallback* aCallback);
00171
00172 private:
00174 CPbkContactEngine* iEngine;
00176 CPbkFFSCheck* iFFSCheck;
00178 TInt iBaseCommandId;
00180 CCommandBase* iExecutingCommand;
00182 TUint iFlags;
00184 CPbkExtGlobals* iExtGlobals;
00185 };
00186
00187
00191 class MPbkDataSaveCallback
00192 {
00193 public:
00201 IMPORT_C virtual void PbkDataSaveNoFieldL(CPbkContactItem& aContact);
00202
00215 IMPORT_C virtual TPtrC PbkDataSaveClipTextL
00216 (const TDesC& aText, CPbkFieldInfo& aFieldInfo);
00217 };
00218
00219
00220 #endif
00221
00222