phonebookui/Phonebook2/ServerApplication/inc/CPbk2SelectUpdateEmptyPropertyPhase.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-2008 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 update
       
    15 *              : empty property phase.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBK2SELECTUPDATEEMPTYPROPERTYPHASE_H
       
    21 #define CPBK2SELECTUPDATEEMPTYPROPERTYPHASE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "MPbk2ServicePhase.h"
       
    26 #include <MVPbkSingleContactOperationObserver.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MPbk2ServicePhaseObserver;
       
    30 class MPbk2SelectFieldProperty;
       
    31 class MVPbkStoreContact;
       
    32 class MVPbkContactLinkArray;
       
    33 class MVPbkContactOperationBase;
       
    34 class CVPbkContactLinkArray;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * Phonebook 2 server app assign update empty property phase.
       
    41  * Responsible for implementing the select property service
       
    42  * phase in no data / empty data cases for entry update service.
       
    43  */
       
    44 class CPbk2SelectUpdateEmptyPropertyPhase : public CBase,
       
    45                                    public MPbk2ServicePhase,
       
    46                                    private MVPbkSingleContactOperationObserver
       
    47     {
       
    48     public: // Construction
       
    49 
       
    50         /**
       
    51          * Creates a new instance of this class.
       
    52          *
       
    53          * @param aObserver             Observer.
       
    54          * @param aContactLinks         Contact links.
       
    55          * @param aSelectFieldProperty  Select field property.
       
    56          * @param aResult               Selection result.
       
    57          * @param aNoteFlags            Information note flags.
       
    58          * @return  A new instance of this class.
       
    59          */
       
    60         static CPbk2SelectUpdateEmptyPropertyPhase* NewL(
       
    61                 MPbk2ServicePhaseObserver& aObserver,
       
    62                 MVPbkContactLinkArray& aContactLinks,
       
    63                 MPbk2SelectFieldProperty*& aSelectFieldProperty,
       
    64                 TInt& aResult,
       
    65                 TUint& aNoteFlags );
       
    66 
       
    67         /**
       
    68          * Destructor.
       
    69          */
       
    70         ~CPbk2SelectUpdateEmptyPropertyPhase();
       
    71 
       
    72     public: // From MPbk2ServicePhase
       
    73         void LaunchServicePhaseL();
       
    74         void CancelServicePhase();
       
    75         void RequestCancelL(
       
    76                 TInt aExitCommandId );
       
    77         void AcceptDelayedL(
       
    78                 const TDesC8& aContactLinkBuffer );
       
    79         void DenyDelayedL(
       
    80                 const TDesC8& aContactLinkBuffer );
       
    81         MVPbkContactLinkArray* Results() const;
       
    82         MVPbkStoreContact* TakeStoreContact();
       
    83         TInt ExtraResultData() const; 
       
    84         HBufC* FieldContent() const;
       
    85 
       
    86     private: // From MVPbkSingleContactOperationObserver
       
    87         void VPbkSingleContactOperationComplete(
       
    88                 MVPbkContactOperationBase& aOperation,
       
    89                 MVPbkStoreContact* aContact );
       
    90         void VPbkSingleContactOperationFailed(
       
    91                 MVPbkContactOperationBase& aOperation,
       
    92                 TInt aError );
       
    93 
       
    94     private: // Implementation
       
    95         CPbk2SelectUpdateEmptyPropertyPhase(
       
    96                 MPbk2ServicePhaseObserver& aObserver,
       
    97                 MPbk2SelectFieldProperty*& aSelectFieldProperty,
       
    98                 TInt& aResult,
       
    99                 TUint& aNoteFlags );
       
   100         void ConstructL(
       
   101         		MVPbkContactLinkArray& aContactLinks );
       
   102         void RetrieveContactL();
       
   103 
       
   104     private: // Data
       
   105         /// Ref: Observer
       
   106         MPbk2ServicePhaseObserver& iObserver;
       
   107         /// Own: Store contact
       
   108         MVPbkStoreContact* iStoreContact;
       
   109         /// Ref: Select field property
       
   110         MPbk2SelectFieldProperty*& iSelectFieldProperty;
       
   111         /// Own: Contact links
       
   112         CVPbkContactLinkArray* iContactLinks;
       
   113         /// Own: Contact retrieve operation
       
   114         MVPbkContactOperationBase* iRetrieveOperation;
       
   115         /// Own: Selected field index
       
   116         TInt& iResult;
       
   117     };
       
   118 
       
   119 #endif // CPBK2SELECTUPDATEEMPTYPROPERTYPHASE_H
       
   120 
       
   121 // End of File