|
1 /* |
|
2 * Copyright (c) 2008 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 #ifndef WSOvi_REGISTER_HANDLER_H |
|
26 #define WSOvi_REGISTER_HANDLER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <e32std.h> |
|
30 #include <flogger.h> |
|
31 #include "sensessionhandler.h" |
|
32 #include "wsovihandlercontext.h" |
|
33 #include "wsovisessioncontext.h" |
|
34 #include "wsovicons.h" |
|
35 #include "wsoviservicesession.h" |
|
36 #include "SenServiceConnection.h" |
|
37 |
|
38 |
|
39 /** |
|
40 * Class:CWSOviRegisterHandler |
|
41 * |
|
42 * An implementation of the CWSOviSessionHandler definition. This is concrete |
|
43 * class, instance of which ECOM framework gives to ECOM clients. |
|
44 * |
|
45 * Class represent phase related to session, before discovering and validation. |
|
46 * Main goal is to indirectly implement (by passing session context) SIF method: |
|
47 * -registegr/unregister service description |
|
48 */ |
|
49 class CWSOviRegisterHandler : public CSenSessionHandler |
|
50 { |
|
51 |
|
52 public: |
|
53 /** |
|
54 * Function: NewL |
|
55 * |
|
56 * Description: Create instance of concrete implementation. Note that ECOM |
|
57 * interface implementations can only have two signatures for |
|
58 * NewL: |
|
59 * - NewL without parameters (used here) |
|
60 * - NewL with TAny* pointer, which may provide some client |
|
61 * data |
|
62 * |
|
63 * Returns: Instance of this class. |
|
64 * |
|
65 * Note: The interface, which is abstract base class of this |
|
66 * implementation, also provides NewL method. Normally abstract |
|
67 * classes do not provide NewL, because they cannot create |
|
68 * instances of themselves. |
|
69 */ |
|
70 |
|
71 static CWSOviRegisterHandler* NewL(TAny* aHandlerCtx); |
|
72 virtual TInt InvokeL(MSenSessionContext& aCtx); |
|
73 ~CWSOviRegisterHandler(); |
|
74 |
|
75 virtual SenHandler::THandlerDirection Direction() const; |
|
76 virtual SenHandler::THandlerPhase Phase(); |
|
77 virtual TInt InitL(MSenHandlerContext& aCtx); |
|
78 |
|
79 |
|
80 protected: |
|
81 /** |
|
82 * Function: CWSOviRegisterHandler |
|
83 * |
|
84 * Discussion: Perform the first phase of two phase construction |
|
85 */ |
|
86 CWSOviRegisterHandler(MSenHandlerContext& aCtx); |
|
87 |
|
88 |
|
89 /** |
|
90 * Function: ConstructL |
|
91 * |
|
92 * Discussion: Perform the second phase construction of a |
|
93 * CImplementationClassPlus object. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 |
|
98 private: |
|
99 /** |
|
100 * Attempt to register the ServiceDescription. |
|
101 * In fact session is created but not vaidated and added into CoreManager. |
|
102 * So registering different to adding that it doesnt validate, just register. |
|
103 * Common issue is increase core database by one session (validated or not) |
|
104 * |
|
105 * @param aServiceDescription A ServiceDescription |
|
106 * |
|
107 * return TInt aError - indicates the error or KErrNone if successful |
|
108 */ |
|
109 virtual TInt RegisterServiceDescriptionL( |
|
110 MSenServiceDescription& aServiceDescription); |
|
111 |
|
112 |
|
113 /** |
|
114 * Attempt to unregister the ServiceDescription from the ServiceManager |
|
115 * that owns the framework. |
|
116 * This is a callback used by the ServiceManager. |
|
117 * |
|
118 * @param aServiceDescription A ServiceDescription |
|
119 * |
|
120 * return TInt aError - indicates the error or KErrNone if successful |
|
121 */ |
|
122 virtual TInt UnregisterServiceDescriptionL( |
|
123 MSenServiceDescription& aServiceDescription); |
|
124 |
|
125 /** |
|
126 * Register specific description (NAUTH contract) |
|
127 */ |
|
128 TInt RegisterAuthClientL(MSenServiceDescription *aServiceDescription); |
|
129 |
|
130 /** |
|
131 * Unregister specific description (NAUTH contract) |
|
132 */ |
|
133 TInt UnRegisterAuthClientL(MSenServiceDescription* aServiceDescription); |
|
134 }; |
|
135 |
|
136 |
|
137 #endif // WSOvi_HANDLER_REGISTER_PLUGIN_H |
|
138 |