imservices/searchfeatureplugin/srcsearchdatamodel/search/searchelementimp.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:  Msearchelement  implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CSEARCHELEMENTIMP_H
       
    19 #define CSEARCHELEMENTIMP_H
       
    20 
       
    21 
       
    22 #include <s32strm.h>
       
    23 #include <badesca.h>
       
    24 #include <searchelement.h>
       
    25 #include "ximpapidataobjbase.h"
       
    26 #include "searchapiobjbase.h"
       
    27 
       
    28 
       
    29 class CSearchElementImp;
       
    30 class CXIMPIdentityImp;
       
    31 /**
       
    32  * MSearchElement  implementation.
       
    33  *
       
    34  * @lib searchdatamodel.dll
       
    35  */
       
    36 NONSHARABLE_CLASS( CSearchElementImp ): public CXIMPApiDataObjBase,public MSearchElement
       
    37     {
       
    38     public:
       
    39     /** The class ID. */
       
    40     enum { KClassId = IMP_CLSID_CSEARCHELEMENTIMP };
       
    41 
       
    42 	public:
       
    43 	 	/**
       
    44     	 * Construction :NewLC
       
    45      	 */
       
    46 	    IMPORT_C static CSearchElementImp* NewLC();
       
    47 	    /**
       
    48     	 * Construction :NewL
       
    49      	 */
       
    50 	    IMPORT_C static CSearchElementImp* NewL();
       
    51 	    /**
       
    52          * Destructor
       
    53          */
       
    54 	    virtual ~CSearchElementImp();
       
    55 
       
    56 	private:
       
    57 		/**
       
    58 	     * constructor
       
    59 	     */
       
    60 	    CSearchElementImp();
       
    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: // New functions
       
    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 MSearchElement
       
    86 	     */
       
    87 	    void SetRequestL( MXIMPIdentity& aSearchId,TSearchKey aKey) ;
       
    88 	    /**
       
    89          * 
       
    90          * @see MSearchElement
       
    91          */
       
    92 	    void SetRequestL( MXIMPIdentity& aSearchId, MXIMPIdentity& aLabelId) ;  
       
    93 	    /**
       
    94          * 
       
    95          * @see MSearchElement
       
    96          */
       
    97 	    MXIMPIdentity&  GetSearchLabel() const;
       
    98 	    
       
    99 	   	/**
       
   100 	     * 
       
   101 	     * @see MSearchElement
       
   102 	     */   
       
   103 	    MXIMPIdentity&  GetSearchId() const;
       
   104 	   
       
   105 	   	/**
       
   106 	     * 
       
   107 	     * @see MSearchElement
       
   108 	     */     
       
   109 	    TSearchKey  GetSearchKey() const;  
       
   110 	     
       
   111 	private:
       
   112 	    /**
       
   113          * CXIMPIdentityImp for search id :  owned
       
   114          */
       
   115 	    CXIMPIdentityImp* iIdentity; 
       
   116 	    /**
       
   117          * CXIMPIdentityImp for label :   owned
       
   118          */
       
   119 	    CXIMPIdentityImp* iLabelIdentity; 
       
   120 	    /**
       
   121          * search key
       
   122          */
       
   123 	    TInt iSearchKey;
       
   124 	    
       
   125 	   
       
   126     };
       
   127 
       
   128 
       
   129 #endif // CSEARCHELEMENTIMP_H