|
1 /* |
|
2 * Copyright (c) 2002 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: Phone interface class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32base.h> |
|
22 #include <mmtsy_names.h> |
|
23 #include "CWPPhoneEmul.h" |
|
24 #include "WPEngineDebug.h" |
|
25 |
|
26 // CONSTANTS |
|
27 /// The emulated IMSI number |
|
28 _LIT( KIMSI, "0" ); |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CWPPhoneEmul::CWPPhoneEmul |
|
34 // C++ default constructor can NOT contain any code, that |
|
35 // might leave. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CWPPhoneEmul::CWPPhoneEmul() |
|
39 : iIMSI( KIMSI ), iCountry( KNullDesC ), iNetwork( KNullDesC ) |
|
40 { |
|
41 // Country and network retrieval is never done, so it's not emulated |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CWPPhone::ConstructL |
|
46 // Symbian 2nd phase constructor can leave. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 void CWPPhoneEmul::ConstructL() |
|
50 { |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CWPPhone::NewL |
|
55 // Two-phased constructor. |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CWPPhoneEmul* CWPPhoneEmul::NewL() |
|
59 { |
|
60 DEBUG( "CWPPhoneEmul::NewL()" ); |
|
61 CWPPhoneEmul* self = NewLC(); |
|
62 CleanupStack::Pop(); |
|
63 return self; |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // CWPPhone::NewLC |
|
68 // Two-phased constructor. |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 CWPPhoneEmul* CWPPhoneEmul::NewLC() |
|
72 { |
|
73 DEBUG( "CWPPhoneEmul::NewLC()" ); |
|
74 CWPPhoneEmul* self = new(ELeave) CWPPhoneEmul; |
|
75 CleanupStack::PushL(self); |
|
76 self->ConstructL(); |
|
77 return self; |
|
78 } |
|
79 |
|
80 // Destructor |
|
81 CWPPhoneEmul::~CWPPhoneEmul() |
|
82 { |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CWPPhoneEmul::SubscriberId |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 const RMobilePhone::TMobilePhoneSubscriberId& CWPPhoneEmul::SubscriberId() const |
|
90 { |
|
91 return iIMSI; |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // CWPPhone::SubscriberId |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 const RMobilePhone::TMobilePhoneNetworkCountryCode& CWPPhoneEmul::Country() const |
|
99 { |
|
100 return iCountry; |
|
101 } |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // CWPPhone::SubscriberId |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 const RMobilePhone::TMobilePhoneNetworkIdentity& CWPPhoneEmul::Network() const |
|
108 { |
|
109 return iNetwork; |
|
110 } |
|
111 |
|
112 // End of File |