author | Pat Downey <patd@symbian.org> |
Tue, 13 Jul 2010 14:53:59 +0100 | |
branch | RCL_3 |
changeset 50 | 2ac16fe2d995 |
parent 18 | 50bae5c5c85f |
permissions | -rw-r--r-- |
18
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
7 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
10 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
12 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
14 |
// |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
15 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
16 |
#include "WapFullySpecWDP.h" |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
17 |
#include "WapMsgUtils.h" |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
18 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
19 |
CSWSWapFullySpecWDPService* CSWSWapFullySpecWDPService::NewL() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
20 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
21 |
Static new function |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
22 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
23 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
24 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
25 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
26 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
27 |
CSWSWapFullySpecWDPService* me = new(ELeave)CSWSWapFullySpecWDPService(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
28 |
CleanupStack::PushL(me); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
29 |
me->ConstructL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
30 |
CleanupStack::Pop(me); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
31 |
return me; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
32 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
33 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
34 |
CSWSWapFullySpecWDPService::CSWSWapFullySpecWDPService() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
35 |
: CWapFullySpecDatagramService() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
36 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
37 |
Constructor |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
38 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
39 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
40 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
41 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
42 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
43 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
44 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
45 |
CSWSWapFullySpecWDPService::~CSWSWapFullySpecWDPService() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
46 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
47 |
Destructor |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
48 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
49 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
50 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
51 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
52 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
53 |
delete iAgent; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
54 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
55 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
56 |
void CSWSWapFullySpecWDPService::ConstructL() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
57 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
58 |
Second Phase Constructor |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
59 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
60 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
61 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
62 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
63 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
64 |
// Parent class construction |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
65 |
CWapFullySpecDatagramService::ConstructL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
66 |
iAgent=CWdpMessageApiAgent::NewL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
67 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
68 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
69 |
TInt CSWSWapFullySpecWDPService::Connect(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, Wap::TBearer aBearer, TInetAddr /*aInetAddr*/) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
70 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
71 |
Connect to the SWS, opening an endpoint which is to be used only with a single, named remote host.All CWapFullySpecDatagramService implementaions must automatically close this endpoint upon destruction. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
72 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
73 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
74 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
75 |
@param aRemoteHost (in) the bearer-dependent address of the remote host with which the data will be exchanged |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
76 |
@param aRemotePort (in) the port on the remote host to which data will be sent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
77 |
@param aBearer (in) the bearer to use (not EAll) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
78 |
@param aInetAddr (in) the ip address of the network interface that should be used in a multihomed system. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
79 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
80 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
81 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
82 |
return iAgent->Connect(aRemoteHost, aRemotePort, aBearer, EFalse); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
83 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
84 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
85 |
TInt CSWSWapFullySpecWDPService::Connect(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, Wap::TBearer aBearer) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
86 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
87 |
Connect to the wapstack, opening an endpoint which is to be used only with a single, named remote host. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
88 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
89 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
90 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
91 |
@param aRemoteHost (in) the bearer-dependent address of the remote host with which the data will be exchange |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
92 |
@param aRemotePort (in) the port on the remote host to which data will be sent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
93 |
@param aBearer (in) the bearer to use (not EAll) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
94 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
95 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
96 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
97 |
TInetAddr inetAddr( KInetAddrAny, 0); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
98 |
return(Connect(aRemoteHost, aRemotePort, aBearer, inetAddr)); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
99 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
100 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
101 |
TInt CSWSWapFullySpecWDPService::Send(const TDesC8& aBuffer) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
102 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
103 |
Send data on a fully-specified connection. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
104 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
105 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
106 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
107 |
@param aBuffer (in) the data buffer to be written over the connection |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
108 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
109 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
110 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
111 |
return iAgent->SendWdpMessage(aBuffer); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
112 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
113 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
114 |
TInt CSWSWapFullySpecWDPService::AwaitRecvDataSize(TPckg<TUint16>& aDataSizePckg, TRequestStatus& aReqStatus) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
115 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
116 |
receive data on a bound port. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
117 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
118 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
119 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
120 |
An asynchronous notification is sent to the client when data arrives. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
121 |
@param aDataSizePckg size of data received |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
122 |
@param aReqStatus (inout) used to notify the client that a datagram was received |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
123 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
124 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
125 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
126 |
return iAgent->AwaitRecvDataSize(aDataSizePckg, aReqStatus); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
127 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
128 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
129 |
TInt CSWSWapFullySpecWDPService::Recv(TDes8& aBuffer, TBool& aTruncated, TRequestStatus& aReqStatus, TUint32 aTimeout) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
130 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
131 |
receive data on a bound port. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
132 |
An asynchronous notification is sent to the client when data arrives. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
133 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
134 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
135 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
136 |
@param aBuffer (out) a client-allocated data buffer to be filled with data received. Data that overflows the buffer is discarded. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
137 |
@param aTruncated (out) indicates whether the received datagram was truncated to fit in the client's supplied buffer |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
138 |
@param aReqStatus (inout) used to notify the client that a datagram was received |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
139 |
@param aTimeout (in) an optional millisecond time-out which allows a timed read to be made. If no data is received |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
140 |
within the timeout period the request completes with KErrTimedOut. If a value of 0 is supplied the timeout is infinite. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
141 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
142 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
143 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
144 |
return iAgent->ReceiveWdpMessage(iHostName, iPort, aBuffer, aTruncated, aReqStatus, aTimeout); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
145 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
146 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
147 |
void CSWSWapFullySpecWDPService::CancelRecv() |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
148 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
149 |
Cancel a previously requested asynchronous Recv or AwaitRecvDataSize notification. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
150 |
If a datagram arrives at the local host, it will be discarded. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
151 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
152 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
153 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
154 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
155 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
156 |
iAgent->CancelRequest(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
157 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
158 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
159 |
TInt CSWSWapFullySpecWDPService::GetLocalPort(Wap::TPort& aPort) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
160 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
161 |
Get the local port of this endpoint.Useful if one was chosen automatically. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
162 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
163 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
164 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
165 |
@param aPort (out) the port number |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
166 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
167 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
168 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
169 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
170 |
return iAgent->GetLocalPort(aPort); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
171 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
172 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
173 |
TInt CSWSWapFullySpecWDPService::GetLocalAddress(HBufC8*& aLocalHost) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
174 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
175 |
Get the local address of this endpoint. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
176 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
177 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
178 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
179 |
@param aLocalHost (inout) the address of the local host. A reference to a HBufC8 pointer should |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
180 |
be passed in. This pointer MUST be null! A HBufC8 will be allocated to hold the address, ownership |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
181 |
of this buffer will be passed over to the client. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
182 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
183 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
184 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
185 |
return iAgent->GetLocalAddress(aLocalHost); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
186 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
187 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
188 |
TInt CSWSWapFullySpecWDPService::GetDatagramSizes(TUint16& aMaxSize, TUint16& aNominalSize) |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
189 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
190 |
Query the WDP bearer for its maximum datagram size and its nominal datagram size. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
191 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
192 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
193 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
194 |
@param aMaxSize (out) the maximum datagram size |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
195 |
@param aNominalSize (out) the nominal datagram size (nominal = size within which a datagram won't |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
196 |
have to be split into smaller individual messages and then re-assembled at the other end). |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
197 |
This will fail for a stream connection |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
198 |
@returns KErrNone on successful completion, or one of the system error codes on failure. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
199 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
200 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
201 |
// Can only retrieve this info from the capcodec when its a connection, not datagram! |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
202 |
aMaxSize = KWapStackMaxDatagramSize; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
203 |
aNominalSize = KWapStackNorminalDatagramSize; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
204 |
return KErrNone; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
205 |
} |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
206 |