os/mm/devsoundextensions/ciextnfactoryplugins/ciextnclientplugin/src/ciextnclientplugin.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/ciextnfactoryplugins/ciextnclientplugin/src/ciextnclientplugin.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,114 @@
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 classes implementing devsound client
1.18 +* custom interface extension.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef CIEXTNCLIENTPLUGIN_H
1.25 +#define CIEXTNCLIENTPLUGIN_H
1.26 +
1.27 +// Include files
1.28 +#include <e32base.h>
1.29 +#include <a3f/mmfdevsoundcustominterfaceextensions.h>
1.30 +
1.31 +// Forward declarations
1.32 +class MCIFactoryIntfc;
1.33 +
1.34 +/**
1.35 + * Plugin class implementing DevSound CI client Extension
1.36 + *
1.37 + * An instance of this class is created when DevSound is created. When client
1.38 + * calls CMMFDevSound::CustomInterface() function with UID that is not supported
1.39 + * by platform version of A3F DevSound, the request is then forwarded to this
1.40 + * plugin.
1.41 + *
1.42 + * Only one instance of this plugin can exist in the system.
1.43 + *
1.44 + * This class is intended to be used only by DevSound client implementation.
1.45 + *
1.46 + * @since S60 v3.2
1.47 + *
1.48 + */
1.49 +class CCIExtnClientPlugin : public CBase,
1.50 + public MDevSoundCIClientExtension
1.51 + {
1.52 +public:
1.53 +
1.54 + /**
1.55 + * Two-phased constructor.
1.56 + * Called by ECom framework.
1.57 + */
1.58 + static MDevSoundCIClientExtension* NewL();
1.59 +
1.60 + /**
1.61 + * Destructor.
1.62 + */
1.63 + ~CCIExtnClientPlugin();
1.64 +
1.65 + // From MDevSoundCIClientExtension begins
1.66 + // Called by framework when plugin is constructed
1.67 + TInt Setup( MCustomCommand& aCustomCommand );
1.68 + // Called by framework forwarding request to create a custom interface
1.69 + TInt CustomInterfaceExtension( TUid aUid, TAny*& aInterface );
1.70 + // Called by framework when plugin is to be deleted
1.71 + void Release();
1.72 + // Called by framework after plugin is created
1.73 + void PassDestructorKey( TUid aDestructorKey );
1.74 + // From MDevSoundCIClientExtension ends
1.75 +
1.76 +private:
1.77 + /**
1.78 + * Constructor.
1.79 + */
1.80 + CCIExtnClientPlugin();
1.81 +
1.82 + /**
1.83 + * Second phase constructor.
1.84 + */
1.85 + void ConstructL();
1.86 +
1.87 + /**
1.88 + * Initializes factory plugins list.
1.89 + *
1.90 + * Leaves on error.
1.91 + */
1.92 + void InitializeFactoryPluginsL();
1.93 +
1.94 +private:
1.95 +
1.96 + /**
1.97 + * Reference to MCustomCommand interface
1.98 + * Not own.
1.99 + */
1.100 + MCustomCommand* iMCustomCommand;
1.101 +
1.102 + /**
1.103 + * Uid of the plugin object passed by the framework via PassDestructorKey()
1.104 + */
1.105 + TUid iDestructorKey;
1.106 +
1.107 + /**
1.108 + * List of factory plugins. When framework calls
1.109 + * CustomInterfaceExtension() function, the request will be forwarded to each
1.110 + * factory plugin in this list until it is handled.
1.111 + *
1.112 + * Own.
1.113 + */
1.114 + RPointerArray<MCIFactoryIntfc> iMCIFactoryIntfcList;
1.115 + };
1.116 +
1.117 +#endif // CIEXTNCLIENTPLUGIN_H