|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Client side access to emergency number information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef RPHCLTEMERGENCYNUMBER_H |
|
21 #define RPHCLTEMERGENCYNUMBER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "PhCltTypes.h" |
|
25 #include "RPhCltServer.h" |
|
26 #include <e32std.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 /** |
|
31 * Emergency number query mode |
|
32 */ |
|
33 enum TPhCltEmergencyNumberQueryMode |
|
34 { |
|
35 EPhCltEmergencyNumberQueryModeNormal = 0, // Normal mode |
|
36 EPhCltEmergencyNumberQueryModeAdvanced // advanced mode |
|
37 }; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Client side access to emergency number information |
|
43 * |
|
44 * @lib phoneclient.lib |
|
45 * @since Series60_1.0 |
|
46 */ |
|
47 class RPhCltEmergencyNumber : public RSubSessionBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * C++ default constructor. |
|
53 */ |
|
54 IMPORT_C RPhCltEmergencyNumber(); |
|
55 |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Opens the subsession. |
|
61 * |
|
62 * @param aServer It is the session of which subsession this is. |
|
63 * @return Returns error code. |
|
64 */ |
|
65 IMPORT_C TInt Open( RPhCltServer& aServer ); |
|
66 |
|
67 /** |
|
68 * Closes the subsession. |
|
69 */ |
|
70 IMPORT_C void Close(); |
|
71 |
|
72 |
|
73 public: // Emergency number API |
|
74 |
|
75 /** |
|
76 * Returns information whether the number specified would initiate |
|
77 * an emergency call. |
|
78 * |
|
79 * @param aNumber Number to be queried. |
|
80 * @param aIsEmergencyNumber If ETrue, then the aNumber parameter |
|
81 * was emergency number. |
|
82 * @param aMode Emergency number query mode, default: normal. |
|
83 * @return Returns error code of the success of the operation. |
|
84 */ |
|
85 IMPORT_C TInt IsEmergenyPhoneNumber( |
|
86 const TPhCltTelephoneNumber& aNumber, |
|
87 TBool& aIsEmergencyNumber, |
|
88 TPhCltEmergencyNumberQueryMode aMode = |
|
89 EPhCltEmergencyNumberQueryModeNormal ); |
|
90 |
|
91 /** |
|
92 * Returns information whether the number specified would initiate |
|
93 * an emergency call. |
|
94 * |
|
95 * @param aNumber Number to be queried, matched emergency number is |
|
96 * returned if a correct emergency number is found at |
|
97 * the last of the number. |
|
98 * @param aIsEmergencyNumber If ETrue, then the aNumber parameter |
|
99 * was emergency number. |
|
100 * @param aMode Emergency number query mode, default: normal. |
|
101 * @return Returns error code of the success of the operation. |
|
102 */ |
|
103 IMPORT_C TInt IsEmergencyPhoneNumber( |
|
104 TPhCltTelephoneNumber& aNumber, |
|
105 TBool& aIsEmergencyNumber, |
|
106 TPhCltEmergencyNumberQueryMode aMode = |
|
107 EPhCltEmergencyNumberQueryModeNormal ); |
|
108 |
|
109 |
|
110 |
|
111 private: |
|
112 |
|
113 // Internal cleanup support |
|
114 static void CleanupEmergencyList( TAny* aList ); |
|
115 |
|
116 }; |
|
117 |
|
118 #endif // RPHCLTEMERGENCYNUMBER_H |
|
119 |
|
120 // End of File |