searchui/searchapp/srchuigenui/inc/searchrequirement.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2006-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:      CSearchRequirement class used to form the Search Query
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_SEARCHREQ_H
       
    24 #define C_SEARCHREQ_H
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <s32strm.h>
       
    28 
       
    29 #include <searchcontent.h>
       
    30 #include <searchcondition.h>
       
    31 #include <searchcontent.h>
       
    32 #include <searchquery.h>
       
    33 
       
    34 /**
       
    35  *  CSearchRequirement class used to form the Search Query
       
    36  *
       
    37  *  The UI provides the necessary input to form the Query. This class
       
    38  *  forms the query using the lexical analyser and then returns the 
       
    39  *  formed query to the Client.
       
    40  *
       
    41  *  @lib searchutilities.lib
       
    42  */
       
    43 NONSHARABLE_CLASS( CSearchRequirement ) : public CBase
       
    44     {
       
    45 
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Constructor of the class
       
    50      *
       
    51      * @param None
       
    52      * @return The pointer to CSearchRequirement
       
    53      */
       
    54      static CSearchRequirement* NewL();
       
    55     
       
    56     /**
       
    57      * Constructor of the class
       
    58      *
       
    59      * @param Read Data Stream Buffer
       
    60      * @return The pointer to CSearchRequirement
       
    61      */
       
    62      static CSearchRequirement* NewL( RReadStream* aStream );
       
    63 
       
    64     /**
       
    65      * Destructor of the class
       
    66      *
       
    67      */    
       
    68     virtual ~CSearchRequirement();
       
    69 
       
    70     /**
       
    71      * Writes the data into the Stream
       
    72      *
       
    73      * @param The Write Data Stream
       
    74      * @return None
       
    75      */
       
    76      void ExternalizeL( RWriteStream& aStream ) const;
       
    77     
       
    78     /**
       
    79      * Reads the data from a Stream
       
    80      *
       
    81      * @param The Write Data Stream
       
    82      * @return None
       
    83      */    
       
    84      void InternalizeL( RReadStream* aStream );  
       
    85       
       
    86     /**
       
    87      * Lexical analyser..forms the search Query as well
       
    88      *
       
    89      * @param1 : Keyword for Search
       
    90      * @param2 : Service ID
       
    91      * @param3 : Plugin ID
       
    92      * @param4 : Search Realm
       
    93      * @param5 : The search content Array
       
    94      * @return SearchQuery of the plug-in.
       
    95      */        
       
    96      CSearchQuery* CreateRequestL( TDesC8 &aKeyWord,
       
    97     									 TUid aServiceId, 
       
    98     									 RArray<TUid> aContentIdArray						 
       
    99     									 );
       
   100     								
       
   101     /**
       
   102      * returns the actual query to be sent by the client
       
   103      * Function to be called by the client when it needs the query
       
   104      * @param None
       
   105      * @return SearchQuery
       
   106      */
       
   107      CSearchQuery* GetRequest();
       
   108      
       
   109 private:      
       
   110      /**
       
   111      * Constructor of the class
       
   112      *
       
   113      * @param Read Data Stream Buffer
       
   114      * @return None
       
   115      */
       
   116 	 void ConstructL( RReadStream* aStream);
       
   117     
       
   118 private: //data
       
   119 	/**
       
   120      * Search query
       
   121      * Own
       
   122      */
       
   123     CSearchQuery *iSearchQuery;
       
   124     
       
   125     };
       
   126 
       
   127 #endif // C_SEARCHREQ_H