email/imap4mtm/imaptransporthandler/inc/minputstreamobserver.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2006-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 __MINPUTSTREAMOBSERVER_H__
       
    17 #define __MINPUTSTREAMOBSERVER_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 
       
    21 /**
       
    22 The MInputStreamObserver class encapsulates an observer on 
       
    23 the input stream.
       
    24 @internalTechnology
       
    25 @prototype
       
    26 */
       
    27 class MInputStreamObserver
       
    28 	{
       
    29 public:	// methods
       
    30 	/**
       
    31 	Indicates to the observer that data has been received from the connected host.
       
    32 	The supplied buffer will remain valid until the input stream is notified
       
    33 	that it is no longer needed.
       
    34 	@param aBuffer A buffer containing the received data.
       
    35 	@post The input stream is in the PendingAck state.
       
    36 	*/
       
    37 	virtual void ReceivedDataIndL(const TDesC8& aBuffer) =0;
       
    38 
       
    39 	/**
       
    40 	Confirms to the observer that a request to upgrade to a secure connection has
       
    41 	completed.
       
    42 	*/
       
    43 	virtual void SecureServerCnf() =0;
       
    44 
       
    45 	/**
       
    46 	Indicates to the observer that the socket connection with the
       
    47 	remote host has been closed. The input stream is no longer valid.
       
    48 	@param aError 	The error code explaining why the socket connection has
       
    49 				  	closed. A value of KErrNone indicates that either the
       
    50 				  	input or output stream observer requested that the 
       
    51 					socket connection be closed.
       
    52 	@post The input stream is in the Closed state and is no longer valid.
       
    53 	*/
       
    54 	virtual void InputStreamCloseInd(TInt aError) =0;
       
    55 	};
       
    56 
       
    57 #endif	// __MINPUTSTREAMOBSERVER_H__