dosservices/commondsy/inc/CDSYExtensionDOSServerPlugin.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 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:  Declaration of CCDSYExtensionDOSServerPlugin class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CDSYEXTENSIONDOSSERVERPLUGIN_H
       
    20 #define CDSYEXTENSIONDOSSERVERPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <dosextensionbase.h>
       
    24 
       
    25 
       
    26 // CONSTANTS
       
    27 // MACROS
       
    28 // DATA TYPES
       
    29 // FUNCTION PROTOTYPES
       
    30 // FORWARD DECLARATIONS
       
    31 class CCDSYDOSServerRequestManager;
       
    32 
       
    33 
       
    34 /**
       
    35 *  CCDSYExtensionDOSServerPlugin
       
    36 *  This class implements the CCDSYExtensionDOSServerPlugin
       
    37 */
       
    38 NONSHARABLE_CLASS( CCDSYExtensionDOSServerPlugin ): public CDosExtensionBase
       
    39     {
       
    40     public:                 // Constructor and destructor
       
    41         /**
       
    42         * Destructor.
       
    43         */
       
    44         ~CCDSYExtensionDOSServerPlugin();
       
    45 
       
    46         /**
       
    47         * Creates a new extension plug-in.
       
    48         * @param aCDSYDOSServerRequestManager   The request manager
       
    49         * @return                               The new plug-in
       
    50         */
       
    51         static CCDSYExtensionDOSServerPlugin* NewL( CCDSYDOSServerRequestManager& aCDSYDOSServerRequestManager );
       
    52         
       
    53     protected:              // From Dos plug-in API
       
    54         /**
       
    55         * Implements a raw function call. The implementation interprets the parameters and satisfies the requests.
       
    56         * @param aFunc                  A unique integer among the extended functions identifying the called function.
       
    57         * @param aParameter             A pointer to the function parameter.
       
    58         * @param aParLength             The parameter length.
       
    59         * @param aParameterModified     ETrue if the contents of aParameter have changed, otherwise EFalse. 
       
    60         * @return                       Symbian error code.
       
    61         */
       
    62         TInt CallFunctionL( TInt aFunc, TAny *aParameter, TInt aParLength, TBool& aParameterModified );
       
    63 
       
    64         /**
       
    65         * This is the asynchronous version of CallFunction.
       
    66         * @param aFunc                  A unique integer among the extended functions identifying the called function.
       
    67         * @param aParameter             A pointer to the function parameter.
       
    68         * @param aParLength             The parameter length.
       
    69         * @param aMessage               The message to be completed. Has to be completed by the implementation of the function.
       
    70         * @return                       void 
       
    71         */
       
    72         void CallFunctionAndCompleteL( TInt aFunc, TAny *aParameter, TInt aParLength, const RMessage2& aMessage );
       
    73 
       
    74     private:                // Internal functions
       
    75         /**
       
    76         * Constructor.
       
    77         * @param aCDSYDOSServerRequestManager The request manager
       
    78         */
       
    79         CCDSYExtensionDOSServerPlugin( CCDSYDOSServerRequestManager& aCDSYDOSServerRequestManager );
       
    80 
       
    81         /**
       
    82         * 2nd phase constructor.
       
    83         * @return                       void 
       
    84         */
       
    85         void ConstructL();
       
    86 
       
    87     private:                // Data
       
    88         // The request manager is used to send messages to service logic
       
    89         CCDSYDOSServerRequestManager& iCDSYDOSServerRequestManager;
       
    90 
       
    91         // The extension interface where function calls are delegated to
       
    92         MDosExtensionBaseDSY* iDosExtensionBaseDSY;
       
    93     };
       
    94 
       
    95 
       
    96 
       
    97 #endif //#ifndef CDSYEXTENSIONDOSSERVERPLUGIN_H
       
    98 
       
    99 
       
   100 
       
   101 //  End of File