featuremgmt/featuremgr/src/serverexe/featmgrpluginhandler.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef FEATMGRPLUGINHANDLER_H
       
    21 #define FEATMGRPLUGINHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <featmgr/featureinfoplugin.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CFeatMgrServer;
       
    29 
       
    30 // CLASS DECLARATIONS
       
    31     
       
    32 /**
       
    33 *  Feature Manager server side plugin
       
    34 *  handler implementation.
       
    35 *
       
    36 */
       
    37 NONSHARABLE_CLASS(CFeatMgrPluginHandler) : 
       
    38     public CBase,
       
    39     public MFeatureInfoPluginCallback
       
    40     {
       
    41     public: // Constructors and Destructor
       
    42     
       
    43         /**
       
    44         * Constructor method for instance.
       
    45         *
       
    46         * @param aImplementationUid Determines the plugin that 
       
    47         *                           the loaded plugin implements.
       
    48         * @param aServer            Reference to the Feature Manager Server
       
    49         */
       
    50         static CFeatMgrPluginHandler* NewL(TUid aImplementationUid, 
       
    51                                            CFeatMgrServer& aServer);
       
    52         
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CFeatMgrPluginHandler();
       
    57     
       
    58         /**
       
    59         * Method used to send command for plugin.
       
    60         *
       
    61         * @param aCommandId Command identifier
       
    62         */
       
    63         void SendCommandL( FeatureInfoCommand::TFeatureInfoCmd aCommandId );
       
    64     
       
    65     public: // New functions
       
    66    	
       
    67     	// MFeatureInfoPluginCallback callback methods
       
    68     	
       
    69         /**
       
    70         * Method to return data in response to a message from a Feature Manager plugin.
       
    71         *
       
    72         * @param aCommandId Command identifier
       
    73         * @param aTransId   Unique transcation identifier
       
    74         * @param aData      Data returned from call
       
    75         */
       
    76         void ProcessResponseL( FeatureInfoCommand::TFeatureInfoCmd aCommandId,
       
    77                                TUint8 aTransId, 
       
    78                                TDesC8& aData ); 
       
    79                                                         	
       
    80 
       
    81     private: 
       
    82     
       
    83         /**
       
    84         * C++ default constructor.
       
    85         */
       
    86         CFeatMgrPluginHandler( CFeatMgrServer& aServer );
       
    87         
       
    88         /**
       
    89         * This 2nd phase constructor.
       
    90         */
       
    91         void ConstructL( TUid aImplementationUid );
       
    92         
       
    93         /**
       
    94         * Processing of features with (supported-)value.
       
    95         */
       
    96         void ProcessFeatureInfoL( RArray<FeatureInfoCommand::TFeature>& aList, 
       
    97             FeatureInfoCommand::TFeatureInfoRespPckg aResponse );
       
    98         
       
    99         /**
       
   100         * Processing of features with flags and data.
       
   101         */
       
   102         void ProcessFeatureInfoL( RFeatureArray& aList, 
       
   103             FeatureInfoCommand::TEnhancedFeatureInfoRespPckg aResponse );
       
   104         
       
   105 	private:   // data
       
   106 	
       
   107 	    CFeatureInfoPlugin*                 iPlugin;    // Pointer to plugin 
       
   108 	    CFeatMgrServer&                     iServer;    // Server reference.
       
   109 	    TUint8                              iTransId;   // Transaction id, for future use.
       
   110         FeatureInfoCommand::TFeatureInfoCmd iCommandId; // Command id	     
       
   111     };
       
   112 
       
   113 #endif  // FEATMGRPLUGINHANDLER_H
       
   114             
       
   115 // End of File