|
1 /* |
|
2 * Copyright (c) 2005 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 * This class connects telephony server and requests information from it. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMMSPHONECLIENT_H |
|
22 #define CMMSPHONECLIENT_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <etelmm.h> // RMobilePhone |
|
26 |
|
27 // CONSTANTS |
|
28 // MACROS |
|
29 // DATA TYPES |
|
30 // FUNCTION PROTOTYPES |
|
31 // FORWARD DECLARATIONS |
|
32 // CLASS DECLARATION |
|
33 class RTelServer; |
|
34 class RMobilePhone; |
|
35 |
|
36 /** |
|
37 * Class for asking information from telephony server. |
|
38 * @lib mmsconninit.dll |
|
39 * @since 3.0 |
|
40 */ |
|
41 class CMmsPhoneClient : public CActive |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 IMPORT_C static CMmsPhoneClient* NewL(); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CMmsPhoneClient(); |
|
54 |
|
55 public: // New functions |
|
56 |
|
57 /** |
|
58 * Roaming determines whether phone is roaming currently or not |
|
59 * @param aStatus the iStatus of the caller. On completion, the caller |
|
60 * should interpret aStatus as follows: |
|
61 * < 0 indicates an error |
|
62 * == 0 indicates that phone is not roaming |
|
63 * > 0 indicates that phone is roaming |
|
64 */ |
|
65 IMPORT_C void Roaming( TRequestStatus& aStatus ); |
|
66 |
|
67 /** |
|
68 * NetworkMode determines in what kind of network the phone currently is. |
|
69 * @return TMmsNetworkMode |
|
70 */ |
|
71 IMPORT_C RMobilePhone::TMobilePhoneNetworkMode NetworkMode(); |
|
72 |
|
73 public: // Functions from base classes |
|
74 |
|
75 protected: // New functions |
|
76 |
|
77 protected: // Functions from base classes |
|
78 |
|
79 /** |
|
80 * Active object cancellation |
|
81 */ |
|
82 void DoCancel(); |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 * C++ default constructor. |
|
88 */ |
|
89 CMmsPhoneClient(); |
|
90 |
|
91 /** |
|
92 * By default Symbian OS constructor is private. |
|
93 */ |
|
94 void ConstructL(); |
|
95 |
|
96 /** |
|
97 * Completion |
|
98 */ |
|
99 void RunL(); |
|
100 |
|
101 private: // Data |
|
102 |
|
103 TRequestStatus* iClientStatus; |
|
104 |
|
105 RTelServer iTelServer; |
|
106 RMobilePhone iMobilePhone; |
|
107 RMobilePhone::TMobilePhoneRegistrationStatus iRegistrationStatus; |
|
108 TInt iRequestId; |
|
109 }; |
|
110 |
|
111 #endif // CMMSPHONECLIENT_H |
|
112 |
|
113 // End of File |