|
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_CSCPVMBXHANDLER_H |
|
20 #define C_CSCPVMBXHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "scpservicehandlerbase.h" |
|
25 #include "ipvmbxobserver.h" |
|
26 |
|
27 class CScpSubService; |
|
28 class CScpServiceStorage; |
|
29 |
|
30 /** |
|
31 * Vmbx sub service handler. |
|
32 * |
|
33 * @lib sipconnectionprovider.dll |
|
34 * @since Series 60 3.2 |
|
35 */ |
|
36 class CScpVmbxHandler : public CScpServiceHandlerBase, |
|
37 public MIpVmbxObserver |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 static CScpVmbxHandler* NewL( CScpSubService& aSubService ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CScpVmbxHandler(); |
|
47 |
|
48 private: // From base class |
|
49 |
|
50 /** |
|
51 * Enables service. |
|
52 */ |
|
53 void EnableSubServiceL(); |
|
54 |
|
55 /** |
|
56 * Checks if another vmbx sub service is already enabled |
|
57 * @return ETrue if enabled |
|
58 */ |
|
59 TBool IsAnotherVmbxSubServiceAlreadyEnabled() const; |
|
60 |
|
61 /** |
|
62 * Disables service. |
|
63 */ |
|
64 TInt DisableSubService(); |
|
65 |
|
66 /** |
|
67 * Handles messages from Vmbx interface |
|
68 * @param aServiceId Message concers the given service id |
|
69 * @param aMessage Message |
|
70 */ |
|
71 void HandleMessage( TUint32 aServiceId, TVmbxMessage aMessage ); |
|
72 |
|
73 /** |
|
74 * Handlers sip connection event |
|
75 * @param aProfileId Sip profile id |
|
76 * @param aEvent Connection event |
|
77 */ |
|
78 void HandleSipConnectionEvent( TUint32 aProfileId, |
|
79 TScpConnectionEvent aEvent ); |
|
80 |
|
81 /** |
|
82 * Returns type of sub service (VoIP, Vmbx, Presence). |
|
83 * @return Type of the sub service. |
|
84 */ |
|
85 TCCHSubserviceType SubServiceType() const; |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * C++ default constructor. |
|
91 */ |
|
92 CScpVmbxHandler( CScpSubService& aSubService ); |
|
93 |
|
94 /** |
|
95 * 2nd phase constructor. |
|
96 */ |
|
97 void ConstructL(); |
|
98 |
|
99 /** |
|
100 * Disable sub service. |
|
101 */ |
|
102 void UnsubscribeL(); |
|
103 |
|
104 /** |
|
105 * SubscribeL |
|
106 */ |
|
107 void SubscribeL(); |
|
108 |
|
109 /** |
|
110 * Force Vmbx service disable |
|
111 * @param aSelf This object |
|
112 */ |
|
113 static TInt ForceVmbxServiceDisable( TAny* aSelf ); |
|
114 |
|
115 private: // data |
|
116 |
|
117 /** |
|
118 * Indicates do we have to make resubscribe |
|
119 */ |
|
120 TBool iResubscribe; |
|
121 |
|
122 #ifdef _DEBUG |
|
123 friend class T_CScpVmbxHandler; |
|
124 friend class T_CScpServiceManager; |
|
125 #endif |
|
126 }; |
|
127 |
|
128 #endif // C_CSCPVMBXHANDLER_H |
|
129 |
|
130 // End of File |