|
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: Avkon fixture ECom plugin interface definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __TASFIXTUREPLUGININTERFACE_H__ |
|
19 #define __TASFIXTUREPLUGININTERFACE_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <ecom/ecom.h> |
|
24 #include <e32hashtab.h> |
|
25 |
|
26 // CONSTANTS |
|
27 const static TUid KTasFixturePluginInterfaceUid = { 0x20026F7D }; |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Avkon fixture ECom plugin interface definition class. |
|
41 * It provides ECom interface instantiation and destruction as well as the |
|
42 * interface for services it provides. The concrete implementations are |
|
43 * defined in inherited classes. |
|
44 */ |
|
45 class CTasFixturePluginInterface : public CBase |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * @brief Two-phased constructor. |
|
51 * |
|
52 * Creates an instance of a CTasFixturePluginInterface implementation. |
|
53 * ECom framework is used in finding and creating the suitable |
|
54 * implementation. |
|
55 * |
|
56 * @return A new instance of a CTasFixturePluginInterface implementation |
|
57 */ |
|
58 static CTasFixturePluginInterface* NewL( TUid aImplementationUid ); |
|
59 |
|
60 /** |
|
61 * @brief Destructor. |
|
62 */ |
|
63 virtual ~CTasFixturePluginInterface(); |
|
64 |
|
65 /** |
|
66 * @brief Execute an action on the fixture plugin. |
|
67 * |
|
68 * Interface to execute an action with given parameters on the fixture |
|
69 * plugin. An object can be given through a void pointer. Response is |
|
70 * send back to the caller. |
|
71 * |
|
72 * Abstract function, must be implemented in derived classes. |
|
73 * |
|
74 * @return KErrNone if the action was successfully executed, one of |
|
75 * the Symbian OS error codes if not. |
|
76 * @param aObject An object to be used in execution |
|
77 * @param aAction Identification of the desired action |
|
78 * @param aParams Parameters as key - value pairs |
|
79 * @param aResponse A response to be send back to the caller |
|
80 */ |
|
81 virtual TInt Execute( |
|
82 TAny* aObject, |
|
83 TDesC8& aAction, |
|
84 RHashMap<RBuf8, RBuf8>& aParams, |
|
85 RBuf8& aResponse ) = 0; |
|
86 |
|
87 private: // Data |
|
88 |
|
89 /// Current instance identifier |
|
90 TUid iImplementation; |
|
91 |
|
92 }; |
|
93 |
|
94 #include <TasFixturePluginInterface.inl> |
|
95 |
|
96 #endif // __TASFIXTUREPLUGININTERFACE_H__ |
|
97 |
|
98 // End of File |