|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 //co-branding CR |
|
22 #ifndef WSSTAR_COBRANDING_HANDLER_H |
|
23 #define WSSTAR_COBRANDING_HANDLER_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32std.h> |
|
27 #include <flogger.h> |
|
28 #include "sensessionhandler.h" |
|
29 #include "wsstarhandlercontext.h" |
|
30 #include "wsstarsessioncontext.h" |
|
31 #include "wsstartrustclient.h" |
|
32 #include "wsstarcons.h" |
|
33 #include "wsstarservicesession.h" |
|
34 |
|
35 /** |
|
36 * Class: |
|
37 * |
|
38 * Description: An implementation of the CWSStarHandler definition. This is concrete |
|
39 * class, instance of which ECOM framework gives to ECOM clients. |
|
40 */ |
|
41 class CWSStarCoBrandingHandler : public CSenSessionHandler |
|
42 { |
|
43 |
|
44 public: |
|
45 |
|
46 |
|
47 /** |
|
48 * Function: NewL |
|
49 * |
|
50 * Description: Create instance of concrete implementation. Note that ECOM |
|
51 * interface implementations can only have two signatures for |
|
52 * NewL: |
|
53 * - NewL without parameters (used here) |
|
54 * - NewL with TAny* pointer, which may provide some client |
|
55 * data |
|
56 * |
|
57 * Returns: Instance of this class. |
|
58 * |
|
59 * Note: The interface, which is abstract base class of this |
|
60 * implementation, also provides NewL method. Normally abstract |
|
61 * classes do not provide NewL, because they cannot create |
|
62 * instances of themselves. |
|
63 */ |
|
64 static CWSStarCoBrandingHandler* NewL(TAny* aHandlerCtx); |
|
65 |
|
66 /** |
|
67 * InvokeL is the most emergent method in message handler interface. |
|
68 * Each sub-class must implement this method thus providing message |
|
69 * processing routine. |
|
70 * @param aCtx is the session context that will be accessed and |
|
71 * typically altered by implemented handler, in order to provide |
|
72 * modifications on the layer of the session construction, validation, |
|
73 * or some other, focused area that the handler was intended to take |
|
74 * responsibility for. For example, certain handler can itself create |
|
75 * a session of its own, send message(s) to (authentication) service |
|
76 * (invoking other handlers), and finally access session context in |
|
77 * order to update credentials. One example of such session handler |
|
78 * could be WS-TRUST client type handler, an "internal service consumer". |
|
79 */ |
|
80 virtual TInt InvokeL(MSenSessionContext& aCtx); |
|
81 |
|
82 ~CWSStarCoBrandingHandler(); |
|
83 virtual SenHandler::THandlerDirection Direction() const; |
|
84 virtual SenHandler::THandlerPhase Phase(); |
|
85 virtual TInt InitL(MSenHandlerContext& aCtx); |
|
86 RFileLogger* Log() const; |
|
87 |
|
88 CSenIdentityProvider* IdentityProviderFromCoreL(const TDesC8& aProviderID); |
|
89 CWSStarTrustClient* STSClientL(CSenIdentityProvider*& aIdentityProvider); |
|
90 |
|
91 protected: |
|
92 /** |
|
93 * Function: CWSStarCoBrandingHandler |
|
94 * |
|
95 * Discussion: Perform the first phase of two phase construction |
|
96 */ |
|
97 CWSStarCoBrandingHandler(MSenHandlerContext& aCtx); |
|
98 |
|
99 /** |
|
100 * Function: ConstructL |
|
101 * |
|
102 * Discussion: Perform the second phase construction of a |
|
103 * CImplementationClassPlus object. |
|
104 */ |
|
105 void ConstructL(); |
|
106 |
|
107 private: // Data |
|
108 }; |
|
109 #endif // WSSTAR_COBRANDING_HANDLER_H |
|
110 |