phonebookui/Phonebook2/ServerApplication/inc/CPbk2SelectCreateNewPropertyPhase.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
child 85 38bb213f60ba
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phonebook 2 server app assign select create
       
    15 *              : new property phase.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBK2SELECTCREATENEWPROPERTYPHASE_H
       
    21 #define CPBK2SELECTCREATENEWPROPERTYPHASE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <MPbk2ExitCallback.h>
       
    26 #include "MPbk2ServicePhase.h"
       
    27 #include <TVPbkContactStoreUriPtr.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CVPbkContactLinkArray;
       
    31 class MPbk2ServicePhaseObserver;
       
    32 class MVPbkContactLinkArray;
       
    33 class MPbk2SelectFieldProperty;
       
    34 class MPbk2DialogEliminator;
       
    35 class MVPbkStoreContact;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * Phonebook 2 server app assign select create new property phase.
       
    41  * Responsible for selecting single assign property.
       
    42  */
       
    43 class CPbk2SelectCreateNewPropertyPhase :
       
    44             public CActive,
       
    45             public MPbk2ServicePhase,
       
    46             private MPbk2ExitCallback
       
    47     {
       
    48     public: // Construction
       
    49 
       
    50         /**
       
    51          * Creates a new instance of this class.
       
    52          *
       
    53          * @param aSavingStoreUri       Saving store uri
       
    54          * @param aObserver             Observer.
       
    55          * @param aFilterBuffer         Address select filter buffer.
       
    56          * @param aSelectFieldProperty  Select field property.
       
    57          * @param aResult               Selection result.
       
    58          * @param aNoteFlags            Information note flags.
       
    59          * @return  A new instance of this class.
       
    60          */
       
    61         static CPbk2SelectCreateNewPropertyPhase* NewL(
       
    62                 TVPbkContactStoreUriPtr  aSavingStoreUri,
       
    63                 MPbk2ServicePhaseObserver& aObserver,
       
    64                 HBufC8* aFilterBuffer,
       
    65                 MPbk2SelectFieldProperty*& aSelectFieldProperty,
       
    66                 TInt& aResult,
       
    67                 TUint& aNoteFlags );
       
    68 
       
    69         /**
       
    70          * Destructor.
       
    71          */
       
    72         ~CPbk2SelectCreateNewPropertyPhase();
       
    73 
       
    74     public: // From MPbk2ServicePhase
       
    75         void LaunchServicePhaseL();
       
    76         void CancelServicePhase();
       
    77         void RequestCancelL(
       
    78                 TInt aExitCommandId );
       
    79         void AcceptDelayedL(
       
    80                 const TDesC8& aContactLinkBuffer );
       
    81         void DenyDelayedL(
       
    82                 const TDesC8& aContactLinkBuffer );
       
    83         MVPbkContactLinkArray* Results() const;
       
    84         TInt ExtraResultData() const;
       
    85         MVPbkStoreContact* TakeStoreContact();
       
    86         HBufC* FieldContent() const;
       
    87 
       
    88     public: // From MPbk2ExitCallback
       
    89         TBool OkToExitL(
       
    90                 TInt aCommandId );
       
    91 
       
    92     private: // From CActive
       
    93         void RunL();
       
    94         TInt RunError(
       
    95                 TInt aError );
       
    96         void DoCancel();
       
    97 
       
    98     private: // Implementation
       
    99         CPbk2SelectCreateNewPropertyPhase(
       
   100                 TVPbkContactStoreUriPtr  aSavingStoreUri,
       
   101                 MPbk2ServicePhaseObserver& aObserver,
       
   102                 HBufC8* aFilterBuffer,
       
   103                 MPbk2SelectFieldProperty*& aSelectFieldProperty,
       
   104                 TInt& aResult,
       
   105                 TUint& aNoteFlags );
       
   106         void SelectFieldL();
       
   107         void AppendResultL(
       
   108                 const MVPbkStoreContact* aStoreContact );
       
   109         void IssueRequest();
       
   110 
       
   111     private: // Data
       
   112         /// Own: contact store uri ptr
       
   113         TVPbkContactStoreUriPtr iSavingStoreUri;
       
   114         /// Ref: Observer
       
   115         MPbk2ServicePhaseObserver& iObserver;
       
   116         /// Own: Store contact
       
   117         MVPbkStoreContact* iStoreContact;
       
   118         /// Own: To check is this destroyed
       
   119         TBool* iDestroyedPtr;
       
   120         /// Ref: Select field dialog eliminator
       
   121         MPbk2DialogEliminator* iSelectFieldDialogEliminator;
       
   122         /// Ref: Address select filter buffer
       
   123         HBufC8* iFilterBuffer;
       
   124         /// Ref: Select field property
       
   125         MPbk2SelectFieldProperty*& iSelectFieldProperty;
       
   126         /// Own: Selected field index
       
   127         TInt& iResult;
       
   128         /// Ref: Information note flags
       
   129         TUint& iNoteFlags;        
       
   130     };
       
   131 
       
   132 #endif // CPBK2SELECTCREATENEWPROPERTYPHASE_H
       
   133 
       
   134 // End of File