featuremgmt/featuremgr/src/clientdll/featureclient.h
changeset 0 08ec8eefde2f
child 9 667e88a979d7
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 
       
    21 #ifndef FEATURECLIENT_H
       
    22 #define FEATURECLIENT_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <featmgr/featurecmn.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Feature manager client interface.
       
    32 *
       
    33 */
       
    34 class MFeatureClient
       
    35     {
       
    36     public: // From MFeatureClient
       
    37 
       
    38         /**
       
    39         * Checks if specified feature is supported and returns 
       
    40         * its flags and data if requested.
       
    41         * @param aFeature feature entry
       
    42         * @return Positive (1) if the feature is supported,
       
    43         *         Zero if feature is not supported.
       
    44         *         KErrNotFound if feature not found.
       
    45         *         Otherwise one of the Symbian error codes. 
       
    46         */
       
    47         virtual TInt FeatureSupported( TFeatureEntry& aFeature ) const = 0;
       
    48 
       
    49         /**
       
    50         * Fills feature status array according to status/data in server 
       
    51         * 
       
    52         * @param aFeatures feature entry array
       
    53         * @return KErrNone if no error fetching feature statuses.
       
    54         *         Otherwise one of the Symbian OS error codes.
       
    55         */
       
    56         virtual TInt FeaturesSupported( RFeatureArray& aFeatures ) = 0;
       
    57 
       
    58    		/**
       
    59         * Enables a certain feature.
       
    60         *
       
    61         * @param aFeature Feature ID.
       
    62         * @return   KErrNone if the feature was succesfully enabled.
       
    63         *           KErrAccessDenied if the feature is not modifiable.
       
    64         *           KErrPermissionDenied if a capability check fails.
       
    65         *           Otherwise one of the Symbian error codes. 
       
    66         */
       
    67         virtual TInt EnableFeature( TUid aFeature ) const = 0;
       
    68 
       
    69        /**
       
    70         * Disable a certain feature.
       
    71         *
       
    72         * @param aFeature Feature ID.
       
    73         * @return   KErrNone if the feature was succesfully disabled.
       
    74         *           KErrAccessDenied if the feature is not modifiable.
       
    75         *           KErrPermissionDenied if a capability check fails.
       
    76         *           Otherwise one of the Symbian error codes. 
       
    77         */
       
    78         virtual TInt DisableFeature( TUid aFeature ) const = 0;
       
    79 
       
    80    		/**
       
    81         * Enables or disables a certain feature and sets feature data.
       
    82         *
       
    83         * @param aFeature Feature ID.
       
    84         * @param aEnabled Feature enable or disable.
       
    85         * @param aData Feature data.
       
    86         * @return   KErrNone if the feature was succesfully enabled.
       
    87         *           KErrAccessDenied if the feature is not modifiable.
       
    88         *           KErrPermissionDenied if a capability check fails.
       
    89         *           Otherwise one of the Symbian error codes. 
       
    90         */
       
    91         virtual TInt SetFeature( TUid aFeature, TBool aEnabled, TInt aData ) const = 0;
       
    92 
       
    93    		/**
       
    94         * Sets certain feature's data.
       
    95         *
       
    96         * @param aFeature Feature ID.
       
    97         * @param aData Feature data.
       
    98         * @return   KErrNone if feature data was succesfully set.
       
    99         *           KErrAccessDenied if the feature is not modifiable.
       
   100         *           KErrPermissionDenied if a capability check fails.
       
   101         *           Otherwise one of the Symbian error codes. 
       
   102         */
       
   103         virtual TInt SetFeature( TUid aFeature, TInt aData ) const = 0;
       
   104 
       
   105    		/**
       
   106         * Add a new feature.
       
   107         *
       
   108         * @param aFeature Feature entry.
       
   109         * @return   KErrNone if the feature was succesfully added.
       
   110         *           KErrAccessDenied if the feature is not modifiable.
       
   111         *           KErrPermissionDenied if a capability check fails.
       
   112         *           KErrAlreadyExists if feature already exists.
       
   113         *           Otherwise one of the Symbian error codes. 
       
   114         */
       
   115         virtual TInt AddFeature( TFeatureEntry aEntry ) const = 0;
       
   116 
       
   117    		/**
       
   118         * Delete a feature.
       
   119         *
       
   120         * @param aFeature Feature ID.
       
   121         * @return   KErrNone if the feature was successfully deleted.
       
   122         *           KErrAccessDenied if the feature is not added using AddFeature() method.
       
   123         *           KErrPermissionDenied if a capability check fails.
       
   124         *           KErrNotFound if the feature not found.
       
   125         *           Otherwise one of the Symbian error codes. 
       
   126         */
       
   127         virtual TInt DeleteFeature( TUid aFeature ) const = 0;
       
   128 
       
   129         /**
       
   130         * Lists all supported features.
       
   131         *
       
   132         * @param aSupportedFeatures A reference to a client owned RFeatureUidArray 
       
   133         *           array which will be filled with the IDs of supported features. 
       
   134         * @return  - One of the Symbian error codes.
       
   135         */
       
   136         virtual void ListSupportedFeaturesL( RFeatureUidArray& aSupportedFeatures ) = 0;
       
   137 
       
   138         /**
       
   139         * Requests notification for subset of features changes.
       
   140         *
       
   141         * @param aFeatures Features, from which client requests notification. 
       
   142         * @param aFeatUid Feature id, which will be set by server on completion. 
       
   143         * @param aStatus Client request to be signaled. 
       
   144         * @return  - One of the Symbian error codes.
       
   145         */
       
   146         virtual TInt RequestNotification( RFeatureUidArray& aFeatures, TUid& aFeatUid, 
       
   147             TRequestStatus& aStatus ) = 0;
       
   148 
       
   149         /**
       
   150          * Re-requests notification of a feature change.
       
   151          * 
       
   152          * @param aFeatUid UId of the feature to be re-requested.
       
   153          * @param aStatus Client request to be signalled asynchronously.
       
   154          * @return One of the Symbian OS system-wide error codes.
       
   155          */
       
   156         virtual TInt ReRequestNotification( TUid& aFeatUid, TRequestStatus& aStatus ) = 0;
       
   157         
       
   158         /**
       
   159         * Cancel notification request for single feature's changes.
       
   160         *
       
   161         * @param aFeature Feature, for which client notification cancellation.
       
   162         * @return - One of the Symbian error codes.
       
   163         */
       
   164         virtual TInt RequestNotifyCancel( TUid aFeature ) const = 0;
       
   165 
       
   166         /**
       
   167         * Cancel notification request for all features changes.
       
   168         *
       
   169         * @return  - One of the Symbian error codes.
       
   170         */
       
   171         virtual TInt RequestNotifyCancelAll( ) const = 0;
       
   172 
       
   173     };
       
   174 
       
   175 #endif      // FEATURECLIENT_H
       
   176             
       
   177 // End of File