speechsrv_plat/vas_api/inc/nssvasmtagmgr.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     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:  MNssTagMgr provides services for tag management. Clients obtain a
       
    15 *				 tag manager from the VAS DB Manager. VAS DB Manager owns the tag 
       
    16 *				 manager and is responsible for deleting it when the VAS DB manager is
       
    17 *				 deleted. Clienst should not directly delete the tag manager. Through
       
    18 *				 the tag manager, a client can create a tag, save it to the VAS DB, 
       
    19 *				 retreive a tag (or tag list) from the VAS DB, and delete tag from VAS DB.
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 #ifndef MNSSTAGMGR_H
       
    25 #define MNSSTAGMGR_H
       
    26 
       
    27 // INCLUDES
       
    28 #include <e32std.h>
       
    29 #include <nssvascoreconstant.h>
       
    30 
       
    31 
       
    32 //FORWARD DECLARATIONS
       
    33 class MNssGetTagClient;
       
    34 class MNssDeleteTagClient;
       
    35 class MNssSaveTagClient;
       
    36 class MNssTag;
       
    37 class MNssRRD;
       
    38 class MNssContext;
       
    39 class MNssGetTagReferenceClient;
       
    40 class MNssTagReference;
       
    41 
       
    42 // CLASS DECLARATIONS
       
    43 /**
       
    44 *  MNssTagMgr is the interface class for tag management. 
       
    45 *  @lib NssVASApi.lib
       
    46 *  @since 2.0
       
    47 */
       
    48 class MNssTagMgr
       
    49 {
       
    50 public:
       
    51    /**
       
    52    * Creates a new tag. A context needs to be created prior to creating a tag.
       
    53    * @since 2.0
       
    54    * @param aContext - context for the tag
       
    55    * @return newly created tag pointer
       
    56    */
       
    57    virtual MNssTag* CreateTagL(MNssContext* aContext)=0;
       
    58    
       
    59    /**
       
    60    * Gets tag list associated with a context. Asynchronous.
       
    61    * @since 2.0
       
    62    * @param aTagClient - call back address
       
    63    * @param aContext - context for which to get the tags
       
    64    * @return synchronous return error code
       
    65    */   
       
    66    virtual TInt GetTagList(MNssGetTagClient* aTagClient, MNssContext* aContext)=0;
       
    67 
       
    68    /**
       
    69    * Gets tag list with a given name. Asynchronous.
       
    70    * @since 2.0
       
    71    * @param aTagClient - call back address
       
    72    * @param aContext - context for which to get the tags
       
    73    * @param aName - name for which to get the tags
       
    74    * @return synchronous return error code
       
    75    */   
       
    76    virtual TInt GetTagList( MNssGetTagClient* aTagClient, MNssContext* aContext,
       
    77                             const TDesC& aName)=0;
       
    78       
       
    79    /**
       
    80    * Delete tag from VAS DB. Asynchronous.
       
    81    * @since 2.0
       
    82    * @param aTagClient - call back address
       
    83    * @param aTag - tag to delete
       
    84    * @return synchronous return error code
       
    85    */   
       
    86    virtual TInt DeleteTag(MNssDeleteTagClient* aTagClient,MNssTag* aTag)=0;
       
    87 
       
    88    /**
       
    89    * Save tag to VAS DB. Asynchronous.
       
    90    * @since 2.0
       
    91    * @param aTagClient - call back address
       
    92    * @param aTag - tag to save
       
    93    * @return synchronous return error code
       
    94    */   
       
    95    virtual TInt SaveTag(MNssSaveTagClient* aTagClient,MNssTag* aTag)=0;
       
    96    
       
    97    /**
       
    98    * Get tag count from VAS DB. Synchronous.
       
    99    * @since 2.0
       
   100    * @param aContext - context for which to get tag count.
       
   101    * @return synchronous return error code or tagCount
       
   102    */   
       
   103    virtual TInt TagCount(MNssContext* aContext)=0;
       
   104 
       
   105    /**
       
   106    * Get the tag(s) based on partial rrd int data. Asynchronous.
       
   107    * @since 2.0
       
   108    * @param aTagClient - call back address
       
   109    * @param aTInt - a rrd int value
       
   110    * @param aPosition - the rrd int value position in the rrd intarray 
       
   111    * @return asynchronous return error code
       
   112    */
       
   113    virtual TInt GetTagList( MNssGetTagClient* aTagClient,MNssContext* aContext,
       
   114                             TInt aNum,TInt aPosition )=0;
       
   115    /**
       
   116    * Get the tag(s) based on partial rrd text data. Asynchronous.
       
   117    * @since 2.0
       
   118    * @param aTagClient - call back address
       
   119    * @param aTInt - a rrd text value
       
   120    * @param aPosition - the rrd text value position in the rrd textarray
       
   121    * @return asynchronous return error code
       
   122    */
       
   123    virtual TInt GetTagList( MNssGetTagClient* aTagClient,MNssContext* aContext,
       
   124                             TDesC& aText,TInt aPosition )=0;
       
   125                             
       
   126    /**
       
   127    * Get a list of tag references based on context. Asynchronous.
       
   128    * @since 2.0
       
   129    * @param aTagReferenceClient - call back address
       
   130    * @param aContext - a context
       
   131    * @return asynchronous return error code
       
   132    */
       
   133    virtual TInt GetTagReferenceList( MNssGetTagReferenceClient* aTagRefClient,
       
   134                                      MNssContext* aContext )=0;
       
   135    
       
   136    /**
       
   137    * Get a tag based on tagreference. Asynchronous.
       
   138    * @since 2.0
       
   139    * @param aTagClient - call back address
       
   140    * @param aTagReference - a tagreferenc
       
   141    * @return asynchronous return error code
       
   142    */
       
   143    virtual TInt GetTag(MNssGetTagClient* aTagClient,MNssTagReference* aTagReference)=0;
       
   144 };
       
   145 #endif