imsrv_plat/ximp_search_data_model_api/inc/searchkeyinfo.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Interface for Search key  info object.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MSEARCHKEYINFO_H
       
    19 #define MSEARCHKEYINFO_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <ximpbase.h>
       
    23 #include <searchdatamodelifids.hrh>
       
    24 #include <badesca.h> 
       
    25 #include <searchelement.h>
       
    26 
       
    27  enum TKeyType
       
    28      {
       
    29      EKey, 
       
    30      ELabel
       
    31      };
       
    32 
       
    33 /**  file supportedsearchkey.h
       
    34  *  Interface class for  seach key  info 
       
    35  *
       
    36  */
       
    37 class MSearchKeyInfo : public MXIMPBase
       
    38     {
       
    39     
       
    40 	    
       
    41 	public:
       
    42 
       
    43 	    /** Interface ID for the MSearchKeyInfo. */
       
    44 	    enum { KInterfaceId = SEARCH_IF_ID_SEARCH_KEY_INFO };
       
    45 
       
    46 
       
    47 	public:
       
    48 
       
    49 	    /**
       
    50 	     * Public destructor.
       
    51 	     * Objects can be deleted through this interface.
       
    52 	     */
       
    53 	    virtual ~MSearchKeyInfo() {}
       
    54 
       
    55 
       
    56 	public:
       
    57 	    /**
       
    58          *  returns key type 
       
    59          *  cleint has to access Key() and Label() methods based on this return value.
       
    60          *  if return value if Ekey , then  Key()
       
    61          *  else f return value if ELabel ,then Label()
       
    62          * 
       
    63          *  @return the TKeyType , which is the key type.
       
    64          *  any one value in the range of TKeyType enums 
       
    65          * 
       
    66          */
       
    67          virtual  TKeyType  Type()const =0 ;
       
    68          
       
    69         /**
       
    70          *   Sets the key type, whether label or key 
       
    71          *
       
    72          *   @param aType :  
       
    73          *        aType to be set any value from the set of TKeyType enums
       
    74          *
       
    75          */
       
    76         virtual void SetType( TKeyType aType)  = 0 ;
       
    77 	    
       
    78 	 	/**
       
    79 	     *  returns key value 
       
    80 	     * 
       
    81 	     *  @return the TSearchKey value , which is the key.
       
    82 	     *  this value is '0' if not set properly. ( If label 
       
    83 	     *  else any one value in the range of TSearchKey enums 
       
    84 	     *  also see searchelement.h for TSearchKey enums value. 
       
    85 	     */
       
    86 	    virtual  TSearchKey Key()const =0 ;
       
    87 	    
       
    88 	    
       
    89       	/**
       
    90 	     *   Sets the key value
       
    91 	     *
       
    92 	     *   @param aKey :  
       
    93 	     *        akey to be set any value from the set of TSearchKey enums
       
    94 	     *
       
    95 	     */
       
    96 	    virtual void SetKey( TSearchKey aKey)  = 0 ;
       
    97 	    
       
    98 	    /**
       
    99          *   returns the search label.
       
   100          * 
       
   101          *  @return TDesc16& value of the  label. 
       
   102          */
       
   103         virtual const TDesC16&  Label() const =0 ;
       
   104         
       
   105         
       
   106         /**
       
   107          *   Sets the label
       
   108          *
       
   109          *  @param aLabel   label to be set
       
   110          */
       
   111         virtual void  SetLabelL(const TDesC16& aLabel)  = 0 ;  
       
   112     };
       
   113 
       
   114 
       
   115 #endif // MSEARCHKEYINFO_H
       
   116 
       
   117 
       
   118