|
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 "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: XIMP Protocol Plugin host interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MXIMPFWPROTOCOLPLUGINHOST_H |
|
19 #define MXIMPFWPROTOCOLPLUGINHOST_H |
|
20 |
|
21 #include <ximpbase.h> |
|
22 #include <ximpprotocolpluginhostifids.hrh> |
|
23 #include <e32std.h> |
|
24 |
|
25 |
|
26 class MXIMPObjectFactory; |
|
27 class MXIMPStatus; |
|
28 |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Interface for XIMP Protocol Plugin host. |
|
35 * This interface is implemented by XIMP Framework. |
|
36 * |
|
37 * XIMP Protocol Plugin host interface defines |
|
38 * actions that a XIMP protocol plug-in can |
|
39 * request (callback) from XIMP Framework. |
|
40 * |
|
41 * @see MXIMPProtocolPlugin |
|
42 * @see CXIMPProtocolPluginBase |
|
43 * @ingroup ximpprotocolpluginhostapi |
|
44 * @since S60 v3.2 |
|
45 */ |
|
46 class MXIMPProtocolPluginHost : public MXIMPBase |
|
47 { |
|
48 public: |
|
49 |
|
50 /** Interface ID for the MXIMPProtocolPluginHost. */ |
|
51 enum { KInterfaceId = XIMP_IF_ID_PROTOCOL_PLUGIN_HOST }; |
|
52 |
|
53 |
|
54 protected: |
|
55 |
|
56 /** |
|
57 * Protected destructor. XIMP Protocol Plugin host |
|
58 * instancies can't be destroyed via this interface. |
|
59 */ |
|
60 virtual inline ~MXIMPProtocolPluginHost() {}; |
|
61 |
|
62 |
|
63 public: |
|
64 |
|
65 |
|
66 /** |
|
67 * Gets reference to object factory interface. |
|
68 * |
|
69 * Returned object factory interface is used |
|
70 * to instantiate XIMP data objects. |
|
71 * |
|
72 * @return Object factory interface. |
|
73 * No ownership is returned caller. |
|
74 */ |
|
75 virtual MXIMPObjectFactory& ObjectFactory() = 0; |
|
76 |
|
77 |
|
78 |
|
79 /** |
|
80 * Notifies XIMP Framework that XIMP protocol |
|
81 * plug-in has completed (successfully or otherwise) |
|
82 * the request handling. |
|
83 * |
|
84 * NOTE: This method isn't yet supported by XIMP Framework, |
|
85 * since all MXIMPProtocolPlugin methods are currently |
|
86 * synchronous. |
|
87 * |
|
88 * |
|
89 * @param [in] aReqId |
|
90 * Request ID identifying the request which handling |
|
91 * is completed. This must equal to value given in |
|
92 * the processing initiation. If no pending XIMP |
|
93 * protocol plug-in request is found with this ID, |
|
94 * plug-in is paniced. |
|
95 * |
|
96 * @param [in] aResultCode |
|
97 * Result code from request handling. |
|
98 */ |
|
99 virtual void HandleRequestCompleted( TXIMPRequestId aReqId, |
|
100 TInt aResultCode ) = 0; |
|
101 |
|
102 |
|
103 /** |
|
104 * Notifies XIMP Framework that XIMP protocol |
|
105 * plug-in has completed (successfully or otherwise) |
|
106 * the request handling. |
|
107 * |
|
108 * NOTE: This method isn't yet supported by XIMP Framework, |
|
109 * since all MXIMPProtocolPlugin methods are currently |
|
110 * synchronous. |
|
111 * |
|
112 * @param [in] aReqId |
|
113 * Request ID identifying the request which handling |
|
114 * is completed. This must equal to value given in |
|
115 * the processing initiation. If no pending XIMP |
|
116 * protocol plug-in request is found with this ID, |
|
117 * plug-in is paniced. |
|
118 * |
|
119 * @param [in] aResult |
|
120 * Status object describing result from request handling. |
|
121 * Object ownership is transfered always to XIMPFw. |
|
122 * NULL value not allowed. |
|
123 */ |
|
124 virtual void HandleRequestCompleted( TXIMPRequestId aReqId, |
|
125 MXIMPStatus* aResult ) = 0; |
|
126 |
|
127 |
|
128 /** |
|
129 * Notifies XIMP Framework that XIMP protocol |
|
130 * plug-in has completed (successfully or otherwise) |
|
131 * the request handling. |
|
132 * |
|
133 * NOTE: This method isn't yet supported by XIMP Framework, |
|
134 * since all MXIMPProtocolPlugin methods are currently |
|
135 * synchronous. |
|
136 * |
|
137 * @param [in] aReqId |
|
138 * Request ID identifying the request which handling |
|
139 * is completed. This must equal to value given in |
|
140 * the processing initiation. If no pending XIMP |
|
141 * protocol plug-in request is found with this ID, |
|
142 * plug-in is paniced. |
|
143 * |
|
144 * @param [in] aResult |
|
145 * Status object describing result from request handling. |
|
146 * Object ownership is transfered always to XIMPFw. |
|
147 * NULL value not allowed. |
|
148 * |
|
149 * @param [in] aParameter |
|
150 * Additional request complete parameters. |
|
151 * NULL if no additional parameters to transfer XIMPFw. |
|
152 * Parameter may be single MXIMPBase derived |
|
153 * object or MXIMPRestrictedObjectCollection object |
|
154 * containing multiple objects. Ownership of given |
|
155 * parameter (also the container and contained objects) |
|
156 * is transfered always to XIMPFw. |
|
157 */ |
|
158 virtual void HandleRequestCompleted( TXIMPRequestId aReqId, |
|
159 MXIMPStatus* aResult, |
|
160 MXIMPBase* aParameter ) = 0; |
|
161 |
|
162 }; |
|
163 |
|
164 |
|
165 #endif // MXIMPFWPROTOCOLPLUGINHOST_H |