|
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: Connection to ETEL. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef PSETTELEPHONY_H |
|
21 #define PSETTELEPHONY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "nwdefs.h" |
|
26 |
|
27 // CONSTANTS |
|
28 const TInt KPsetMaxNameLength = 50; |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class RTelServer; |
|
32 class RMobilePhone; |
|
33 class RMobileLine; |
|
34 |
|
35 // CLASS DEFINITIONS |
|
36 /** |
|
37 * CPsetTelephony class is used to connect phone settings to ETEL. |
|
38 * @lib phonesettings.lib |
|
39 * @since 1.0 |
|
40 */ |
|
41 class CPsetTelephony : public CBase |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Symbian OS 2-phase constructor. |
|
48 * |
|
49 * @param aPhone Phone object. |
|
50 * @param aTsyName TSY module name. |
|
51 * @return Created CPsetTelephony object. |
|
52 */ |
|
53 /***************************************************** |
|
54 * Series 60 Customer / ETel |
|
55 * Series 60 ETel API |
|
56 *****************************************************/ |
|
57 static CPsetTelephony* NewL( RMobilePhone& aPhone, |
|
58 const TDesC* aTsyName = NULL ); |
|
59 |
|
60 /* Destructor */ |
|
61 ~CPsetTelephony(); |
|
62 |
|
63 public: // new functions |
|
64 |
|
65 /** |
|
66 * Checks that correct line for diverting is open. If not, lines |
|
67 * are gone through and when one with correct capabilities is found, |
|
68 * it is opened. |
|
69 * |
|
70 * @param aServiceGroup Service group for which line is checked. |
|
71 * @param aPhone Phone object. |
|
72 * @param aLine Line to check. |
|
73 */ |
|
74 /***************************************************** |
|
75 * Series 60 Customer / ETel |
|
76 * Series 60 ETel API |
|
77 *****************************************************/ |
|
78 static void CheckLineModeL( const TServiceGroup aServiceGroup, |
|
79 RMobilePhone* aPhone, RMobileLine* aLine ); |
|
80 |
|
81 private: // constructors |
|
82 |
|
83 //2nd phase constructor. |
|
84 void ConstructL( const TDesC* aTsyName ); |
|
85 |
|
86 //C++ constructor. |
|
87 /***************************************************** |
|
88 * Series 60 Customer / ETel |
|
89 * Series 60 ETel API |
|
90 *****************************************************/ |
|
91 CPsetTelephony ( RMobilePhone& aPhone ); |
|
92 |
|
93 private: // new |
|
94 |
|
95 //Makes a ETEL connection. |
|
96 TInt ConnectToEtelL( const TDesC* aTsyName ); |
|
97 |
|
98 //Sets caps. |
|
99 /***************************************************** |
|
100 * Series 60 Customer / ETel |
|
101 * Series 60 ETel API |
|
102 *****************************************************/ |
|
103 static TUint32 SetCapFlagsL( const TServiceGroup aServiceGroup, TBool& aMode, |
|
104 RLine::TCaps& aCaps ); |
|
105 |
|
106 private: //member data |
|
107 |
|
108 /***************************************************** |
|
109 * Series 60 Customer / ETel |
|
110 * Series 60 ETel API |
|
111 *****************************************************/ |
|
112 // ETEL server |
|
113 RTelServer* iTelServer; |
|
114 /***************************************************** |
|
115 * Series 60 Customer / ETel |
|
116 * Series 60 ETel API |
|
117 *****************************************************/ |
|
118 // TSY Phone |
|
119 RMobilePhone* iPhone; |
|
120 // Connection to ETEL has been made by this module. |
|
121 TBool iOwnConnection; |
|
122 // Name of the TSY module |
|
123 TBuf<KPsetMaxNameLength> iTsyName; |
|
124 }; |
|
125 #endif //PSETTELEPHONY_H |
|
126 // End of File |