44
|
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 __CSWSWAPFULLYSPECWDPSERVICE_H__
|
|
17 |
#define __CSWSWAPFULLYSPECWDPSERVICE_H__
|
|
18 |
|
|
19 |
// Include definitions of ECOM interfaces for the WAP Messaging API
|
|
20 |
#include <wapmessage.h>
|
|
21 |
#include "WapMessageApiAgent.h"
|
|
22 |
|
|
23 |
class CSWSWapFullySpecWDPService : public CWapFullySpecDatagramService
|
|
24 |
/**
|
|
25 |
The WAP Messaging API, SWS WAP Stack binding. Implementation of the Fully-Specified WDP API.
|
|
26 |
@internalComponent
|
|
27 |
@released
|
|
28 |
@since v8.0
|
|
29 |
*/
|
|
30 |
{
|
|
31 |
public:
|
|
32 |
static CSWSWapFullySpecWDPService* NewL();
|
|
33 |
virtual ~CSWSWapFullySpecWDPService();
|
|
34 |
|
|
35 |
public:
|
|
36 |
virtual TInt Connect(const TDesC8& aRemoteHost,
|
|
37 |
Wap::TPort aRemotePort,
|
|
38 |
Wap::TBearer aBearer,
|
|
39 |
TInetAddr aInetAddr);
|
|
40 |
virtual TInt Connect(const TDesC8& aRemoteHost,
|
|
41 |
Wap::TPort aRemotePort,
|
|
42 |
Wap::TBearer aBearer);
|
|
43 |
virtual TInt Send(const TDesC8& aBuffer);
|
|
44 |
virtual TInt AwaitRecvDataSize(TPckg<TUint16>& aDataSizePckg, TRequestStatus& aReqStatus);
|
|
45 |
virtual TInt Recv(TDes8& aBuffer,
|
|
46 |
TBool& aTruncated,
|
|
47 |
TRequestStatus& aReqStatus,
|
|
48 |
TUint32 aTimeout);
|
|
49 |
virtual void CancelRecv();
|
|
50 |
virtual TInt GetLocalPort(Wap::TPort& aPort);
|
|
51 |
virtual TInt GetLocalAddress(HBufC8*& aLocalHost);
|
|
52 |
virtual TInt GetDatagramSizes(TUint16& aMaxSize, TUint16& aNominalSize);
|
|
53 |
|
|
54 |
private:
|
|
55 |
CSWSWapFullySpecWDPService();
|
|
56 |
void ConstructL();
|
|
57 |
|
|
58 |
private:
|
|
59 |
/**
|
|
60 |
the agent instance which actually handles wdp PDU.
|
|
61 |
*/
|
|
62 |
CWdpMessageApiAgent* iAgent;
|
|
63 |
/**
|
|
64 |
the remote host name.
|
|
65 |
*/
|
|
66 |
TBuf8<KMaxSockAddrSize> iHostName;
|
|
67 |
/**
|
|
68 |
the remote port
|
|
69 |
*/
|
|
70 |
Wap::TPort iPort;
|
|
71 |
};
|
|
72 |
|
|
73 |
#endif // __CSWSWAPFULLYSPECWDPSERVICE_H__
|