|
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: Mock implementation for system info for testing |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef QSYSTEMINFO_H |
|
22 #define QSYSTEMINFO_H |
|
23 |
|
24 #include <QObject> |
|
25 #include <QSize> |
|
26 #include <QPair> |
|
27 #include <QString> |
|
28 #include <QStringList> |
|
29 |
|
30 class QSystemNetworkInfo : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 Q_ENUMS(NetworkStatus) |
|
34 Q_ENUMS(NetworkMode) |
|
35 |
|
36 |
|
37 public: |
|
38 |
|
39 QSystemNetworkInfo(QObject *parent = 0); |
|
40 ~QSystemNetworkInfo(); |
|
41 |
|
42 enum NetworkStatus { |
|
43 UndefinedStatus = 0, |
|
44 NoNetworkAvailable, |
|
45 EmergencyOnly, |
|
46 Searching, |
|
47 Busy, |
|
48 Connected, |
|
49 HomeNetwork, |
|
50 Denied, |
|
51 Roaming |
|
52 }; |
|
53 |
|
54 enum NetworkMode { |
|
55 UnknownMode=0, |
|
56 GsmMode, |
|
57 CdmaMode, |
|
58 WcdmaMode, |
|
59 WlanMode, |
|
60 EthernetMode, |
|
61 BluetoothMode, |
|
62 WimaxMode |
|
63 }; |
|
64 Q_DECLARE_FLAGS(NetworkModes, NetworkMode) |
|
65 |
|
66 QSystemNetworkInfo::NetworkStatus networkStatus(QSystemNetworkInfo::NetworkMode mode); |
|
67 static int networkSignalStrength(QSystemNetworkInfo::NetworkMode mode); |
|
68 static QString networkName(QSystemNetworkInfo::NetworkMode mode); |
|
69 |
|
70 signals: |
|
71 void networkStatusChanged(QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus); |
|
72 void networkNameChanged(QSystemNetworkInfo::NetworkMode,const QString &); |
|
73 void networkModeChanged(QSystemNetworkInfo::NetworkMode); |
|
74 private: |
|
75 }; |
|
76 |
|
77 |
|
78 class QSystemDeviceInfo : public QObject |
|
79 { |
|
80 Q_OBJECT |
|
81 Q_PROPERTY(Profile currentProfile READ currentProfile) |
|
82 Q_PROPERTY(SimStatus simStatus READ simStatus) |
|
83 |
|
84 Q_ENUMS(SimStatus) |
|
85 Q_ENUMS(Profile) |
|
86 |
|
87 public: |
|
88 |
|
89 QSystemDeviceInfo(QObject *parent = 0); |
|
90 virtual ~QSystemDeviceInfo(); |
|
91 |
|
92 enum Profile { |
|
93 UnknownProfile = 0, |
|
94 SilentProfile, |
|
95 NormalProfile, |
|
96 LoudProfile, |
|
97 VibProfile, |
|
98 OfflineProfile, |
|
99 PowersaveProfile, |
|
100 CustomProfile |
|
101 }; |
|
102 |
|
103 enum SimStatus { |
|
104 SimNotAvailable = 0, |
|
105 SingleSimAvailable, |
|
106 DualSimAvailable, |
|
107 SimLocked |
|
108 }; |
|
109 |
|
110 QSystemDeviceInfo::SimStatus simStatus(); |
|
111 QSystemDeviceInfo::Profile currentProfile(); |
|
112 |
|
113 signals: |
|
114 void currentProfileChanged(QSystemDeviceInfo::Profile); |
|
115 |
|
116 private: |
|
117 }; |
|
118 |
|
119 |
|
120 #endif /*QSYSTEMSINFO_H*/ |
|
121 |
|
122 // End of file |
|
123 |