usbengines/usbwatcher/src/cusbwatcherscheduler.cpp
changeset 0 1e05558e2206
equal deleted inserted replaced
-1:000000000000 0:1e05558e2206
       
     1 /*
       
     2 * Copyright (c) 2002-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:  This class reports possible scheduling errors to server.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cusbwatcherscheduler.h"
       
    20 #include "cusbwatcherserver.h"
       
    21 #include "debug.h"
       
    22 
       
    23 // ----------------------------------------------------------------------------
       
    24 // Symbian two-phase constructor
       
    25 // ----------------------------------------------------------------------------
       
    26 //
       
    27 CUsbWatcherScheduler* CUsbWatcherScheduler::NewL()
       
    28     {
       
    29     LOG_FUNC
       
    30 
       
    31     CUsbWatcherScheduler* self = new( ELeave ) CUsbWatcherScheduler;
       
    32     return self;
       
    33     }
       
    34 
       
    35 // ----------------------------------------------------------------------------
       
    36 // Destructor
       
    37 // ----------------------------------------------------------------------------
       
    38 //
       
    39 CUsbWatcherScheduler::~CUsbWatcherScheduler()
       
    40     {
       
    41     LOG_FUNC
       
    42 
       
    43     }
       
    44 
       
    45 // ----------------------------------------------------------------------------
       
    46 // Set server
       
    47 // ----------------------------------------------------------------------------
       
    48 //
       
    49 void CUsbWatcherScheduler::SetServer( CUsbWatcherServer& aServer )
       
    50     {
       
    51     LOG_FUNC
       
    52 
       
    53     iServer = &aServer;
       
    54     }
       
    55 
       
    56 // ----------------------------------------------------------------------------
       
    57 // Error handle
       
    58 // ----------------------------------------------------------------------------
       
    59 //
       
    60 void CUsbWatcherScheduler::Error( TInt aError ) const
       
    61     {
       
    62     LOG_FUNC
       
    63 
       
    64     LOG1( "aError = %d", aError );
       
    65     if (iServer)
       
    66         {
       
    67         iServer->Error( aError );
       
    68         }
       
    69     }
       
    70 
       
    71 // End of file