speechsrv_plat/vas_api/inc/nssvasmgetcontextclient.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:  MNssGetContextClient provides the public callback interfaces for 
       
    15 *               clients that want to retrieve contexts from the VAS Db. The 
       
    16 *               client must inherit and override the GetContextCompleted() and 
       
    17 *               GetContextFailed() methods to handle VAS Db responses for 
       
    18 *               retrieving context(s).
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 #ifndef NSSVASMGETCONTEXTCLIENT_H
       
    24 #define NSSVASMGETCONTEXTCLIENT_H
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 //FORWARD DECLARATIONS
       
    29 class MNssContext;
       
    30 
       
    31 typedef CArrayPtrFlat<MNssContext> MNssContextListArray;
       
    32 
       
    33 // CLASS DECLARATIONS
       
    34 /**
       
    35 *  MNssGetContextClient defines the call back methods used by VAS DB
       
    36 *  when replying to an asynchronous GetContext() request.
       
    37 *  @lib NssVASApi.lib
       
    38 *  @since 2.0
       
    39 */
       
    40 class MNssGetContextClient
       
    41 {
       
    42 public:
       
    43 #ifdef __SIND_RD_BREAK_PHONEBOOK_COMPATIBILITY
       
    44 
       
    45    /**
       
    46    * Callback to indicate GetContext successed.
       
    47    * client has to delete the context after using the context.
       
    48    * @since 3.2
       
    49    * @param aContext 
       
    50    * @return None
       
    51    */
       
    52   virtual void GetContextCompleted( MNssContext* aContext,
       
    53                                     TInt aErrorCode ) = 0;
       
    54 
       
    55    /**
       
    56    * Callback to indicate GetContext successed.
       
    57    * client has to ResetAndDestroy() after using the list.
       
    58    * @since 3.2
       
    59    * @param aContextList A list of contexts. 
       
    60    * @return None
       
    61    */
       
    62   virtual void GetContextListCompleted( MNssContextListArray *aContextList,
       
    63                                         TInt aErrorCode ) = 0;
       
    64 
       
    65 #else
       
    66 
       
    67   enum TNssGetContextClientFailCode
       
    68   {
       
    69 	  EVASDBItemNotFound = 1,
       
    70 	  EVASDBNoMemory,
       
    71 	  EVASDBDiskFull,
       
    72 	  EVASDBFailure
       
    73   };
       
    74 
       
    75    /**
       
    76    * Callback to indicate GetContext successed.
       
    77    * client has to delete the context after using the context.
       
    78    * @since 2.0
       
    79    * @param aContext 
       
    80    */
       
    81   virtual void GetContextCompleted( MNssContext* /*aContext*/,
       
    82                                     TInt /*aErrorCode*/ ) {};
       
    83 
       
    84    /**
       
    85    * Callback to indicate GetContext successed.
       
    86    * client has to ResetAndDestroy() after using the list.
       
    87    * @since 2.0
       
    88    * @param aContextList A list of contexts. 
       
    89    */
       
    90   virtual void GetContextListCompleted( MNssContextListArray* /*aContextList*/,
       
    91                                         TInt /*aErrorCode*/ ) {};
       
    92 
       
    93    /**
       
    94    * Callback to indicate GetContext successed.
       
    95    * client has to delete the context after using the context.
       
    96    * @since 2.0
       
    97    * @param aContext 
       
    98    */
       
    99   virtual void GetContextCompleted( MNssContext* /*aContext*/ ) {};
       
   100 
       
   101    /**
       
   102    * Callback to indicate GetContext successed.
       
   103    * client has to ResetAndDestroy() after using the list.
       
   104    * @since 2.0
       
   105    * @param aContextList A list of contexts. 
       
   106    */
       
   107   virtual void GetContextListCompleted( MNssContextListArray* /*aContextList*/ ) {};
       
   108 
       
   109    /**
       
   110    * Callback to indicate GetContext failed.
       
   111    * @since 2.0
       
   112    * @param aFailCode The reason GetContext failed
       
   113    * @return None
       
   114    */  
       
   115   virtual void GetContextFailed( TNssGetContextClientFailCode /*aFailCode*/ ) {};
       
   116 #endif // __SIND_RD_BREAK_PHONEBOOK_COMPATIBILITY
       
   117 
       
   118 };
       
   119 
       
   120 #endif