1 /* |
|
2 * Copyright (c) 2002-2007 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 |
|
19 #ifndef C_CSCPVOIPHANDLER_H |
|
20 #define C_CSCPVOIPHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "scpservicehandlerbase.h" |
|
25 #include "scppropertyobserver.h" |
|
26 |
|
27 class CScpProfileHandler; |
|
28 class CRepository; |
|
29 class CScpPropertyNotifier; |
|
30 class CSipClientResolverUtils; |
|
31 |
|
32 /** |
|
33 * Voip sub service handler. |
|
34 * |
|
35 * @lib sipconnectionprovider.dll |
|
36 * @since Series 60 3.2 |
|
37 */ |
|
38 class CScpVoipHandler : public CScpServiceHandlerBase, |
|
39 public MScpPropertyObserver |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 static CScpVoipHandler* NewL( CScpSubService& aSubService ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CScpVoipHandler(); |
|
49 |
|
50 public: // From base class |
|
51 /** |
|
52 * Reports about changed property |
|
53 * @param aPropertyValue Value of the property |
|
54 */ |
|
55 void HandlePropertyChanged( TInt aPropertyValue ); |
|
56 |
|
57 private: // From base class |
|
58 |
|
59 /** |
|
60 * Enables service. |
|
61 */ |
|
62 void EnableSubServiceL(); |
|
63 |
|
64 /** |
|
65 * Disables service. |
|
66 */ |
|
67 TInt DisableSubService(); |
|
68 |
|
69 /** |
|
70 * Returns type of sub service (VoIP, Vmbx, Presence). |
|
71 * @return Type of the sub service. |
|
72 */ |
|
73 TCCHSubserviceType SubServiceType() const; |
|
74 |
|
75 /** |
|
76 * Handlers sip connection event |
|
77 * @param aProfileId Sip profile id |
|
78 * @param aEvent Connection event |
|
79 */ |
|
80 void HandleSipConnectionEvent( TUint32 aProfileId, |
|
81 TScpConnectionEvent aEvent ); |
|
82 |
|
83 private: |
|
84 |
|
85 /** |
|
86 * C++ default constructor. |
|
87 */ |
|
88 CScpVoipHandler( CScpSubService& aSubService ); |
|
89 |
|
90 /** |
|
91 * 2nd phase constructor |
|
92 */ |
|
93 void ConstructL(); |
|
94 |
|
95 /** |
|
96 * Removes the the routing used for Sip profiles contact header |
|
97 * from Sip Client routing table |
|
98 */ |
|
99 void DeregisterContactHeaderL(); |
|
100 |
|
101 /** |
|
102 * Finds Sip profile contact header user name for the given sub service |
|
103 * @param aUserName The found user name is inserted to here |
|
104 */ |
|
105 void GetSipProfileContactHeaderUserL( RBuf8& aContactHeader ) const; |
|
106 |
|
107 /** |
|
108 * Handlers sip connection event |
|
109 * @param aProfileId Sip profile id |
|
110 * @param aEvent Connection event |
|
111 */ |
|
112 void HandleSipConnectionEventL( TUint32 aProfileId, |
|
113 TScpConnectionEvent aEvent ); |
|
114 |
|
115 // Get CallProvider uid from SPSettings |
|
116 TUid GetCallProviderImplementationUidL(); |
|
117 |
|
118 private: |
|
119 |
|
120 // Monitors network mode P&S variable, owned. |
|
121 CScpPropertyNotifier* iNetworkMode; |
|
122 |
|
123 // Updates VoIP availibility status to SIP client resolver cenrep-table, owned. |
|
124 CSipClientResolverUtils* iSipClientResolver; |
|
125 |
|
126 |
|
127 #ifdef _DEBUG |
|
128 CScpPropertyNotifier* iNetworkModeDebug; |
|
129 friend class T_CScpServiceManager; |
|
130 friend class T_CScpVoipHandler; |
|
131 #endif |
|
132 }; |
|
133 |
|
134 #endif // C_CSCPVOIPHANDLER_H |
|
135 |
|
136 // End of File |
|