hswidgetplugin/fmradiohswidgetplugin/inc/fmradiohswidgetprocesshandler.h
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 26 6bcf277166c1
parent 33 11b6825f0862
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
     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: FM Radio widget process handler
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef FMRADIOHSWIDGETPROCESSHANDLER_H_
       
    19 #define FMRADIOHSWIDGETPROCESSHANDLER_H_
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <QProcess>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 #include <QVariant>
       
    29 
       
    30 // Constants
       
    31 /**  FM Radio application executable. */
       
    32 const QString KRadioExecutablePath = "/sys/bin/qtfmradio.exe"; // TODO: Remove the hard coded path and use some util to determine the path instead.
       
    33 /**  Arguments for FM Radio application executable. */
       
    34 const QString KRadioExecutableArguments = "";
       
    35 
       
    36 class FmRadioHsWidgetProcessHandler : public QObject
       
    37 {
       
    38 Q_OBJECT
       
    39 
       
    40 public:
       
    41     FmRadioHsWidgetProcessHandler(QObject *parent = 0);
       
    42     ~FmRadioHsWidgetProcessHandler();
       
    43 
       
    44 public:
       
    45     void startFmRadioApplication();
       
    46 
       
    47 signals:
       
    48     void fmRadioApplicationStateChanged(QVariant state);
       
    49 
       
    50 public slots:
       
    51     void handleStateChange(QProcess::ProcessState state);
       
    52     void handleError(QProcess::ProcessError error);
       
    53     void handleFinish(int exitCode, QProcess::ExitStatus exitStatus);
       
    54 
       
    55 private:
       
    56     QProcess* mProcess;
       
    57         
       
    58 };
       
    59 
       
    60 #endif /* FMRADIOHSWIDGETPROCESSHANDLER_H_ */