phonebookui/Phonebook/PbkSINDHandler/inc/CPbkSINDHandler.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Extension for Phonebook engine, handles all sind related 
       
    15 *                activities
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPBKSINDHANDLER_H__
       
    21 #define __CPBKSINDHANDLER_H__
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <f32file.h>
       
    26 #include <CPbkSINDHandlerInterface.h>
       
    27 #include <NssVasApi.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CPbkConstants;
       
    31 class CPbkFieldsInfo;
       
    32 class TPbkContactItemField;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * Extension for Phonebook engine.
       
    38  */
       
    39 class CPbkSINDHandler : public CPbkSINDHandlerInterface,
       
    40                         public MNssGetContextClient,
       
    41                         public MNssGetTagClient
       
    42     {
       
    43     public: // Constructor and destructor
       
    44         /**
       
    45          * Creates a new instance of CPbkSINDHandler.         
       
    46          */
       
    47         static CPbkSINDHandler* NewL();
       
    48 
       
    49         /**
       
    50          * Destructor.
       
    51          */
       
    52         ~CPbkSINDHandler();
       
    53         
       
    54     public: // From CPbkSINDHandlerInterface
       
    55     
       
    56         TInt VoiceTagField(TContactItemId aContactId);
       
    57         
       
    58     public: // From MNssGetContextClient
       
    59     
       
    60         void GetContextCompleted(MNssContext* aContext);
       
    61         void GetContextListCompleted(MNssContextListArray *aContextList);
       
    62         void GetContextFailed(TNssGetContextClientFailCode aFailCode);
       
    63     
       
    64     public: // From MNssGetTagClient
       
    65     
       
    66         void GetTagListCompleted(MNssTagListArray* aTagList);
       
    67         void GetTagFailed(TNssGetTagClientFailCode aFailCode);
       
    68         
       
    69     private: // own methods:
       
    70         /**
       
    71         * Initializes all SIND instances.
       
    72         * @return TInt KErrNone on success
       
    73         */
       
    74         TInt InitializeL();
       
    75 
       
    76     private: // Implementation
       
    77         CPbkSINDHandler();
       
    78         void ConstructL();
       
    79         
       
    80     private: // Data
       
    81         
       
    82         /// Own: Vas databse manager
       
    83         CNssVASDBMgr* iVasDbManager;        
       
    84         /// Own: Nss context
       
    85         MNssContext* iContext;
       
    86         /// Own: scheduler wait object
       
    87         CActiveSchedulerWait* iWait;
       
    88         /// Ref: Context manager
       
    89         MNssContextMgr* iContextManager;        
       
    90         /// Ref: Tag manager
       
    91         MNssTagMgr* iTagManager;
       
    92         /// Error code received from observer call-back methods.
       
    93         TInt iErr;
       
    94         /// Id of the voice tagged field id
       
    95         TInt iVoiceTaggedFieldId;
       
    96         /// Has the SindHandler been initialized
       
    97         TBool iInitialized;
       
    98     };
       
    99 
       
   100 #endif  // __CPBKSINDHANDLER_H__
       
   101 
       
   102 // End of file