camerauis/cameraxui/cxui/inc/cxuiapplicationframeworkmonitorprivate.h
changeset 28 3075d9b614e6
child 36 b12f3922a74f
child 43 0e652f8f1fbd
equal deleted inserted replaced
19:d9aefe59d544 28:3075d9b614e6
       
     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 CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H
       
    18 #define CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H
       
    19 
       
    20 #include <QObject>
       
    21 #include <QVariant>
       
    22 #include "cxuiapplicationframeworkmonitor.h"
       
    23 
       
    24 class CxeSettings;
       
    25 class CxuiApplication;
       
    26 #ifdef Q_OS_SYMBIAN
       
    27 class RWsSession;
       
    28 class RWindowGroup;
       
    29 class QString;
       
    30 class QSymbianEvent;
       
    31 #endif // Q_OS_SYMBIAN
       
    32 
       
    33 
       
    34 class CxuiApplicationFrameworkMonitorPrivate : public QObject
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39     CxuiApplicationFrameworkMonitorPrivate(CxuiApplication &application, CxeSettings& settings);
       
    40     virtual ~CxuiApplicationFrameworkMonitorPrivate();
       
    41 
       
    42 public:
       
    43     CxuiApplicationFrameworkMonitor::ForegroundState foregroundState() const;
       
    44 
       
    45 signals:
       
    46     void foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState t);
       
    47     void batteryEmpty();
       
    48 
       
    49 #ifdef Q_OS_SYMBIAN
       
    50 private slots:
       
    51     void handleEvent(const QSymbianEvent *event);
       
    52     void handlePropertyEvent(long int uid, unsigned long int key, QVariant value);
       
    53 
       
    54 private:
       
    55     void init();
       
    56     bool handleWindowServerEvent(const QSymbianEvent *event);
       
    57     void setState(CxuiApplicationFrameworkMonitor::ForegroundState state);
       
    58     CxuiApplicationFrameworkMonitor::ForegroundState getCurrentState();
       
    59     unsigned int focusedApplicationUid();
       
    60 #endif // Q_OS_SYMBIAN
       
    61 
       
    62 
       
    63 private:
       
    64     CxuiApplication &mApplication;
       
    65     CxeSettings& mSettings;
       
    66 #ifdef Q_OS_SYMBIAN
       
    67     RWsSession &mWsSession;
       
    68     RWindowGroup &mWindowGroup;
       
    69     int mWindowGroupId;
       
    70     QString mWindowGroupName;
       
    71     int mKeyLockState;
       
    72     int mBatteryStatus;
       
    73 #endif // Q_OS_SYMBIAN
       
    74     CxuiApplicationFrameworkMonitor::ForegroundState mState;
       
    75 };
       
    76 
       
    77 #endif // CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H