searchui/searchapplication/inc/searchapplication.h
author hgs
Mon, 06 Sep 2010 09:21:19 +0530
changeset 21 708468d5143e
parent 10 d05738f02936
child 27 7a8855317cbd
permissions -rw-r--r--
201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
d05738f02936 201025_03
hgs
parents:
diff changeset
     1
/*
d05738f02936 201025_03
hgs
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d05738f02936 201025_03
hgs
parents:
diff changeset
     3
 * All rights reserved.
d05738f02936 201025_03
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
d05738f02936 201025_03
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
d05738f02936 201025_03
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
d05738f02936 201025_03
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
d05738f02936 201025_03
hgs
parents:
diff changeset
     8
 *
d05738f02936 201025_03
hgs
parents:
diff changeset
     9
 * Initial Contributors:
d05738f02936 201025_03
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
d05738f02936 201025_03
hgs
parents:
diff changeset
    11
 *
d05738f02936 201025_03
hgs
parents:
diff changeset
    12
 * Contributors:
d05738f02936 201025_03
hgs
parents:
diff changeset
    13
 *
d05738f02936 201025_03
hgs
parents:
diff changeset
    14
 * Description:  search application main class.
d05738f02936 201025_03
hgs
parents:
diff changeset
    15
 *
d05738f02936 201025_03
hgs
parents:
diff changeset
    16
 */
d05738f02936 201025_03
hgs
parents:
diff changeset
    17
d05738f02936 201025_03
hgs
parents:
diff changeset
    18
#ifndef SEARCHAPPLICATION_H
d05738f02936 201025_03
hgs
parents:
diff changeset
    19
#define SEARCHAPPLICATION_H
d05738f02936 201025_03
hgs
parents:
diff changeset
    20
d05738f02936 201025_03
hgs
parents:
diff changeset
    21
#include "search_global.h"
d05738f02936 201025_03
hgs
parents:
diff changeset
    22
d05738f02936 201025_03
hgs
parents:
diff changeset
    23
#include <qobject.h>
21
hgs
parents: 10
diff changeset
    24
#include <hbapplication.h>
10
d05738f02936 201025_03
hgs
parents:
diff changeset
    25
d05738f02936 201025_03
hgs
parents:
diff changeset
    26
class QStateMachine;
d05738f02936 201025_03
hgs
parents:
diff changeset
    27
d05738f02936 201025_03
hgs
parents:
diff changeset
    28
/**
d05738f02936 201025_03
hgs
parents:
diff changeset
    29
 * @ingroup group_searchsearchlication
d05738f02936 201025_03
hgs
parents:
diff changeset
    30
 * @brief Search application main class.
d05738f02936 201025_03
hgs
parents:
diff changeset
    31
 * 
d05738f02936 201025_03
hgs
parents:
diff changeset
    32
 * Loads a runtime from a runtime provider plugin. Manages 
d05738f02936 201025_03
hgs
parents:
diff changeset
    33
 * the runtime execution.
d05738f02936 201025_03
hgs
parents:
diff changeset
    34
 *
d05738f02936 201025_03
hgs
parents:
diff changeset
    35
 * @lib ?library
d05738f02936 201025_03
hgs
parents:
diff changeset
    36
 * @since S60 ?S60_version
d05738f02936 201025_03
hgs
parents:
diff changeset
    37
 */
21
hgs
parents: 10
diff changeset
    38
class SearchApplication : public HbApplication
10
d05738f02936 201025_03
hgs
parents:
diff changeset
    39
    {
d05738f02936 201025_03
hgs
parents:
diff changeset
    40
Q_OBJECT
d05738f02936 201025_03
hgs
parents:
diff changeset
    41
d05738f02936 201025_03
hgs
parents:
diff changeset
    42
public:
d05738f02936 201025_03
hgs
parents:
diff changeset
    43
d05738f02936 201025_03
hgs
parents:
diff changeset
    44
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    45
     * Constructor.
d05738f02936 201025_03
hgs
parents:
diff changeset
    46
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    47
     * @param aParent Parent object.
d05738f02936 201025_03
hgs
parents:
diff changeset
    48
     */
21
hgs
parents: 10
diff changeset
    49
    SearchApplication(int argc, char *argv[]);
10
d05738f02936 201025_03
hgs
parents:
diff changeset
    50
d05738f02936 201025_03
hgs
parents:
diff changeset
    51
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    52
     * Destructor.
d05738f02936 201025_03
hgs
parents:
diff changeset
    53
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    54
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    55
    virtual ~SearchApplication();
d05738f02936 201025_03
hgs
parents:
diff changeset
    56
d05738f02936 201025_03
hgs
parents:
diff changeset
    57
private:
d05738f02936 201025_03
hgs
parents:
diff changeset
    58
d05738f02936 201025_03
hgs
parents:
diff changeset
    59
    Q_DISABLE_COPY(SearchApplication)
d05738f02936 201025_03
hgs
parents:
diff changeset
    60
d05738f02936 201025_03
hgs
parents:
diff changeset
    61
signals:
d05738f02936 201025_03
hgs
parents:
diff changeset
    62
d05738f02936 201025_03
hgs
parents:
diff changeset
    63
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    64
     * Emitted when the search application needs to exit.
d05738f02936 201025_03
hgs
parents:
diff changeset
    65
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    66
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    67
    void exit();
21
hgs
parents: 10
diff changeset
    68
    
hgs
parents: 10
diff changeset
    69
    void applicationReady();
10
d05738f02936 201025_03
hgs
parents:
diff changeset
    70
d05738f02936 201025_03
hgs
parents:
diff changeset
    71
public slots:
d05738f02936 201025_03
hgs
parents:
diff changeset
    72
d05738f02936 201025_03
hgs
parents:
diff changeset
    73
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    74
     * Starts the runtime.
d05738f02936 201025_03
hgs
parents:
diff changeset
    75
     * @since S60 ?S60_version. 
d05738f02936 201025_03
hgs
parents:
diff changeset
    76
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    77
    void start();
d05738f02936 201025_03
hgs
parents:
diff changeset
    78
d05738f02936 201025_03
hgs
parents:
diff changeset
    79
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    80
     * Stops the runtime.
d05738f02936 201025_03
hgs
parents:
diff changeset
    81
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    82
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    83
    void stop();
d05738f02936 201025_03
hgs
parents:
diff changeset
    84
d05738f02936 201025_03
hgs
parents:
diff changeset
    85
private slots:
d05738f02936 201025_03
hgs
parents:
diff changeset
    86
d05738f02936 201025_03
hgs
parents:
diff changeset
    87
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    88
     * Called after the runtime has started.
d05738f02936 201025_03
hgs
parents:
diff changeset
    89
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    90
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    91
    void handleRuntimeStarted();
d05738f02936 201025_03
hgs
parents:
diff changeset
    92
d05738f02936 201025_03
hgs
parents:
diff changeset
    93
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
    94
     * Called after the runtime has stopped.
d05738f02936 201025_03
hgs
parents:
diff changeset
    95
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
    96
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
    97
    void handleRuntimeStopped();
d05738f02936 201025_03
hgs
parents:
diff changeset
    98
d05738f02936 201025_03
hgs
parents:
diff changeset
    99
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
   100
     * Called after the runtime has faulted.
d05738f02936 201025_03
hgs
parents:
diff changeset
   101
     * @since S60 ?S60_version.     
d05738f02936 201025_03
hgs
parents:
diff changeset
   102
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
   103
    void handleRuntimeFaulted();
21
hgs
parents: 10
diff changeset
   104
    
hgs
parents: 10
diff changeset
   105
    void sentMattiEventSlot();
10
d05738f02936 201025_03
hgs
parents:
diff changeset
   106
d05738f02936 201025_03
hgs
parents:
diff changeset
   107
private:
d05738f02936 201025_03
hgs
parents:
diff changeset
   108
d05738f02936 201025_03
hgs
parents:
diff changeset
   109
    /**
d05738f02936 201025_03
hgs
parents:
diff changeset
   110
     * Runtime.
d05738f02936 201025_03
hgs
parents:
diff changeset
   111
     */
d05738f02936 201025_03
hgs
parents:
diff changeset
   112
    QStateMachine* mRuntime;
d05738f02936 201025_03
hgs
parents:
diff changeset
   113
    };
d05738f02936 201025_03
hgs
parents:
diff changeset
   114
d05738f02936 201025_03
hgs
parents:
diff changeset
   115
#endif//SEARCHAPPLICATION_H