|
1 /* |
|
2 * Copyright (c) 2002-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 definition of plugin class implementing devsound server |
|
15 * side custom interface extension. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CIEXTNSERVERPLUGIN_H |
|
22 #define CIEXTNSERVERPLUGIN_H |
|
23 |
|
24 // Include files |
|
25 #include <e32base.h> |
|
26 #include <a3f/mmfdevsoundcustominterfaceextensions.h> |
|
27 #include "ciextnserverpluginwrapper.h" |
|
28 |
|
29 // Forward declarations |
|
30 class MCustomInterface; |
|
31 class MCIMsgHndlrIntfc; |
|
32 |
|
33 /** |
|
34 * Plugin class implementing DevSound CI server Extension |
|
35 * |
|
36 * An instance of this class is created when DevSound Session is created. When |
|
37 * DevSound session object receives a RMmfIpcMessage that cannot be handled, the |
|
38 * message is forwarded to this plugin. |
|
39 * |
|
40 * Only one instance of this plugin can exist in the system. |
|
41 * |
|
42 * This class is intended to be used only by DevSound Session implementation. |
|
43 * |
|
44 * @since S60 v3.2 |
|
45 * |
|
46 */ |
|
47 class CCIExtnServerPlugin : public CBase, |
|
48 public MDevSoundCIServerExtension |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 * Called by ECom framework. |
|
55 */ |
|
56 static MDevSoundCIServerExtension* NewL(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 ~CCIExtnServerPlugin(); |
|
62 |
|
63 // From MDevSoundCIServerExtension begins |
|
64 // Called by framework when plugin is constructed |
|
65 TInt Setup( MCustomInterface& aInterface ); |
|
66 // Called by framework passing aMessage to handle |
|
67 TInt HandleMessageL(const RMmfIpcMessage& aMessage); |
|
68 // Called by framework when plugin is to be deleted |
|
69 void Release(); |
|
70 // Called by framework after plugin is created |
|
71 void PassDestructorKey( TUid aDestructorKey ); |
|
72 // From MDevSoundCIClientExtension ends |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Constructor. |
|
78 */ |
|
79 CCIExtnServerPlugin(); |
|
80 |
|
81 /** |
|
82 * Second phase constructor. |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 /** |
|
87 * Initializes factory plugins list. |
|
88 * |
|
89 * Leaves on error. |
|
90 */ |
|
91 void InitializeMsgHndlrPluginsL(); |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * Reference to MCustomInterface interface |
|
97 * Not own. |
|
98 */ |
|
99 MCustomInterface* iMCustomInterface; |
|
100 |
|
101 /** |
|
102 * Reference to MCustomInterface interface |
|
103 * Not own. |
|
104 */ |
|
105 CIExtnServerPluginWrapper* iCiExtnServerPluginWrapper; |
|
106 |
|
107 /** |
|
108 * Uid of the plugin object passed by the framework via PassDestructorKey() |
|
109 */ |
|
110 TUid iDestructorKey; |
|
111 |
|
112 /** |
|
113 * List of message handler plugins. When framework calls |
|
114 * HandleMessageL() function, the request will be forwarded to each |
|
115 * message handler plugin in this list until it is handled. |
|
116 * |
|
117 * Own. |
|
118 */ |
|
119 RPointerArray<MCIMsgHndlrIntfc> iMCIMsgHndlrIntfcList; |
|
120 }; |
|
121 |
|
122 #endif // CIEXTNSERVERPLUGIN_H |