phonebookui/Phonebook2/ServerApplication/inc/CPbk2ContactEmptyDataAssigner.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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 empty contact data assigner.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2CONTACTEMPTYDATAASSIGNER_H
       
    20 #define CPBK2CONTACTEMPTYDATAASSIGNER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MPbk2ContactAssigner.h"
       
    25 #include <Pbk2ServerAppIPC.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbk2ContactAssignerObserver;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Phonebook 2 empty contact data assigner.
       
    34  */
       
    35 class CPbk2ContactEmptyDataAssigner : public CActive,
       
    36                                       public MPbk2ContactAssigner
       
    37     {
       
    38     public: // Construction and destruction
       
    39 
       
    40         /**
       
    41          * Creates a new instance of this class.
       
    42          *
       
    43          * @param aObserver     Observer.
       
    44          * @return  A new instance of this class.
       
    45          */
       
    46         static CPbk2ContactEmptyDataAssigner* NewL(
       
    47                 MPbk2ContactAssignerObserver& aObserver );
       
    48 
       
    49         /**
       
    50          * Destructor.
       
    51          */
       
    52         ~CPbk2ContactEmptyDataAssigner();
       
    53 
       
    54     public: // From MPbk2ContactAssigner
       
    55         void AssignDataL(
       
    56                 MVPbkStoreContact& aStoreContact,
       
    57                 MVPbkStoreContactField* aContactField,
       
    58                 const MVPbkFieldType* aFieldType,
       
    59                 const HBufC* aDataBuffer );
       
    60         void AssignAttributeL(
       
    61                 MVPbkStoreContact& aStoreContact,
       
    62                 MVPbkStoreContactField* aContactField,
       
    63                 TPbk2AttributeAssignData aAttributeAssignData );
       
    64 
       
    65     private: // From CActive
       
    66         void RunL();
       
    67         void DoCancel();
       
    68         TInt RunError(
       
    69                 TInt aError );
       
    70 
       
    71     private: // Implementation
       
    72         CPbk2ContactEmptyDataAssigner(
       
    73                 MPbk2ContactAssignerObserver& aObserver );
       
    74         void IssueRequest();
       
    75 
       
    76     private: // Data
       
    77         /// Ref: Observer
       
    78         MPbk2ContactAssignerObserver& iObserver;
       
    79     };
       
    80 
       
    81 #endif // CPBK2CONTACTEMPTYDATAASSIGNER_H
       
    82 
       
    83 // End of File