Msrp/MsrpServer/inc/CMSRPScheduler.h
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
equal deleted inserted replaced
22:f1578314b8da 25:505ad3f0ce5c
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 * Contributors:
       
    11 *
       
    12 * Description:
       
    13 * MSRP Implementation
       
    14 *
       
    15 */
       
    16 
       
    17 #ifndef CMSRPSCHEDULER_H
       
    18 #define CMSRPSCHEDULER_H
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <e32base.h>
       
    22 
       
    23 // FORWARD DECLARATIONS
       
    24 class CMSRPServer;
       
    25 
       
    26 //  CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *  MSRP Server includes a scheduler of it's own to simplify
       
    30 *  client request handling code. All active object leaves are
       
    31 *  handled in function Error(). The behaviour of Error()
       
    32 *  depends on whether there is an outstanding client request
       
    33 *  or not: it will tell the client the reason for inability
       
    34 *  to handle the client request. It will also panic the
       
    35 *  client if the descriptor passed to the server was malformed.
       
    36 *  Finally, a panic is raised if the error does not originate
       
    37 *  from the server itself.
       
    38 */
       
    39 
       
    40 class CMSRPScheduler : public CActiveScheduler
       
    41     {
       
    42     public: // Constructors
       
    43 
       
    44         /**
       
    45         *   Default constructor
       
    46         */
       
    47         CMSRPScheduler();
       
    48 
       
    49         /**
       
    50         *   Gives a pointer of the current CMSRPServer instance
       
    51         *   to the scheduler.
       
    52         *   @param aServer The current server pointer
       
    53         */
       
    54         void SetServer( CMSRPServer* aServer );
       
    55 
       
    56     public:     // from CActiveScheduler
       
    57 
       
    58         /**
       
    59         *   Overridden to handle leaves in request functions and
       
    60         *   unexpected situations.
       
    61         *   @param aError Error code, see EPOC system documentation.
       
    62         */
       
    63         void Error( TInt aError ) const;
       
    64 
       
    65     private:    // data
       
    66 
       
    67         // server instance
       
    68         CMSRPServer* iServer;
       
    69     };
       
    70 
       
    71 #endif          // CMSRPSCHEDULER_H
       
    72 
       
    73 // End of File