wapstack/wapmessageapi/sws/WapFullySpecWDP.h
author hgs
Mon, 19 Jul 2010 14:53:33 +0100
changeset 52 60785a088077
parent 44 8b72faa1200f
permissions -rw-r--r--
201025_04
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
#ifndef __CSWSWAPFULLYSPECWDPSERVICE_H__
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
#define __CSWSWAPFULLYSPECWDPSERVICE_H__
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
// Include definitions of ECOM interfaces for the WAP Messaging API
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
#include <wapmessage.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
#include "WapMessageApiAgent.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
class CSWSWapFullySpecWDPService : public CWapFullySpecDatagramService
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
/** 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
The WAP Messaging API, SWS WAP Stack binding.  Implementation of the Fully-Specified WDP API.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
@internalComponent
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
@released
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
@since v8.0
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
public:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
	static CSWSWapFullySpecWDPService* NewL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
	virtual ~CSWSWapFullySpecWDPService();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
public:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
	virtual TInt Connect(const TDesC8& aRemoteHost,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
						 Wap::TPort aRemotePort,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
						 Wap::TBearer aBearer,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
						 TInetAddr aInetAddr);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
	virtual TInt Connect(const TDesC8& aRemoteHost,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
						 Wap::TPort aRemotePort,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
						 Wap::TBearer aBearer);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
	virtual TInt Send(const TDesC8& aBuffer);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
	virtual TInt AwaitRecvDataSize(TPckg<TUint16>& aDataSizePckg, TRequestStatus& aReqStatus);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	virtual TInt Recv(TDes8& aBuffer,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
					  TBool& aTruncated,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
					  TRequestStatus& aReqStatus,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
					  TUint32 aTimeout);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	virtual void CancelRecv();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
	virtual TInt GetLocalPort(Wap::TPort& aPort);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
	virtual TInt GetLocalAddress(HBufC8*& aLocalHost);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
	virtual TInt GetDatagramSizes(TUint16& aMaxSize, TUint16& aNominalSize);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
	CSWSWapFullySpecWDPService();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
	void ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
private:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
	the agent instance which actually handles wdp PDU.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
	*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
	CWdpMessageApiAgent* iAgent;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
	/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
	the remote host name.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
	*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
	TBuf8<KMaxSockAddrSize> iHostName;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
	/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
	the remote port
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
	*/
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
	Wap::TPort iPort;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
};
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
#endif // __CSWSWAPFULLYSPECWDPSERVICE_H__