speechsrv_plat/vas_api/inc/nssvasmgettagclient.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  MNssGetTagClient provides the public callback interfaces for clients 
       
    15 *               that want to retrieve tags from the VAS Db. The client must inherit 
       
    16 *               and override the GetTagCompleted() and GetTagFailed() methods to 
       
    17 *               handle VAS Db responses for retrieving tag(s).
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef MNSSGETTAGCLIENT_H
       
    23 #define MNSSGETTAGCLIENT_H
       
    24 
       
    25 // includes 
       
    26 #include <e32std.h>
       
    27 #include <e32base.h>
       
    28 
       
    29 // forward declarations
       
    30 class MNssTag;
       
    31 
       
    32 //typedef 
       
    33 typedef CArrayPtrFlat<MNssTag> MNssTagListArray;
       
    34 
       
    35 // CLASS DECLARATIONS
       
    36 /**
       
    37 *  MNssGetTagClient defines the call back methods used by VAS DB
       
    38 *  when replying to an asynchronous GetTag() request.
       
    39 *  @lib NssVASApi.lib
       
    40 *  @since 2.0
       
    41 */
       
    42 
       
    43 class MNssGetTagClient
       
    44 {
       
    45 public:
       
    46 #ifdef __SIND_RD_BREAK_PHONEBOOK_COMPATIBILITY
       
    47 
       
    48    /**
       
    49    * Callback to indicate GetTag successed.
       
    50    * client has to delete the tag list
       
    51    * @since 3.2
       
    52    * @param aTagList 
       
    53    */
       
    54    virtual void GetTagListCompleted( MNssTagListArray* aTagList,
       
    55                                      TInt aErrorCode ) = 0;
       
    56 #else
       
    57    enum TNssGetTagClientFailCode
       
    58    {
       
    59 	  EVASDBItemNotFound = 1, 
       
    60 	  EVASDBNoMemory,
       
    61 	  EVASDBDiskFull,
       
    62 	  EVASDBFailure
       
    63    };
       
    64    
       
    65    /**
       
    66    * Callback to indicate GetTag successed.
       
    67    * client has to delete the tag list
       
    68    * @since 2.0
       
    69    * @param aTagList 
       
    70    */
       
    71    virtual void GetTagListCompleted( MNssTagListArray* /*aTagList*/,
       
    72                                      TInt /*aErrorCode*/ ) {};   
       
    73    
       
    74    /**
       
    75    * Callback to indicate GetTag successed.
       
    76    * client has to delete the tag list
       
    77    * @since 2.0
       
    78    * @param aTagList 
       
    79    */
       
    80    virtual void GetTagListCompleted( MNssTagListArray* /*aTagList*/ ) {};
       
    81    
       
    82    /**
       
    83    * Callback to indicate GetTag failed.
       
    84    * @since 2.0
       
    85    * @param aFailCode - The reason GetTag failed
       
    86    */ 
       
    87    virtual void GetTagFailed( TNssGetTagClientFailCode /*aFailCode*/ ) {};
       
    88  
       
    89 #endif // __SIND_RD_BREAK_PHONEBOOK_COMPATIBILITY   
       
    90 };
       
    91 
       
    92 #endif