cpbkdatasaveappui.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : CPbkDataSaveAppUi from CPbkDataSaveAppUi.h
00004 *  Part of  : PbkView.dll
00005 *
00006 *  Description:
00007 *    Phonebook Data Save service helper. Implements "Save to phonebook" 
00008 *    menu functionality for external applications.
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 __CPbkDataSaveAppUi_H__
00024 #define __CPbkDataSaveAppUi_H__
00025 
00026 //  INCLUDES
00027 #include <e32base.h>
00028 
00029 // FORWARD DECLARATIONS
00030 class CEikMenuPane;
00031 class CPbkContactEngine;
00032 class CPbkContactItem;
00033 class CPbkFieldInfo;
00034 class MPbkDataSaveCallback;
00035 class CPbkFFSCheck;
00036 class CPbkExtGlobals;
00037 
00038 
00039 // CLASS DECLARATION
00040 
00049 class CPbkDataSaveAppUi : public CBase
00050     {
00051     public:  // Interface
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:  // Implementation
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:  // Data
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:  // Interface
00201         IMPORT_C virtual void PbkDataSaveNoFieldL(CPbkContactItem& aContact);
00202 
00215         IMPORT_C virtual TPtrC PbkDataSaveClipTextL
00216             (const TDesC& aText, CPbkFieldInfo& aFieldInfo);
00217     };
00218 
00219 // __CPbkDataSaveAppUi_H__
00220 #endif
00221 
00222 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top