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.
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 classes implementing devsound client
sl@0
    15
*                custom interface extension.
sl@0
    16
*
sl@0
    17
*/
sl@0
    18
sl@0
    19
sl@0
    20
sl@0
    21
#ifndef CIEXTNCLIENTPLUGIN_H
sl@0
    22
#define CIEXTNCLIENTPLUGIN_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
sl@0
    28
// Forward declarations
sl@0
    29
class MCIFactoryIntfc;
sl@0
    30
sl@0
    31
/**
sl@0
    32
 *  Plugin class implementing DevSound CI client Extension
sl@0
    33
 *
sl@0
    34
 *  An instance of this class is created when DevSound is created. When client
sl@0
    35
 *  calls CMMFDevSound::CustomInterface() function with UID that is not supported
sl@0
    36
 *  by platform version of A3F DevSound, the request is then forwarded to this
sl@0
    37
 *  plugin.
sl@0
    38
 *
sl@0
    39
 *  Only one instance of this plugin can exist in the system.
sl@0
    40
 *
sl@0
    41
 *  This class is intended to be used only by DevSound client implementation.
sl@0
    42
 *
sl@0
    43
 *  @since S60 v3.2
sl@0
    44
 *
sl@0
    45
 */
sl@0
    46
class CCIExtnClientPlugin : public CBase,
sl@0
    47
                            public MDevSoundCIClientExtension
sl@0
    48
    {
sl@0
    49
public:
sl@0
    50
sl@0
    51
    /**
sl@0
    52
     * Two-phased constructor.
sl@0
    53
     * Called by ECom framework.
sl@0
    54
     */
sl@0
    55
    static MDevSoundCIClientExtension* NewL();
sl@0
    56
sl@0
    57
    /**
sl@0
    58
    * Destructor.
sl@0
    59
    */
sl@0
    60
    ~CCIExtnClientPlugin();
sl@0
    61
sl@0
    62
    // From MDevSoundCIClientExtension begins
sl@0
    63
    // Called by framework when plugin is constructed
sl@0
    64
    TInt Setup( MCustomCommand& aCustomCommand );
sl@0
    65
    // Called by framework forwarding request to create a custom interface
sl@0
    66
    TInt CustomInterfaceExtension( TUid aUid, TAny*& aInterface );
sl@0
    67
    // Called by framework when plugin is to be deleted
sl@0
    68
    void Release();
sl@0
    69
    // Called by framework after plugin is created
sl@0
    70
    void PassDestructorKey( TUid aDestructorKey );
sl@0
    71
    // From MDevSoundCIClientExtension ends
sl@0
    72
sl@0
    73
private:
sl@0
    74
    /**
sl@0
    75
     * Constructor.
sl@0
    76
     */
sl@0
    77
    CCIExtnClientPlugin();
sl@0
    78
sl@0
    79
    /**
sl@0
    80
     * Second phase constructor.
sl@0
    81
     */
sl@0
    82
    void ConstructL();
sl@0
    83
sl@0
    84
    /**
sl@0
    85
     * Initializes factory plugins list.
sl@0
    86
     *
sl@0
    87
     * Leaves on error.
sl@0
    88
     */
sl@0
    89
    void InitializeFactoryPluginsL();
sl@0
    90
sl@0
    91
private:
sl@0
    92
sl@0
    93
    /**
sl@0
    94
     * Reference to MCustomCommand interface
sl@0
    95
     * Not own.
sl@0
    96
     */
sl@0
    97
    MCustomCommand*                 iMCustomCommand;
sl@0
    98
sl@0
    99
    /**
sl@0
   100
     * Uid of the plugin object passed by the framework via PassDestructorKey()
sl@0
   101
     */
sl@0
   102
    TUid                            iDestructorKey;
sl@0
   103
sl@0
   104
    /**
sl@0
   105
     * List of factory plugins. When framework calls
sl@0
   106
     * CustomInterfaceExtension() function, the request will be forwarded to each
sl@0
   107
     * factory plugin in this list until it is handled.
sl@0
   108
     *
sl@0
   109
     * Own.
sl@0
   110
     */
sl@0
   111
      RPointerArray<MCIFactoryIntfc>  iMCIFactoryIntfcList;
sl@0
   112
    };
sl@0
   113
sl@0
   114
#endif // CIEXTNCLIENTPLUGIN_H