obex/obexprotocol/obex/inc/obexpacketsignaller.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef OBEXPACKETSIGNALLER_H
       
    17 #define OBEXPACKETSIGNALLER_H
       
    18 
       
    19 /**
       
    20 @file
       
    21 @internalComponent
       
    22 @released
       
    23 */
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <obexfinalpacketobserver.h>
       
    27 #include <obexreadactivityobserver.h>
       
    28 #include <obex/transport/mobextransportnotify.h>
       
    29 
       
    30 const TUint KObexPacketSignallerInterestingEvents = EObexFinalPacketStarted | EObexFinalPacketFinished | EObexReadActivityDetected;
       
    31 const TUint KObexPacketSignallerInterestingClientEvents = EObexFinalPacketStarted | EObexFinalPacketFinished;
       
    32 
       
    33 /** This class handles packet process events.  
       
    34 
       
    35 Currently the only events handled are those for final packet 
       
    36 notification and read activity.
       
    37 */
       
    38 NONSHARABLE_CLASS(CObexPacketSignaller) : public CActive
       
    39 	{
       
    40 public:
       
    41 	static CObexPacketSignaller* NewL();
       
    42 	virtual ~CObexPacketSignaller();
       
    43 
       
    44 	void SetFinalPacketObserver(MObexFinalPacketObserver* aObserver);
       
    45 	void SetReadActivityObserver(MObexReadActivityObserver* aObserver);
       
    46 	void Signal(TObexPacketProcessEvent aEvent);
       
    47 	
       
    48 private:
       
    49 	CObexPacketSignaller();
       
    50 	
       
    51 	void RunL();
       
    52 	void DoCancel();
       
    53 	
       
    54 	void NotifyObserver(TObexPacketProcessEvent aEvent);
       
    55 
       
    56 private:
       
    57 	MObexFinalPacketObserver* iFinalPacketObserver;
       
    58 	MObexReadActivityObserver* iReadActivityObserver;
       
    59 	TObexPacketProcessEvents iOutstandingEvents;	
       
    60 	};
       
    61 	
       
    62 #endif // OBEXPACKETSIGNALLER_H