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