os/mm/devsoundextensions/ciextnfactoryplugins/ciextnclientplugin/src/ciextnclientplugin.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 classes implementing devsound client
    15 *                custom interface extension.
    16 *
    17 */
    18 
    19 
    20 
    21 #ifndef CIEXTNCLIENTPLUGIN_H
    22 #define CIEXTNCLIENTPLUGIN_H
    23 
    24 // Include files
    25 #include <e32base.h>
    26 #include <a3f/mmfdevsoundcustominterfaceextensions.h>
    27 
    28 // Forward declarations
    29 class MCIFactoryIntfc;
    30 
    31 /**
    32  *  Plugin class implementing DevSound CI client Extension
    33  *
    34  *  An instance of this class is created when DevSound is created. When client
    35  *  calls CMMFDevSound::CustomInterface() function with UID that is not supported
    36  *  by platform version of A3F DevSound, the request is then forwarded to this
    37  *  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 client implementation.
    42  *
    43  *  @since S60 v3.2
    44  *
    45  */
    46 class CCIExtnClientPlugin : public CBase,
    47                             public MDevSoundCIClientExtension
    48     {
    49 public:
    50 
    51     /**
    52      * Two-phased constructor.
    53      * Called by ECom framework.
    54      */
    55     static MDevSoundCIClientExtension* NewL();
    56 
    57     /**
    58     * Destructor.
    59     */
    60     ~CCIExtnClientPlugin();
    61 
    62     // From MDevSoundCIClientExtension begins
    63     // Called by framework when plugin is constructed
    64     TInt Setup( MCustomCommand& aCustomCommand );
    65     // Called by framework forwarding request to create a custom interface
    66     TInt CustomInterfaceExtension( TUid aUid, TAny*& aInterface );
    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      * Constructor.
    76      */
    77     CCIExtnClientPlugin();
    78 
    79     /**
    80      * Second phase constructor.
    81      */
    82     void ConstructL();
    83 
    84     /**
    85      * Initializes factory plugins list.
    86      *
    87      * Leaves on error.
    88      */
    89     void InitializeFactoryPluginsL();
    90 
    91 private:
    92 
    93     /**
    94      * Reference to MCustomCommand interface
    95      * Not own.
    96      */
    97     MCustomCommand*                 iMCustomCommand;
    98 
    99     /**
   100      * Uid of the plugin object passed by the framework via PassDestructorKey()
   101      */
   102     TUid                            iDestructorKey;
   103 
   104     /**
   105      * List of factory plugins. When framework calls
   106      * CustomInterfaceExtension() function, the request will be forwarded to each
   107      * factory plugin in this list until it is handled.
   108      *
   109      * Own.
   110      */
   111       RPointerArray<MCIFactoryIntfc>  iMCIFactoryIntfcList;
   112     };
   113 
   114 #endif // CIEXTNCLIENTPLUGIN_H