wapstack/wapmessageapi/sws/WapBoundWDP.h
branchRCL_3
changeset 18 50bae5c5c85f
equal deleted inserted replaced
17:3f227a47ad75 18:50bae5c5c85f
       
     1 // Copyright (c) 2003-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 __CSWSWAPBOUNDWDPSERVICE_H__
       
    17 #define __CSWSWAPBOUNDWDPSERVICE_H__
       
    18 
       
    19 // Include definitions of ECOM interfaces for the WAP Messaging API
       
    20 #include <wapmessage.h>
       
    21 #include "WapMessageApiAgent.h"
       
    22 
       
    23 class CSWSWapBoundWDPService : public CWapBoundDatagramService
       
    24 /** 
       
    25 The WAP Messaging API, SWS WAP Stack binding. Implementation of the bound WDP API.
       
    26 @internalComponent
       
    27 @released
       
    28 @since v8.0
       
    29 */
       
    30 {
       
    31 public:
       
    32 	static CSWSWapBoundWDPService* NewL();	
       
    33 	virtual ~CSWSWapBoundWDPService();
       
    34 
       
    35 public:
       
    36 	virtual TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort, TInetAddr aInetAddr);
       
    37 	virtual TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort);
       
    38 	virtual TInt SendTo(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, const TDesC8& aBuffer,Wap::TBearer aBearer);
       
    39 	virtual TInt AwaitRecvDataSize(TPckg<TUint16>& aDataSizePckg, TRequestStatus& aReqStatus);
       
    40 	virtual TInt RecvFrom(TDes8& aRemoteHost, Wap::TPort& aRemotePort, TDes8& aBuffer, TBool& aTruncated, TRequestStatus& aReqStatus, TUint32 aTimeout);
       
    41 	virtual void CancelRecv();
       
    42 	virtual TInt GetLocalPort(Wap::TPort& aPort);
       
    43 	virtual TInt GetLocalAddress(HBufC8*& aLocalHost);
       
    44 	virtual TInt GetBearer(Wap::TBearer& aBearer);
       
    45 	virtual TInt GetDatagramSizes(TUint16& aMaxSize, TUint16& aNominalSize);
       
    46 
       
    47 private:
       
    48 	CSWSWapBoundWDPService();
       
    49 	void ConstructL();
       
    50 
       
    51 private:
       
    52 	/**
       
    53 	the agent instance which actually handles wdp PDU.
       
    54 	*/
       
    55 	CWdpMessageApiAgent* iAgent;
       
    56 };
       
    57 
       
    58 
       
    59 #endif // __CSWSWAPBOUNDWDPSERVICE_H__