speechsrv_plat/vas_api/inc/nssvasmcontext.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2004-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:  MNssContext is a pure interface for context processing. A "context" 
       
    15 *               refers to a collection of voice  tags used by an application 
       
    16 *               for a classification of operations (for example a collection of 
       
    17 *               Name Dial voice tags could be contained in one context and 
       
    18 *               Command voice tags could be contained in another context). 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 #ifndef NSSVASMCONTEXT_H
       
    24 #define NSSVASMCONTEXT_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include<e32base.h>
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  MNssContext is a pure interface for context processing. 
       
    33 *  MNssContext provides methods for setting & getting context name and setting & 
       
    34 *  getting context global flag. A context can only be created using the context 
       
    35 *  manager. The context manager returns an empty context, and the client had to 
       
    36 *  populate its name and global flag using the methods below. A context can be 
       
    37 *  destroyed using delete on the context pointer.
       
    38 *  @lib NssVASApi.lib
       
    39 *  @since 2.0
       
    40 */
       
    41 
       
    42 class MNssContext
       
    43     {
       
    44 public:
       
    45 
       
    46     /**
       
    47     * Get the name of the context
       
    48     * @since 2.0
       
    49     * @param 
       
    50     * @return reference to name of context
       
    51     */  
       
    52 	virtual TDesC& ContextName() = 0;
       
    53 
       
    54 
       
    55 	/**
       
    56     * Is the context global
       
    57     * @since 2.0
       
    58     * @param 
       
    59     * @return ETrue if context is global, EFalse otherwise
       
    60     */  
       
    61 	virtual TBool IsGlobal() = 0;
       
    62 
       
    63 	/**
       
    64     * Sets the name of the context
       
    65     * @since 2.0
       
    66     * @param aName name of the context as a descriptor
       
    67     * @return 
       
    68     */  
       
    69 	virtual void SetNameL( const TDesC& aName ) = 0;
       
    70 
       
    71     /**
       
    72     * Sets/Resets the global flag for the context
       
    73     * @since 2.0
       
    74     * @param aGlobal ETrue to set the context as global, EFalse as not global 
       
    75     * @return 
       
    76     */  
       
    77 	virtual void SetGlobal( TBool aGlobal ) = 0;
       
    78 
       
    79     /**
       
    80     * Sets/Resets the client data. The data must be saved with
       
    81     * MNssContextMgr::SaveClientData after this call.
       
    82     * @since 2.8
       
    83     * @param aData At most 100 bytes of serialized client data.
       
    84     */
       
    85     virtual void SetClientData( const TDesC8& aData ) = 0;
       
    86 
       
    87     /**
       
    88     * Gets the client data.
       
    89     * @since 2.8
       
    90     * @return At most 100 bytes of data.
       
    91     */
       
    92     virtual const TDesC8& ClientData() = 0;
       
    93 
       
    94     /**
       
    95     * virutal destructor to ensure proper cleanup 
       
    96     * @since 2.0
       
    97     * @param 
       
    98     * @return 
       
    99     */  
       
   100 	virtual ~MNssContext(){}
       
   101 
       
   102     };
       
   103 
       
   104 
       
   105 #endif // NSSVASMCONTEXT_H  
       
   106             
       
   107 // End of File