organizer_plat/searchfw_launcher_api/inc/searchsinglecondition.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:  Class for search condition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SEARCHSINGLECONDITION_H
       
    20 #define C_SEARCHSINGLECONDITION_H
       
    21 
       
    22 #include <searchcondition.h>
       
    23 
       
    24 class CSearchField;
       
    25 
       
    26 /**
       
    27  *  Class for all search condition.
       
    28  *
       
    29  *  @lib searchutilities.lib
       
    30  */
       
    31 NONSHARABLE_CLASS( CSearchSingleCondition ) : public CSearchCondition 
       
    32     {
       
    33 
       
    34 public:
       
    35 	
       
    36     /**
       
    37      * two phase constructor
       
    38      * 
       
    39      * @param aTerm CSearchField object
       
    40      * @return CSearchSingleCondition
       
    41      */
       
    42 	 IMPORT_C static CSearchSingleCondition* NewL( CSearchField* aTerm );
       
    43 	
       
    44     /**
       
    45      * two phase constructor - from a stream
       
    46      * 
       
    47      * @param aStream stream object
       
    48      * @return CSearchSingleCondition
       
    49      */
       
    50      IMPORT_C static CSearchSingleCondition* NewL( RReadStream& aStream );
       
    51      
       
    52      /**
       
    53      * Destructor
       
    54      */
       
    55      virtual ~CSearchSingleCondition();
       
    56 	
       
    57     /**
       
    58      * Externalizes the object.
       
    59      * @param aStream - stream to which to be externalized
       
    60      */
       
    61      IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
    62 	
       
    63     /**
       
    64      * Returns term
       
    65      * @return
       
    66      */
       
    67      IMPORT_C const CSearchField& Term() const;
       
    68 	
       
    69 	
       
    70 private:
       
    71 	
       
    72     /**
       
    73      * Constructor
       
    74      */
       
    75      CSearchSingleCondition( CSearchCondition::TConditionType type );
       
    76 	
       
    77     /**
       
    78      * Constructor
       
    79      *
       
    80      * @param aTerm -  a searchfield object
       
    81      */
       
    82      CSearchSingleCondition( CSearchField* aTerm );
       
    83 	
       
    84     /**
       
    85      * 2nd phase construction
       
    86      *
       
    87      * @param aStream - Stream object
       
    88      */
       
    89      void ConstructL( RReadStream& aStream );
       
    90 	
       
    91 private: //data members
       
    92 	
       
    93 	/**
       
    94 	 * CSearchField Term 
       
    95 	 * Own
       
    96 	 */
       
    97      CSearchField* iTerm;
       
    98     };
       
    99 
       
   100 #endif //C_SEARCHSINGLECONDITION_H
       
   101 
       
   102