|
1 /* |
|
2 * Copyright (c) 2006-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 the License "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: Header file for CIptvSmClientSynchronizer class* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CIPTVSMCLIENTSYNCHRONIZER_H__ |
|
22 #define __CIPTVSMCLIENTSYNCHRONIZER_H__ |
|
23 |
|
24 // INCLUDE FILES |
|
25 #include "CIptvServiceManagementClient.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 class CIptvServiceManagementClient; |
|
30 class CIptvSmEvent; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * This class implements synchronized versions of CIptvServiceManagementClient async |
|
35 * API functions. This class is not intended for client usage, use |
|
36 * CIptvServiceManagementClient instead. |
|
37 */ |
|
38 class CIptvSmClientSynchronizer : public CBase, public MIptvServiceManagementClientObserver |
|
39 { |
|
40 public: |
|
41 |
|
42 public: // Constructors and destructors |
|
43 /** |
|
44 * NewL. |
|
45 * Two-phased constructor. |
|
46 * Creates a CIptvSmClientSynchronizer object using two phase construction, |
|
47 * and return a pointer to the created object. |
|
48 * @param aClient reference to client. |
|
49 * @return A pointer to the created instance of CIptvSMClientSynchronizer. |
|
50 */ |
|
51 static CIptvSmClientSynchronizer* NewL(CIptvServiceManagementClient& aServiceManagementClient); |
|
52 |
|
53 /** |
|
54 * ~CIptvSmClientSynchronizer. |
|
55 * Destructor. |
|
56 * Destroys the object and releases all memory objects. |
|
57 */ |
|
58 virtual ~CIptvSmClientSynchronizer(); |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 /** |
|
63 * See corresponding functions from CIptvServiceManagementClient.h. |
|
64 */ |
|
65 TInt AddServiceL(CIptvService& aService, |
|
66 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
67 |
|
68 TInt UpdateServiceL(CIptvService& aService, |
|
69 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
70 |
|
71 TInt GetServicesL(TUint32 aSearchLimitFlags, |
|
72 CIptvServiceManagementClient::TOrder aOrder, |
|
73 CDesC8ArraySeg*& aServicesArray, |
|
74 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
75 |
|
76 TInt GetServicesL(TUint32 aStartId, |
|
77 TUint32 aEndId, |
|
78 CDesC8ArraySeg*& aServicesArray, |
|
79 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
80 |
|
81 TInt DeleteServiceL(TUint32 aId, |
|
82 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
83 |
|
84 TInt SetAllIapsL(CIptvIapList& aIapList, |
|
85 TBool aIgnoreReadOnlyFlag, |
|
86 MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
87 |
|
88 /* Network selection API */ |
|
89 /* See corresponding function headers from CIptvServiceManagementClient.h */ |
|
90 |
|
91 void GetUsedIapL(TUint32 aServiceId, |
|
92 TUint32& aIap, |
|
93 TDes& aIapName, |
|
94 CIptvNetworkSelection::TConnectionPermission& aConnectionPermission, |
|
95 CIptvNetworkSelection::TRespStatus& aRespStatus); |
|
96 |
|
97 TInt ServerShutdown(MIptvServiceManagementClientObserver::TRespStatus& aRespStatus); |
|
98 |
|
99 /** |
|
100 * Callback functions, see MIptvServiceManagementClientObserver.h. |
|
101 */ |
|
102 void AddServiceResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus); |
|
103 void UpdateServiceResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus); |
|
104 void DeleteServiceResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus); |
|
105 void GetServicesResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus, |
|
106 CDesC8ArraySeg* aServicesArray); |
|
107 void GetUsedIapResp(TUint32 aIapId, |
|
108 const TDesC& aIapName, |
|
109 CIptvNetworkSelection::TConnectionPermission aConnPerm, |
|
110 TBool aWlanWhenGPRS, |
|
111 CIptvNetworkSelection::TRespStatus aRespStatus |
|
112 ); |
|
113 void ServerShutdownResp(MIptvServiceManagementClientObserver::TRespStatus aRespStatus); |
|
114 void HandleSmEvent(CIptvSmEvent& aEvent); |
|
115 |
|
116 protected: // Functions from base classes |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * CIptvSmClientSynchronizer. |
|
122 * Default C++ constructor. |
|
123 */ |
|
124 CIptvSmClientSynchronizer(CIptvServiceManagementClient& aServiceManagementClient); |
|
125 |
|
126 /** |
|
127 * ConstructL. |
|
128 * Performs the second phase construction of a |
|
129 * CIptvRequestHandler object. |
|
130 */ |
|
131 void ConstructL(); |
|
132 |
|
133 private: // Data |
|
134 |
|
135 CIptvServiceManagementClient& iServiceManagementClient; |
|
136 MIptvServiceManagementClientObserver::TRespStatus iRespStatus; |
|
137 CIptvNetworkSelection::TRespStatus iNsRespStatus; |
|
138 CDesC8ArraySeg* iServicesArray; |
|
139 TUint32 iIapId; |
|
140 TBuf<KIptvNsIapNameMaxLength> iIapName; |
|
141 CIptvNetworkSelection::TConnectionPermission iConnectionPermission; |
|
142 CActiveSchedulerWait* iActiveSchedulerWait; |
|
143 }; |
|
144 |
|
145 |
|
146 #endif //__CIPTVSMCLIENTSYNCHRONIZER_H__ |
|
147 |
|
148 // End of File |