Msrp/MsrpServer/src/CMSRPScheduler.cpp
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 // CLASS HEADER
       
    18 #include "CMSRPScheduler.h"
       
    19 
       
    20 // INTERNAL INCLUDES
       
    21 #include "MSRPCommon.h"
       
    22 #include "CMSRPServer.h"
       
    23 
       
    24 // ================= MEMBER FUNCTIONS ==========================================
       
    25 
       
    26 // The class constructor.
       
    27 CMSRPScheduler::CMSRPScheduler()
       
    28     {
       
    29     MSRPLOG( "CMSRPScheduler: CMSRPScheduler::CMSRPScheduler()" )
       
    30     }
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CMSRPScheduler::SetServer
       
    34 // Gives a pointer of the current CMSRPServer instance to the scheduler.
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 void CMSRPScheduler::SetServer( CMSRPServer* aServer )
       
    38     {
       
    39     MSRPLOG( "CMSRPScheduler::SetServer enter" )
       
    40     iServer = aServer;
       
    41     MSRPLOG( "CMSRPScheduler::SetServer exit" )
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CMSRPScheduler::Error
       
    46 // Overridden to handle leaves in request functions and unexpected situations.
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 void CMSRPScheduler::Error( TInt /*aError*/ ) const
       
    50     {
       
    51     MSRPLOG( "CMSRPScheduler: CMSRPScheduler::Error enter" )
       
    52     if ( iServer->IsActive() )
       
    53         {
       
    54         __DEBUGGER()
       
    55         }
       
    56     else
       
    57         {
       
    58         // Relay the error code to the client and restart the server.
       
    59         iServer->ReStart();
       
    60         }
       
    61     MSRPLOG( "CMSRPScheduler: CMSRPScheduler::Error exit" )
       
    62     }
       
    63 
       
    64 //  End of File