|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set ts=8 et sw=2 tw=80: */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #include <stdlib.h> |
|
8 #include <QObject> |
|
9 #ifdef MOZ_ENABLE_QMSYSTEM2 |
|
10 #include "qmdevicemode.h" |
|
11 #include "qmdisplaystate.h" |
|
12 #include "qmactivity.h" |
|
13 #endif |
|
14 #include "nsNativeAppSupportBase.h" |
|
15 #include "nsString.h" |
|
16 |
|
17 class nsNativeAppSupportQt : public QObject, public nsNativeAppSupportBase |
|
18 { |
|
19 Q_OBJECT |
|
20 public: |
|
21 NS_IMETHOD Start(bool* aRetVal); |
|
22 NS_IMETHOD Stop(bool* aResult); |
|
23 |
|
24 #ifdef MOZ_ENABLE_QMSYSTEM2 |
|
25 public Q_SLOTS: |
|
26 void activityChanged(MeeGo::QmActivity::Activity activity); |
|
27 void deviceModeChanged(MeeGo::QmDeviceMode::DeviceMode mode); |
|
28 void displayStateChanged(MeeGo::QmDisplayState::DisplayState state); |
|
29 void RefreshStates(); |
|
30 |
|
31 private: |
|
32 MeeGo::QmDeviceMode mDeviceMode; |
|
33 MeeGo::QmDisplayState mDisplayState; |
|
34 MeeGo::QmActivity mActivity; |
|
35 #endif |
|
36 }; |
|
37 |