|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef CIMEIREADER_H |
|
23 #define CIMEIREADER_H |
|
24 |
|
25 #include <exception> |
|
26 #include <e32base.h> |
|
27 #include <etel3rdparty.h> |
|
28 |
|
29 class CDeviceInfo : public CActive |
|
30 { |
|
31 public: |
|
32 enum States |
|
33 { |
|
34 EModel, |
|
35 EManufacturer, |
|
36 ESerialnumber, |
|
37 }; |
|
38 |
|
39 static CDeviceInfo* NewL(); |
|
40 static CDeviceInfo* NewLC(); |
|
41 ~CDeviceInfo(); |
|
42 |
|
43 TBuf<CTelephony::KPhoneSerialNumberSize> imei(); |
|
44 TBuf<CTelephony::KPhoneModelIdSize> model(); |
|
45 TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer(); |
|
46 TBuf<CTelephony::KIMSISize> imsi(); |
|
47 TUint batteryLevel(); |
|
48 TInt32 signalStrength(); |
|
49 |
|
50 protected: |
|
51 void DoCancel(); |
|
52 void RunL(); |
|
53 |
|
54 private: |
|
55 CDeviceInfo(); |
|
56 void ConstructL(); |
|
57 |
|
58 private: |
|
59 CTelephony* iTelephony; |
|
60 |
|
61 CTelephony::TBatteryInfoV1Pckg iBatteryInfoV1Pkg; |
|
62 CTelephony::TBatteryInfoV1 iBatteryInfoV1; |
|
63 |
|
64 CTelephony::TPhoneIdV1 iPhoneIdV1; |
|
65 CTelephony::TPhoneIdV1Pckg iPhoneIdV1Pkg; |
|
66 |
|
67 CTelephony::TSignalStrengthV1Pckg iSignalStrengthV1Pckg; |
|
68 CTelephony::TSignalStrengthV1 iSignalStrengthV1; |
|
69 |
|
70 CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; |
|
71 CTelephony::TSubscriberIdV1 iSubscriberIdV1; |
|
72 |
|
73 CActiveSchedulerWait *iWait; |
|
74 |
|
75 bool phoneIdFetched; |
|
76 }; |
|
77 |
|
78 #endif /* CIMEIREADER_H */ |