1 /* |
|
2 * Copyright (c) 2009 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: SCP IM Handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SCPIMHANDLER_H |
|
20 #define C_SCPIMHANDLER_H |
|
21 |
|
22 |
|
23 #include "scpservicehandlerbase.h" |
|
24 |
|
25 class CSipClientResolverUtils; |
|
26 |
|
27 |
|
28 /** |
|
29 * Class for handling IM sub service. |
|
30 * |
|
31 * @code |
|
32 * CScpSubService* imSubService = CScpSubService::NewL( newId, |
|
33 * ServiceId(), ECCHIMSub, *service ); |
|
34 * CScpServiceHandlerBase* imSubServiceHandler = CScpImHandler::NewL( |
|
35 * *imSubService ); |
|
36 * imSubServiceHandler->EnableSubServiceL(); |
|
37 * @endcode |
|
38 * |
|
39 * @lib sipconnectionprovider.dll |
|
40 * @since S60 v5.1 |
|
41 */ |
|
42 class CScpImHandler : public CScpServiceHandlerBase |
|
43 { |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aSubService sub service |
|
50 */ |
|
51 static CScpImHandler* NewL( CScpSubService& aSubService ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CScpImHandler(); |
|
57 |
|
58 // from base class CScpServiceHandlerBase |
|
59 |
|
60 /** |
|
61 * From CScpServiceHandlerBase |
|
62 * Defined in a base class |
|
63 */ |
|
64 void EnableSubServiceL(); |
|
65 |
|
66 /** |
|
67 * From CScpServiceHandlerBase |
|
68 * Defined in a base class |
|
69 */ |
|
70 TInt DisableSubService(); |
|
71 |
|
72 /** |
|
73 * From CScpServiceHandlerBase |
|
74 * Defined in a base class |
|
75 */ |
|
76 TCCHSubserviceType SubServiceType() const; |
|
77 |
|
78 /** |
|
79 * From CScpServiceHandlerBase |
|
80 * Defined in a base class |
|
81 */ |
|
82 void HandleSipConnectionEvent( const TUint32 aProfileId, |
|
83 TScpConnectionEvent aSipEvent ); |
|
84 |
|
85 private: |
|
86 |
|
87 CScpImHandler( CScpSubService& aSubService ); |
|
88 |
|
89 void ConstructL(); |
|
90 |
|
91 /** |
|
92 * Handle SIP connection event. |
|
93 * |
|
94 * @since S60 v5.1 |
|
95 * @param aProfileId SIP profile ID |
|
96 * @param aSipEvent connection event |
|
97 */ |
|
98 void HandleSipConnectionEventL( const TUint32 aProfileId, |
|
99 TScpConnectionEvent aSipEvent ); |
|
100 |
|
101 /** |
|
102 * Find SIP profile contact header user name for the given sub service. |
|
103 * |
|
104 * @since S60 v5.1 |
|
105 * @param aContactHeader found user name is inserted here |
|
106 */ |
|
107 void GetSipProfileContactHeaderUserL( RBuf8& aContactHeader ) const; |
|
108 |
|
109 /** |
|
110 * Remove the the routing used for SIP profile's contact header |
|
111 * from SIP Client routing table. |
|
112 * |
|
113 * @since S60 v5.1 |
|
114 */ |
|
115 void DeregisterContactHeaderL(); |
|
116 |
|
117 private: // data |
|
118 |
|
119 /** |
|
120 * SIP Client Resolver |
|
121 * Own. |
|
122 */ |
|
123 CSipClientResolverUtils* iSipClientResolver; |
|
124 |
|
125 #ifdef _DEBUG |
|
126 friend class T_CScpImHandler; |
|
127 #endif |
|
128 }; |
|
129 |
|
130 #endif // C_SCPIMHANDLER_H |
|