|
1 /* |
|
2 * Copyright (c) 2006-2006 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: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 #ifndef WSSTAR_POLICY_MANAGER_H |
|
29 #define WSSTAR_POLICY_MANAGER_H |
|
30 |
|
31 // INCLUDES |
|
32 #include <e32std.h> |
|
33 #include <flogger.h> |
|
34 #include "sensessionhandler.h" |
|
35 #include "wsstarhandlercontext.h" |
|
36 #include "wsstarsessioncontext.h" |
|
37 #include "wsstartrustclient.h" |
|
38 #include "wsstarcons.h" |
|
39 #include "wsstarservicesession.h" |
|
40 #include "wspolicyregistry.h" |
|
41 #include "sendebug.h" |
|
42 #include "msenwspolicymanager.h" |
|
43 #include "senwspolicymanager.h" |
|
44 class CWSStarPolicyHandler; |
|
45 class CWSStarDictionary; |
|
46 class CPolicyRequest; |
|
47 class CPolicyReq; |
|
48 class CPolicyReqMap; |
|
49 class CSenWSPolicyManager; |
|
50 |
|
51 typedef RPointerArray<CPolicyReqMap> RPolicyRequestMap; |
|
52 /** |
|
53 * Class: |
|
54 * |
|
55 * Description: An implementation of the CWSStarHandler definition. This is concrete |
|
56 * class, instance of which ECOM framework gives to ECOM clients. |
|
57 */ |
|
58 class CWSStarPolicyManager : public CBase, public MSenWsPolicyManager |
|
59 { |
|
60 |
|
61 public: |
|
62 |
|
63 static CWSStarPolicyManager* NewL(TAny* aHandlerCtx); |
|
64 |
|
65 TInt InvokeL(const TDesC8& aContract); |
|
66 ~CWSStarPolicyManager(); |
|
67 CSenElement* PolicyL(MSenServiceDescription* aSD); //codescannerwarnings |
|
68 CSenElement* PolicyL(const TDesC8& aUri); //codescannerwarnings |
|
69 TInt DownloadPolicyL( CSenWSDescription* apSD ); |
|
70 TInt UpdatePolicyL(CWSStarPolicyHandler* aPolicyHandler); |
|
71 TInt UnRegisterWsPolicyL(MSenServiceDescription& aServiceDescription, TInt& aErrorTo); |
|
72 TInt PolicyConsumerAddedL(CSenServiceSession* aNewSession, MSenRemoteServiceConsumer& aRemoteConsumer); |
|
73 |
|
74 RFileLogger* Log() const; |
|
75 void DataTrafficDetails(TSenDataTrafficDetails& aDetails); |
|
76 private: |
|
77 /** |
|
78 * Function: CWSStarPolicyManager |
|
79 * |
|
80 * Discussion: Perform the first phase of two phase construction |
|
81 */ |
|
82 CWSStarPolicyManager(MSenHandlerContext& aCtx); |
|
83 |
|
84 /** |
|
85 * Function: ConstructL |
|
86 * |
|
87 * Discussion: Perform the second phase construction |
|
88 * |
|
89 */ |
|
90 void ConstructL(); |
|
91 TInt GetHttpPolicyL( const TDesC8& aEndpoint, RExpiredPolicyArray& aRequestMap, CSenWSDescription* apSD ); |
|
92 TInt IsContractExist(const TDesC8& aContract); |
|
93 //new methods |
|
94 TInt RegisterWsPolicyL(const TDesC8& aContract); |
|
95 |
|
96 |
|
97 virtual TInt AddWsPolicy1L(CSenWSDescription* aPattern, const TDesC8& aUri, |
|
98 const TDesC8& aPolicy, TInt& aErrorTo); |
|
99 |
|
100 virtual TInt RemoveWsPolicy1L( CSenWSDescription* aPattern, |
|
101 const TDesC8& aUri, TInt& aErrorTo); |
|
102 |
|
103 virtual TInt RegisterWsPolicy1L(CSenWSDescription* aPattern, |
|
104 TInt& aErrorTo); |
|
105 |
|
106 virtual TInt UnRegisterWsPolicy1L(CSenWSDescription* aPattern, |
|
107 TInt& aErrorTo); |
|
108 |
|
109 virtual CSenElement* WsPolicy1L( CSenWSDescription* aPattern, |
|
110 const TDesC8& aUri, TInt& aErrorTo); |
|
111 |
|
112 virtual CSenElement* WsPolicy1L( CSenWSDescription* aPattern, |
|
113 TInt& aErrorTo); |
|
114 |
|
115 virtual CSenElement* WsPolicy1L( const TDesC8& aProviderId, |
|
116 TInt& aErrorTo); |
|
117 |
|
118 virtual TInt AddPolicyConsumer1L(const TDesC8& aUri, const TDesC8& aConsumerId); |
|
119 |
|
120 virtual TInt RemovePolicyConsumer1L(const TDesC8& aUri, const TDesC8& aConsumerId); |
|
121 |
|
122 TInt GetPolicyFromFileL( RExpiredPolicyArray& aRequestMap ); |
|
123 |
|
124 private: |
|
125 |
|
126 MSenHandlerContext& iSenHandlerContext; //Not owned |
|
127 CPolicyRegistry* iRegistry; |
|
128 CWSStarDictionary* iDictionary; |
|
129 CSenWSPolicyManager* iPolicyManager; |
|
130 RPointerArray<HBufC8> iContracts; |
|
131 TSenDataTrafficDetails iPolicyDetails; |
|
132 |
|
133 }; |
|
134 |
|
135 #endif // WSSTAR_POLICY_MANAGER_H |
|
136 |