imservices/searchfeatureplugin/srcsearchdatamodel/search/searchkeyinfoimp.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:  MSupportedSearchKey API object implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CSEARCHKEYINFOIMP_H
       
    19 #define CSEARCHKEYINFOIMP_H
       
    20 
       
    21 
       
    22 #include <s32strm.h>
       
    23 #include <badesca.h>
       
    24 #include <searchkeyinfo.h>
       
    25 #include "ximpapidataobjbase.h"
       
    26 #include "searchapiobjbase.h"
       
    27 
       
    28 
       
    29 /**
       
    30  * MSearchKeyInfo API object implementation.
       
    31  *
       
    32  * @lib searchdatamodel.dll
       
    33  */
       
    34 NONSHARABLE_CLASS( CSearchKeyInfoImp ): public CXIMPApiDataObjBase, public MSearchKeyInfo
       
    35     {
       
    36     public:
       
    37     /** The class ID. */
       
    38     enum { KClassId = IMP_CLSID_CSEARCHKEY_INFO_IMP };
       
    39 
       
    40 	public:
       
    41 		/**
       
    42     	 * Construction :NewLC
       
    43      	 */
       
    44 	    IMPORT_C static CSearchKeyInfoImp* NewLC();
       
    45 	    /**
       
    46     	 * Construction :NewL
       
    47      	 */
       
    48 	    IMPORT_C static CSearchKeyInfoImp* NewL();
       
    49 	    
       
    50 	    /**
       
    51          * Destructor
       
    52          */
       
    53 	    virtual ~CSearchKeyInfoImp();
       
    54 
       
    55 	private:
       
    56 		/**
       
    57 	     * constructor
       
    58 	     */
       
    59 	    CSearchKeyInfoImp();
       
    60 	    
       
    61 	    /**
       
    62 	     * 2nd phase constructor
       
    63 	     */
       
    64 	    void ConstructL();
       
    65 	    
       
    66 	public: // From CXIMPApiDataObjBase
       
    67 
       
    68 	    /**
       
    69 	     * @see CXIMPApiDataObjBase
       
    70 	     */
       
    71 	    XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS
       
    72 	    XIMPIMP_DECLARE_IF_BASE_METHODS
       
    73 
       
    74 	                         
       
    75 	public: // from  MSearchKeyInfo
       
    76 
       
    77 	    /**
       
    78 	     * Internalizes object data from given stream.
       
    79 	     * @param aStream Stream to read.
       
    80 	     */
       
    81 	    IMPORT_C void InternalizeL( RReadStream& aStream );
       
    82 	    
       
    83 	    /**
       
    84 	     * 
       
    85 	     * @see MSearchKeyInfo
       
    86 	     */
       
    87 	    TSearchKey Key() const ; 
       
    88 	     void SetKey( TSearchKey aKey) ;
       
    89 	     
       
    90 	    /**
       
    91          * 
       
    92          * @see MSearchKeyInfo
       
    93          */
       
    94 	     TKeyType  Type()const ;
       
    95 	     void SetType(TKeyType aType);
       
    96 	     
       
    97 	     /**
       
    98           * 
       
    99           * @see MSearchKeyInfo
       
   100           */
       
   101 	     const TDesC16&  Label() const;
       
   102 	     void  SetLabelL(const TDesC16& aLabel);
       
   103 	     
       
   104 		/**
       
   105 	     * returns the order of elements
       
   106 	     * @  return '1' always here  : 
       
   107 	     */
       
   108 	   IMPORT_C  static TInt LinearOrder(  const CSearchKeyInfoImp& aA,
       
   109 	        						       const CSearchKeyInfoImp& aB  ) ;
       
   110 	        
       
   111 
       
   112 	private: // data
       
   113 
       
   114 	    // key
       
   115 	    TInt iKey;
       
   116 	    
       
   117 	    //key type
       
   118 	    TInt iKeyType;
       
   119 	    
       
   120 	    //Lablel : owned
       
   121 	    RBuf16 iLabel; 
       
   122     };
       
   123 
       
   124 
       
   125 #endif // CSEARCHKEYINFOIMP_H