obex/obexprotocol/obextransport/public/ObexWriterBase.h
changeset 57 f6055a57ae18
parent 0 d0791faffa3f
equal deleted inserted replaced
54:4dc88a4ac6f4 57:f6055a57ae18
       
     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 __OBEXWRITERBASE_H__
       
    17 #define __OBEXWRITERBASE_H__
       
    18 
       
    19 #include <obex/internal/obexactiverw.h>
       
    20 
       
    21 /**
       
    22 @file
       
    23 @publishedPartner
       
    24 @released
       
    25 */
       
    26 
       
    27 /**
       
    28 CObexWriterBase provides obex specific writer behaviour for concrete writers to use.  
       
    29 Derive from this class when providing a writer for a specific transport.  
       
    30 
       
    31 In a concrete writer the following things must be done:
       
    32 (a)In DoTransfer a write transfer is issued over the writer's transport
       
    33 (b)The NewL function must call BaseConstructL().  This is future proofing in the event that the iFuture1 variable is used
       
    34 and requires initialisation
       
    35 */
       
    36 class CObexWriterBase : public CObexActiveRW
       
    37 	{
       
    38 public:
       
    39 	IMPORT_C virtual ~CObexWriterBase();
       
    40 
       
    41 protected:
       
    42 	IMPORT_C CObexWriterBase(TPriority aPriority, MObexTransportNotify& aOwner, TObexConnectionInfo& aInfo);
       
    43 	IMPORT_C void BaseConstructL();
       
    44 
       
    45 protected: // from CObexActiveRW
       
    46 	IMPORT_C virtual TBool CompleteTransfer();
       
    47 	IMPORT_C virtual void OnCompleteTransfer();
       
    48 	IMPORT_C virtual void StartTransfer(CObexPacket& aPacket);
       
    49 	IMPORT_C virtual TInt Remaining();
       
    50 	/**
       
    51 	This method issues a write of data over the relevant transport object.
       
    52 	@see NewRequest
       
    53 	*/
       
    54 	virtual void DoTransfer () =0;
       
    55 
       
    56 	//ExtensionPattern
       
    57 	IMPORT_C virtual TAny* GetInterface(TUid aUid);
       
    58 
       
    59 protected: // owned
       
    60 	// For future data expansion
       
    61 	TAny* iFuture1;
       
    62 	};
       
    63 
       
    64 #endif // __OBEXWRITERBASE_H__