searchui/stateproviders/searchstateprovider/inc/searchstateprovider.h
changeset 0 ccd0fd43f247
child 2 208a4ba3894c
equal deleted inserted replaced
-1:000000000000 0:ccd0fd43f247
       
     1 /*
       
     2  * Copyright (c) 2009 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:  Declaration of the Search state provider
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef SEARCH_STATEPROVIDERS_STATEPROVIDER_H
       
    19 #define SEARCH_STATEPROVIDERS_STATEPROVIDER_H
       
    20 
       
    21 #include "Search_global.h"
       
    22 
       
    23 #include "hsistateprovider.h"
       
    24 
       
    25 class SearchStateProviderTest;
       
    26 
       
    27 class QState;
       
    28 
       
    29 /**
       
    30  * @ingroup group_Searchstateprovider
       
    31  * @brief Provides a default implementation for each Search state.
       
    32  *
       
    33  * This provider includes a default implementation for each Search state
       
    34  * States are described in the Searchstateprovider.manifest file.
       
    35  *
       
    36  * @lib Searchstateprovider
       
    37  * @since S60 ?S60_version.
       
    38  */
       
    39 class SearchStateProvider : public QObject, public IHsStateProvider
       
    40     {
       
    41 
       
    42 Q_OBJECT
       
    43 Q_INTERFACES(IHsStateProvider)
       
    44 
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Default constructor.
       
    49      *
       
    50      * @since S60 ?S60_version.
       
    51      */
       
    52     SearchStateProvider();
       
    53 
       
    54     /**
       
    55      * Destructor.
       
    56      *
       
    57      * @since S60 ?S60_version.
       
    58      */
       
    59     virtual ~SearchStateProvider();
       
    60 
       
    61 public:
       
    62 
       
    63     /**
       
    64      * Returns contained states as a list of tokens.
       
    65      *
       
    66      * @return Contained states as a list of tokens.
       
    67      * @since S60 ?S60_version.
       
    68      */
       
    69     QList<HsStateToken> states();
       
    70 
       
    71     /**
       
    72      * Creates a state based on the given token.
       
    73      *
       
    74      * @param aToken Identifies the state to be created.
       
    75      * @since S60 ?S60_version.
       
    76      */
       
    77     QState* createState(const HsStateToken& aToken);
       
    78 
       
    79 private:
       
    80 
       
    81     /**
       
    82      * Token that describes the wizard menu state.
       
    83      */
       
    84     HsStateToken mInitStateToken;
       
    85 
       
    86     HsStateToken mWizardMenuStateToken;
       
    87 
       
    88     HsStateToken mWizardActivatedStateToken;
       
    89 
       
    90     friend class SearchStateProviderTest;
       
    91     };
       
    92 
       
    93 #endif //SEARCH_STATEPROVIDERS_STATEPROVIDER_H