camerauis/cameraxui/cxui/inc/cxuiapplicationframeworkmonitor.h
branchRCL_3
changeset 23 61bc0f252b2b
equal deleted inserted replaced
22:f54ad444594d 23:61bc0f252b2b
       
     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:
       
    15 *
       
    16 */
       
    17 #ifndef CXUIAPPLICATIONFRAMEWORKMONITOR_H
       
    18 #define CXUIAPPLICATIONFRAMEWORKMONITOR_H
       
    19 
       
    20 #include <QObject>
       
    21 
       
    22 class CxeSettings;
       
    23 class CxuiApplication;
       
    24 class CxuiApplicationFrameworkMonitorPrivate;
       
    25 
       
    26 /*!
       
    27 * Application Framework Monitor.
       
    28 */
       
    29 class CxuiApplicationFrameworkMonitor : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32     Q_ENUMS(ForegroundState)
       
    33 
       
    34 public:
       
    35     /*!
       
    36     * Foreground state enumeration.
       
    37     */
       
    38     enum ForegroundState
       
    39     {
       
    40         /*! Note or dialog partially owns foreground */
       
    41         ForegroundPartiallyLost,
       
    42         /*! Other application owns foreground */
       
    43         ForegroundFullyLost,
       
    44         /*! This application owns foreground */
       
    45         ForegroundOwned
       
    46     };
       
    47 
       
    48 public:
       
    49     CxuiApplicationFrameworkMonitor(CxuiApplication &application, CxeSettings &settings);
       
    50     virtual ~CxuiApplicationFrameworkMonitor();
       
    51 
       
    52 public:
       
    53     ForegroundState foregroundState() const;
       
    54     bool isUsbMassMemoryModeActive() const;
       
    55 
       
    56 signals:
       
    57     /*!
       
    58     * Signal that foreground state has changed.
       
    59     * @param t New foreground state.
       
    60     */
       
    61     void foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState t);
       
    62 
       
    63     /*!
       
    64     * Signal battery being empty. Device is ecpected to power down at any moment.
       
    65     */
       
    66     void batteryEmpty();
       
    67 
       
    68     /*!
       
    69     * USB mass memory mode was just activated or deactivated.
       
    70     * @param active If true, mass memory mode was activated, and mass memory cannot be accessed.
       
    71     * Otherwise mass memory mode was deactivated, and mass memory is again accessible.
       
    72     */
       
    73     void usbMassMemoryModeToggled(bool active);
       
    74 
       
    75 
       
    76 private:
       
    77     CxuiApplicationFrameworkMonitorPrivate *p;
       
    78 
       
    79     friend class CxuiApplicationFrameworkMonitorPrivate;
       
    80 };
       
    81 
       
    82 #endif // CXUIAPPLICATIONFRAMEWORKMONITOR_H