os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/src/ciextnserverplugin.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/src/ciextnserverplugin.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,122 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Header definition of plugin class implementing devsound server
1.18 +* side custom interface extension.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef CIEXTNSERVERPLUGIN_H
1.25 +#define CIEXTNSERVERPLUGIN_H
1.26 +
1.27 +// Include files
1.28 +#include <e32base.h>
1.29 +#include <a3f/mmfdevsoundcustominterfaceextensions.h>
1.30 +#include "ciextnserverpluginwrapper.h"
1.31 +
1.32 +// Forward declarations
1.33 +class MCustomInterface;
1.34 +class MCIMsgHndlrIntfc;
1.35 +
1.36 +/**
1.37 + * Plugin class implementing DevSound CI server Extension
1.38 + *
1.39 + * An instance of this class is created when DevSound Session is created. When
1.40 + * DevSound session object receives a RMmfIpcMessage that cannot be handled, the
1.41 + * message is forwarded to this plugin.
1.42 + *
1.43 + * Only one instance of this plugin can exist in the system.
1.44 + *
1.45 + * This class is intended to be used only by DevSound Session implementation.
1.46 + *
1.47 + * @since S60 v3.2
1.48 + *
1.49 + */
1.50 +class CCIExtnServerPlugin : public CBase,
1.51 + public MDevSoundCIServerExtension
1.52 + {
1.53 +public:
1.54 +
1.55 + /**
1.56 + * Two-phased constructor.
1.57 + * Called by ECom framework.
1.58 + */
1.59 + static MDevSoundCIServerExtension* NewL();
1.60 +
1.61 + /**
1.62 + * Destructor.
1.63 + */
1.64 + ~CCIExtnServerPlugin();
1.65 +
1.66 + // From MDevSoundCIServerExtension begins
1.67 + // Called by framework when plugin is constructed
1.68 + TInt Setup( MCustomInterface& aInterface );
1.69 + // Called by framework passing aMessage to handle
1.70 + TInt HandleMessageL(const RMmfIpcMessage& aMessage);
1.71 + // Called by framework when plugin is to be deleted
1.72 + void Release();
1.73 + // Called by framework after plugin is created
1.74 + void PassDestructorKey( TUid aDestructorKey );
1.75 + // From MDevSoundCIClientExtension ends
1.76 +
1.77 +private:
1.78 +
1.79 + /**
1.80 + * Constructor.
1.81 + */
1.82 + CCIExtnServerPlugin();
1.83 +
1.84 + /**
1.85 + * Second phase constructor.
1.86 + */
1.87 + void ConstructL();
1.88 +
1.89 + /**
1.90 + * Initializes factory plugins list.
1.91 + *
1.92 + * Leaves on error.
1.93 + */
1.94 + void InitializeMsgHndlrPluginsL();
1.95 +
1.96 +private:
1.97 +
1.98 + /**
1.99 + * Reference to MCustomInterface interface
1.100 + * Not own.
1.101 + */
1.102 + MCustomInterface* iMCustomInterface;
1.103 +
1.104 + /**
1.105 + * Reference to MCustomInterface interface
1.106 + * Not own.
1.107 + */
1.108 + CIExtnServerPluginWrapper* iCiExtnServerPluginWrapper;
1.109 +
1.110 + /**
1.111 + * Uid of the plugin object passed by the framework via PassDestructorKey()
1.112 + */
1.113 + TUid iDestructorKey;
1.114 +
1.115 + /**
1.116 + * List of message handler plugins. When framework calls
1.117 + * HandleMessageL() function, the request will be forwarded to each
1.118 + * message handler plugin in this list until it is handled.
1.119 + *
1.120 + * Own.
1.121 + */
1.122 + RPointerArray<MCIMsgHndlrIntfc> iMCIMsgHndlrIntfcList;
1.123 + };
1.124 +
1.125 +#endif // CIEXTNSERVERPLUGIN_H