searchui/searchapplication/inc/search.h
changeset 9 4a2987baf8f7
parent 2 208a4ba3894c
equal deleted inserted replaced
8:2f67eb14d003 9:4a2987baf8f7
       
     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:  search application main class.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef SEARCHAPPLICATION_H
       
    19 #define SEARCHAPPLICATION_H
       
    20 
       
    21 #include "search_global.h"
       
    22 
       
    23 #include <qobject.h>
       
    24 
       
    25 class QStateMachine;
       
    26 
       
    27 /**
       
    28  * @ingroup group_searchsearchlication
       
    29  * @brief Search application main class.
       
    30  * 
       
    31  * Loads a runtime from a runtime provider plugin. Manages 
       
    32  * the runtime execution.
       
    33  *
       
    34  * @lib ?library
       
    35  * @since S60 ?S60_version
       
    36  */
       
    37 class Search : public QObject
       
    38     {
       
    39 Q_OBJECT
       
    40 
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Constructor.
       
    45      * @since S60 ?S60_version.     
       
    46      * @param aParent Parent object.
       
    47      */
       
    48     Search(QObject* aParent = 0);
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      * @since S60 ?S60_version.     
       
    53      */
       
    54     virtual ~Search();
       
    55 
       
    56 private:   
       
    57     
       
    58     Q_DISABLE_COPY(Search)
       
    59 
       
    60 signals:
       
    61 
       
    62     /**
       
    63      * Emitted when the search application needs to exit.
       
    64      * @since S60 ?S60_version.     
       
    65      */
       
    66     void exit();
       
    67 
       
    68 public slots:
       
    69 
       
    70     /**
       
    71      * Starts the runtime.
       
    72      * @since S60 ?S60_version. 
       
    73      */
       
    74     void start();
       
    75 
       
    76     /**
       
    77      * Stops the runtime.
       
    78      * @since S60 ?S60_version.     
       
    79      */
       
    80     void stop();
       
    81 
       
    82 private slots:
       
    83 
       
    84     /**
       
    85      * Called after the runtime has started.
       
    86      * @since S60 ?S60_version.     
       
    87      */
       
    88     void handleRuntimeStarted();
       
    89 
       
    90     /**
       
    91      * Called after the runtime has stopped.
       
    92      * @since S60 ?S60_version.     
       
    93      */
       
    94     void handleRuntimeStopped();
       
    95 
       
    96     /**
       
    97      * Called after the runtime has faulted.
       
    98      * @since S60 ?S60_version.     
       
    99      */
       
   100     void handleRuntimeFaulted();
       
   101 
       
   102 private:
       
   103 
       
   104     /**
       
   105      * Runtime.
       
   106      */
       
   107     QStateMachine* mRuntime;
       
   108     };
       
   109 
       
   110 #endif//SEARCHAPPLICATION_H