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 <QTimer> |
|
23 #include "cxuiapplicationframeworkmonitor.h" |
|
24 |
|
25 |
|
26 class CxeSettings; |
|
27 class CxuiApplication; |
|
28 #ifdef Q_OS_SYMBIAN |
|
29 class RWsSession; |
|
30 class RWindowGroup; |
|
31 class QString; |
|
32 class QSymbianEvent; |
|
33 class CxuiEventLog; |
|
34 #endif // Q_OS_SYMBIAN |
|
35 |
|
36 |
|
37 class CxuiApplicationFrameworkMonitorPrivate : public QObject |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 private: |
|
42 CxuiApplicationFrameworkMonitorPrivate(CxuiApplicationFrameworkMonitor *parent, |
|
43 CxuiApplication &application, |
|
44 CxeSettings &settings); |
|
45 virtual ~CxuiApplicationFrameworkMonitorPrivate(); |
|
46 |
|
47 CxuiApplicationFrameworkMonitor::ForegroundState foregroundState() const; |
|
48 bool isUsbMassMemoryModeActive() const; |
|
49 |
|
50 #ifdef Q_OS_SYMBIAN |
|
51 private slots: |
|
52 void handleEvent(const QSymbianEvent *event); |
|
53 void handlePropertyEvent(long int uid, unsigned long int key, QVariant value); |
|
54 void usbModeCheckTimerCallback(); |
|
55 private: |
|
56 void init(); |
|
57 void handleWindowServerEvent(const QSymbianEvent *event); |
|
58 void handleUsbPropertyEvent(unsigned long int key, QVariant value); |
|
59 void setState(CxuiApplicationFrameworkMonitor::ForegroundState state); |
|
60 CxuiApplicationFrameworkMonitor::ForegroundState getCurrentState(); |
|
61 unsigned int focusedApplicationUid(); |
|
62 #endif // Q_OS_SYMBIAN |
|
63 |
|
64 private: |
|
65 CxuiApplicationFrameworkMonitor *q; |
|
66 CxuiApplication &mApplication; |
|
67 CxeSettings &mSettings; |
|
68 #ifdef Q_OS_SYMBIAN |
|
69 RWsSession &mWsSession; |
|
70 RWindowGroup &mWindowGroup; |
|
71 int mWindowGroupId; |
|
72 QString mWindowGroupName; |
|
73 |
|
74 int mKeyLockState; |
|
75 int mBatteryStatus; |
|
76 int mUsbPersonality; |
|
77 QTimer mUsbModeCheckTimer; |
|
78 CxuiEventLog *mEventLog; |
|
79 #endif // Q_OS_SYMBIAN |
|
80 |
|
81 CxuiApplicationFrameworkMonitor::ForegroundState mState; |
|
82 |
|
83 friend class CxuiApplicationFrameworkMonitor; |
|
84 }; |
|
85 |
|
86 #endif // CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H |
|