resourcemgmt/hwresourcesmgr/server/plugininc/HWRMTargetModifierPlugin.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2006-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 * This file contains the class declaration for the target modifier plugin API.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @publishedPartner
       
    25  @released
       
    26 */
       
    27 
       
    28 
       
    29 
       
    30 #ifndef HWRMTARGETMODIFIERPLUGIN_H
       
    31 #define HWRMTARGETMODIFIERPLUGIN_H
       
    32 
       
    33 #include <e32base.h>
       
    34 
       
    35 /** ECOM Target modifier plugin interface UID. 
       
    36 @publishedPartner
       
    37 @released
       
    38 */
       
    39 const TUid KHWRMTargetModifierPluginInterfaceUid = { 0x10281B99 };
       
    40 
       
    41 /**
       
    42 *  Plugin interface class to be implemented by customers.
       
    43 *  Responsible for modifying targets
       
    44 @publishedPartner
       
    45 @released
       
    46 */
       
    47 class CHWRMTargetModifierPlugin : public CBase
       
    48     {
       
    49     public:  // construction and destruction
       
    50     
       
    51         /**
       
    52         * Constructor method for instance.
       
    53         * Uses ECom to find an instance. 
       
    54         *
       
    55         * @param aMatch Determines the API that the loaded plugin implements.
       
    56         *               Same match value is used to find target modifier plugin 
       
    57         *                as is used to find corresponding HWRM plugin service.
       
    58         * @return New CHWRMTargetModifierPlugin instance.
       
    59         * @leave Standard Symbian leaves.
       
    60         */
       
    61         inline static CHWRMTargetModifierPlugin* NewL(const TDesC8& aMatch);
       
    62 
       
    63         /**
       
    64         * Destructor
       
    65         */
       
    66         inline virtual ~CHWRMTargetModifierPlugin();       
       
    67 
       
    68 
       
    69     public:
       
    70         /**
       
    71         * Method to modify target according to customer specific needs by removing
       
    72         * currently inactive (i.e. covered or otherwise hidden or just not active for
       
    73         * other reasons) targets from supplied mask. 
       
    74         * 
       
    75         * Modifying target must be restricted to removing unsupported elements from 
       
    76         * the supplied target. Adding new targets will result in problems with reservation
       
    77         * handling and is therefore not supported.
       
    78         *
       
    79         * @param aTarget            Target mask to be modified.
       
    80         * @return Modified target   If the returned target is empty, the related command will
       
    81         *                            complete with success but without any actual effect.
       
    82         *
       
    83         * @leave KErrNotSupported if supplied target mask contains currently illegal targets
       
    84         *             and cannot for some reason be modified so that modified mask would
       
    85         *             contain only legal (or no) targets. This might be desirable functionality
       
    86         *             with some product specific custom targets. Target masks containing only 
       
    87         *             system targets should never cause a leave.
       
    88         */
       
    89         virtual TInt ModifyTargetL(TInt aTarget) = 0;
       
    90 
       
    91         /**
       
    92         * Method to get full system target mask, including system targets that are
       
    93         * currently unavailable.
       
    94         * This is called only once during initialization per plugin.        
       
    95         *
       
    96         * @return All targets that are considered system targets.
       
    97         */
       
    98         virtual TInt GetFullSystemTarget() = 0;
       
    99 
       
   100 
       
   101    protected:
       
   102    
       
   103         /**
       
   104         * Destructor identifier to be used with ECom framework.
       
   105         */
       
   106         TUid iDestructorIDKey;
       
   107     };
       
   108 
       
   109 #include <hwrm/hwrmtargetmodifierplugin.inl>
       
   110 
       
   111 #endif      // HWRMTARGETMODIFIERPLUGIN_H   
       
   112             
       
   113 // End of File