|
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 |
|
18 #ifndef CIMEIREADER_H |
|
19 #define CIMEIREADER_H |
|
20 |
|
21 #include <exception> |
|
22 #include <e32base.h> |
|
23 #include <Etel3rdParty.h> |
|
24 |
|
25 class CDeviceInfo : public CActive |
|
26 { |
|
27 public: |
|
28 enum States |
|
29 { |
|
30 EModel, |
|
31 EManufacturer, |
|
32 ESerialnumber, |
|
33 }; |
|
34 |
|
35 static CDeviceInfo* NewL(); |
|
36 static CDeviceInfo* NewLC(); |
|
37 ~CDeviceInfo(); |
|
38 |
|
39 TBuf<CTelephony::KPhoneSerialNumberSize> imei(); |
|
40 TBuf<CTelephony::KPhoneModelIdSize> model(); |
|
41 TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer(); |
|
42 TBuf<CTelephony::KIMSISize> imsi(); |
|
43 TUint batteryLevel(); |
|
44 TInt32 signalStrength(); |
|
45 |
|
46 protected: |
|
47 void DoCancel(); |
|
48 void RunL(); |
|
49 |
|
50 private: |
|
51 CDeviceInfo(); |
|
52 void ConstructL(); |
|
53 |
|
54 private: |
|
55 CTelephony* iTelephony; |
|
56 |
|
57 CTelephony::TBatteryInfoV1Pckg iBatteryInfoV1Pkg; |
|
58 CTelephony::TBatteryInfoV1 iBatteryInfoV1; |
|
59 |
|
60 CTelephony::TPhoneIdV1 iPhoneIdV1; |
|
61 CTelephony::TPhoneIdV1Pckg iPhoneIdV1Pkg; |
|
62 |
|
63 CTelephony::TSignalStrengthV1Pckg iSignalStrengthV1Pckg; |
|
64 CTelephony::TSignalStrengthV1 iSignalStrengthV1; |
|
65 |
|
66 CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; |
|
67 CTelephony::TSubscriberIdV1 iSubscriberIdV1; |
|
68 |
|
69 CActiveSchedulerWait *iWait; |
|
70 |
|
71 bool phoneIdFetched; |
|
72 }; |
|
73 |
|
74 #endif /* CIMEIREADER_H */ |