|
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_HANDLER_H |
|
29 #define WSSTAR_POLICY_HANDLER_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 |
|
42 class CWSStarDictionary; |
|
43 class CWSStarPolicyManager; |
|
44 |
|
45 /** |
|
46 * Class: |
|
47 * |
|
48 * Description: An implementation of the CWSStarHandler definition. This is concrete |
|
49 * class, instance of which ECOM framework gives to ECOM clients. |
|
50 */ |
|
51 class CWSStarPolicyHandler : public CSenSessionHandler |
|
52 { |
|
53 |
|
54 public: |
|
55 |
|
56 |
|
57 /** |
|
58 * Function: NewL |
|
59 * |
|
60 * Description: Create instance of concrete implementation. Note that ECOM |
|
61 * interface implementations can only have two signatures for |
|
62 * NewL: |
|
63 * - NewL without parameters (used here) |
|
64 * - NewL with TAny* pointer, which may provide some client |
|
65 * data |
|
66 * |
|
67 * Returns: Instance of this class. |
|
68 * |
|
69 * Note: The interface, which is abstract base class of this |
|
70 * implementation, also provides NewL method. Normally abstract |
|
71 * classes do not provide NewL, because they cannot create |
|
72 * instances of themselves. |
|
73 */ |
|
74 static CWSStarPolicyHandler* NewL(TAny* aHandlerCtx); |
|
75 |
|
76 /** |
|
77 * InvokeL is the most emergent method in message handler interface. |
|
78 * Each sub-class must implement this method thus providing message |
|
79 * processing routine. |
|
80 * @param aCtx is the session context that will be accessed and |
|
81 * typically altered by implemented handler, in order to provide |
|
82 * modifications on the layer of the session construction, validation, |
|
83 * or some other, focused area that the handler was intended to take |
|
84 * responsibility for. For example, certain handler can itself create |
|
85 * a session of its own, send message(s) to (authentication) service |
|
86 * (invoking other handlers), and finally access session context in |
|
87 * order to update credentials. One example of such session handler |
|
88 * could be WS-TRUST client type handler, an "internal service consumer". |
|
89 */ |
|
90 virtual TInt InvokeL(MSenSessionContext& aCtx); |
|
91 |
|
92 ~CWSStarPolicyHandler(); |
|
93 virtual SenHandler::THandlerDirection Direction() const; |
|
94 virtual SenHandler::THandlerPhase Phase(); |
|
95 virtual TInt InitL(MSenHandlerContext& aCtx); |
|
96 CSenElement* PolicyL(MSenServiceDescription* aSD); //codescannerwarnings |
|
97 CSenElement* PolicyL(const TDesC8& aUri); //codescannerwarnings |
|
98 TInt InvokeL(const TDesC8& aContract); |
|
99 TInt DownloadPolicyL(CSenWSDescription* apArgument); |
|
100 TInt UpdatePolicyL(); |
|
101 TInt UnRegisterWsPolicyL(MSenServiceDescription& aServiceDescription); |
|
102 TInt PolicyConsumerAddedL(CSenServiceSession* aNewSession, MSenRemoteServiceConsumer& aRemoteConsumer); |
|
103 RFileLogger* Log() const; |
|
104 void DataTrafficDetails(TSenDataTrafficDetails& aDetails); |
|
105 |
|
106 protected: |
|
107 /** |
|
108 * Function: CWSStarPolicyHandler |
|
109 * |
|
110 * Discussion: Perform the first phase of two phase construction |
|
111 */ |
|
112 CWSStarPolicyHandler(MSenHandlerContext& aCtx); |
|
113 |
|
114 /** |
|
115 * Function: ConstructL |
|
116 * |
|
117 * Discussion: Perform the second phase construction of a |
|
118 * CImplementationClassPlus object. |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 private: // Data |
|
123 CWSStarPolicyManager* iPolicyManager; |
|
124 |
|
125 }; |
|
126 #endif // WSSTAR_POLICY_HANDLER_H |
|
127 |