sensorservices/sensorserver/inc/client/sensrvdatahandlerobserver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:  Channel data observer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MSENSRVDATAHANDLEROBSERVER_H
       
    20 #define MSENSRVDATAHANDLEROBSERVER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "sensrvtypes.h"
       
    25 
       
    26 
       
    27 /**
       
    28  *  Channel data observer. Callback interface to indicate when a new data is 
       
    29  *  available.
       
    30  * 
       
    31  *  @lib SensrvClient.lib
       
    32  *  @since S60 5.0  
       
    33  */
       
    34 
       
    35 class MSensrvDataHandlerObserver
       
    36     {
       
    37       public:
       
    38         /**
       
    39         * Indicates data is available in the receiving buffer
       
    40         *
       
    41         * @since S60 5.0
       
    42         * @param aCount Data count in receiving buffer
       
    43         * @param aDataLost Data lost count
       
    44         * @return void
       
    45         */  
       
    46         virtual void DataReceived( TInt aCount, TInt aDataLost ) = 0;
       
    47         
       
    48         /**
       
    49         * Data listening failed. 
       
    50         * If error was fatal, channel has also been closed and sensor server 
       
    51         * session terminated.
       
    52         * If error was minor, some data has potentially been lost.
       
    53         *
       
    54         * @since S60 5.0        
       
    55         * @param aError Error code.
       
    56         * @return void 
       
    57         */
       
    58         virtual void DataError( TSensrvErrorSeverity aError ) = 0;
       
    59         
       
    60         /**
       
    61         * Reopen channel.
       
    62         * Property listening and condition listening need restarting
       
    63         * 
       
    64         * @since S60 5.0        
       
    65         * @param aMaxBufferCount New maximum client buffer count
       
    66         * @return void 
       
    67         */
       
    68         virtual void ReopenChannelForDataListeningL( TInt& aMaxBufferCount ) = 0;
       
    69     };
       
    70 
       
    71 #endif //MSENSRVDATAHANDLEROBSERVER_H