author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
sl@0 | 1 |
/* |
sl@0 | 2 |
* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). |
sl@0 | 3 |
* All rights reserved. |
sl@0 | 4 |
* This component and the accompanying materials are made available |
sl@0 | 5 |
* under the terms of "Eclipse Public License v1.0" |
sl@0 | 6 |
* which accompanies this distribution, and is available |
sl@0 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
sl@0 | 8 |
* |
sl@0 | 9 |
* Initial Contributors: |
sl@0 | 10 |
* Nokia Corporation - initial contribution. |
sl@0 | 11 |
* |
sl@0 | 12 |
* Contributors: |
sl@0 | 13 |
* |
sl@0 | 14 |
* Description: Header definition of plugin class implementing devsound server |
sl@0 | 15 |
* side custom interface extension. |
sl@0 | 16 |
* |
sl@0 | 17 |
*/ |
sl@0 | 18 |
|
sl@0 | 19 |
|
sl@0 | 20 |
|
sl@0 | 21 |
#ifndef CIEXTNSERVERPLUGIN_H |
sl@0 | 22 |
#define CIEXTNSERVERPLUGIN_H |
sl@0 | 23 |
|
sl@0 | 24 |
// Include files |
sl@0 | 25 |
#include <e32base.h> |
sl@0 | 26 |
#include <a3f/mmfdevsoundcustominterfaceextensions.h> |
sl@0 | 27 |
#include "ciextnserverpluginwrapper.h" |
sl@0 | 28 |
|
sl@0 | 29 |
// Forward declarations |
sl@0 | 30 |
class MCustomInterface; |
sl@0 | 31 |
class MCIMsgHndlrIntfc; |
sl@0 | 32 |
|
sl@0 | 33 |
/** |
sl@0 | 34 |
* Plugin class implementing DevSound CI server Extension |
sl@0 | 35 |
* |
sl@0 | 36 |
* An instance of this class is created when DevSound Session is created. When |
sl@0 | 37 |
* DevSound session object receives a RMmfIpcMessage that cannot be handled, the |
sl@0 | 38 |
* message is forwarded to this plugin. |
sl@0 | 39 |
* |
sl@0 | 40 |
* Only one instance of this plugin can exist in the system. |
sl@0 | 41 |
* |
sl@0 | 42 |
* This class is intended to be used only by DevSound Session implementation. |
sl@0 | 43 |
* |
sl@0 | 44 |
* @since S60 v3.2 |
sl@0 | 45 |
* |
sl@0 | 46 |
*/ |
sl@0 | 47 |
class CCIExtnServerPlugin : public CBase, |
sl@0 | 48 |
public MDevSoundCIServerExtension |
sl@0 | 49 |
{ |
sl@0 | 50 |
public: |
sl@0 | 51 |
|
sl@0 | 52 |
/** |
sl@0 | 53 |
* Two-phased constructor. |
sl@0 | 54 |
* Called by ECom framework. |
sl@0 | 55 |
*/ |
sl@0 | 56 |
static MDevSoundCIServerExtension* NewL(); |
sl@0 | 57 |
|
sl@0 | 58 |
/** |
sl@0 | 59 |
* Destructor. |
sl@0 | 60 |
*/ |
sl@0 | 61 |
~CCIExtnServerPlugin(); |
sl@0 | 62 |
|
sl@0 | 63 |
// From MDevSoundCIServerExtension begins |
sl@0 | 64 |
// Called by framework when plugin is constructed |
sl@0 | 65 |
TInt Setup( MCustomInterface& aInterface ); |
sl@0 | 66 |
// Called by framework passing aMessage to handle |
sl@0 | 67 |
TInt HandleMessageL(const RMmfIpcMessage& aMessage); |
sl@0 | 68 |
// Called by framework when plugin is to be deleted |
sl@0 | 69 |
void Release(); |
sl@0 | 70 |
// Called by framework after plugin is created |
sl@0 | 71 |
void PassDestructorKey( TUid aDestructorKey ); |
sl@0 | 72 |
// From MDevSoundCIClientExtension ends |
sl@0 | 73 |
|
sl@0 | 74 |
private: |
sl@0 | 75 |
|
sl@0 | 76 |
/** |
sl@0 | 77 |
* Constructor. |
sl@0 | 78 |
*/ |
sl@0 | 79 |
CCIExtnServerPlugin(); |
sl@0 | 80 |
|
sl@0 | 81 |
/** |
sl@0 | 82 |
* Second phase constructor. |
sl@0 | 83 |
*/ |
sl@0 | 84 |
void ConstructL(); |
sl@0 | 85 |
|
sl@0 | 86 |
/** |
sl@0 | 87 |
* Initializes factory plugins list. |
sl@0 | 88 |
* |
sl@0 | 89 |
* Leaves on error. |
sl@0 | 90 |
*/ |
sl@0 | 91 |
void InitializeMsgHndlrPluginsL(); |
sl@0 | 92 |
|
sl@0 | 93 |
private: |
sl@0 | 94 |
|
sl@0 | 95 |
/** |
sl@0 | 96 |
* Reference to MCustomInterface interface |
sl@0 | 97 |
* Not own. |
sl@0 | 98 |
*/ |
sl@0 | 99 |
MCustomInterface* iMCustomInterface; |
sl@0 | 100 |
|
sl@0 | 101 |
/** |
sl@0 | 102 |
* Reference to MCustomInterface interface |
sl@0 | 103 |
* Not own. |
sl@0 | 104 |
*/ |
sl@0 | 105 |
CIExtnServerPluginWrapper* iCiExtnServerPluginWrapper; |
sl@0 | 106 |
|
sl@0 | 107 |
/** |
sl@0 | 108 |
* Uid of the plugin object passed by the framework via PassDestructorKey() |
sl@0 | 109 |
*/ |
sl@0 | 110 |
TUid iDestructorKey; |
sl@0 | 111 |
|
sl@0 | 112 |
/** |
sl@0 | 113 |
* List of message handler plugins. When framework calls |
sl@0 | 114 |
* HandleMessageL() function, the request will be forwarded to each |
sl@0 | 115 |
* message handler plugin in this list until it is handled. |
sl@0 | 116 |
* |
sl@0 | 117 |
* Own. |
sl@0 | 118 |
*/ |
sl@0 | 119 |
RPointerArray<MCIMsgHndlrIntfc> iMCIMsgHndlrIntfcList; |
sl@0 | 120 |
}; |
sl@0 | 121 |
|
sl@0 | 122 |
#endif // CIEXTNSERVERPLUGIN_H |