author | Nithin Vijay <nithin.vjay@nokia.com> |
Tue, 20 Apr 2010 17:00:49 +0100 | |
branch | RCL_3 |
changeset 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 |
#ifndef __MSGAPIAGENT_H__ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
17 |
#define __MSGAPIAGENT_H__ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
18 |
#include "ActiveSocket.h" |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
19 |
#include "WapSwsTimeOut.h" |
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 |
class MProgressNotify |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
22 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
23 |
Interface from the ActiveSocket to MessageApiAgent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
24 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
25 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
26 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
27 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
28 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
29 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
30 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
31 |
The interface that will be called when WDP pdu length and data are received by CActiveSocket. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
32 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
33 |
@param aMessage the message type received from CActiveSocket |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
34 |
@param aData the data received from CActiveSocket |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
35 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
36 |
virtual void Notification(TInt aMessage, const TDesC8& aData) = 0; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
37 |
}; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
38 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
39 |
class CWapAsyncCallBack : public CActive |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
40 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
41 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
42 |
CWapAsyncCallBack( const TCallBack& aCallBack, TInt aPriority ); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
43 |
~CWapAsyncCallBack(); |
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 |
public: // API |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
46 |
void CallBack(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
47 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
48 |
private: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
49 |
void RunL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
50 |
void DoCancel(); |
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 |
private: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
53 |
TCallBack iCallBack; |
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 |
class CWapMessageApiAgent : public CBase, public MTimeOutNotify, public MProgressNotify |
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 |
The base class of CWspMessageApiAgent and CWdpMessageApiAgent, which handle Wsp and Wdp |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
59 |
for SWS message APIs |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
60 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
61 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
62 |
@since v8.0 |
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 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
65 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
66 |
virtual ~CWapMessageApiAgent(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
67 |
void ConstructL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
68 |
CActiveSocket* GetActiveSocketByBearer(Wap::TBearer aBearer); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
69 |
CActiveSocket* GetActiveSocketByStatus(TWapMessageState aState); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
70 |
TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort, TBool aSecure); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
71 |
TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort, TBool aSecure, TInetAddr aInetAddr); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
72 |
TInt Connect(Wap::TBearer aBearer, Wap::TPort aPort, TBool aSecure, TInt aSocketServHandle, RConnection* aConnection); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
73 |
TInt Connect(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, Wap::TBearer aBearer, TBool aSecure, TInetAddr aInetAddr); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
74 |
TInt Connect(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, Wap::TBearer aBearer, TBool aSecure); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
75 |
TInt Connect(const TDesC8& aRemoteHost, Wap::TPort aRemotePort, Wap::TBearer aBearer, TBool aSecure, TInt aSocketServHandle, RConnection* aConnection); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
76 |
TInt GetLocalPort(Wap::TPort& aPort); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
77 |
TInt GetLocalAddress(HBufC8*& aLocalHost); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
78 |
TInt GetBearer(Wap::TBearer& aBearer); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
79 |
TInt GetServerAddress(HBufC8*& aRemoteHost); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
80 |
virtual void TimerExpired(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
81 |
void CancelRequest(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
82 |
static TInt CompleteReading(TAny* aAgent); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
83 |
protected: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
84 |
CWapMessageApiAgent(TWapMessageType aMessageType); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
85 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
86 |
RSocketServ instance used by all the bearers. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
87 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
88 |
RSocketServ iSocketServ; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
89 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
90 |
The array to contain all the bearers |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
91 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
92 |
RPointerArray<CActiveSocket> iBearers; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
93 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
94 |
The Wdp and Wsp receiving timer. |
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 |
CTimeOutTimer* iTimeoutTimer; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
97 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
98 |
Flag the show if there is outstanding request. |
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 |
TBool iRequestActive; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
101 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
102 |
The pointer to Wap message client's request status |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
103 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
104 |
TRequestStatus* iRequestStatus; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
105 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
106 |
The last error code of active socket in reading state |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
107 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
108 |
TInt iLastReadingError; |
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 |
The asynchronous completion of reading |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
111 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
112 |
CWapAsyncCallBack* iAsyncReadCompletion; |
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 |
The bearer that receives that last PDU |
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 |
Wap::TBearer iLastPduBearer; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
117 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
118 |
Flag to show if the API has been connected or not |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
119 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
120 |
TBool iIsOpen; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
121 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
122 |
The type of the Wap message handled by this API agent. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
123 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
124 |
TWapMessageType iMessageType; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
125 |
private: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
126 |
TInt DoCompleteReading(); |
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 |
class CWspMessageApiAgent : public CWapMessageApiAgent |
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 |
The class to handle Wsp PDU for SWS message APIs |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
132 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
133 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
134 |
@since v8.0 |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
135 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
136 |
{ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
137 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
138 |
static CWspMessageApiAgent* NewL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
139 |
CWspMessageApiAgent(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
140 |
virtual ~CWspMessageApiAgent(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
141 |
void ConstructL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
142 |
TInt SendWspMessage(Wap::TBearer aBearer, const TDesC8& aRemoteHost, Wap::TPort aRemotePort, TUint aMethod, const TDesC& aURI, const TDesC8& aReqHeaders, const TDesC8& aReqBody, TUint8 aTransactionId); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
143 |
TInt SendWspMessage(TUint aMethod, const TDesC& aURI, const TDesC8& aReqHeaders, const TDesC8& aReqBody, TUint8 aTransactionId); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
144 |
TInt ReceiveWspMessage(TDes8& aWspHeaders, TDes8& aWspBody, TPckgBuf<TUint8>& aPushIdPckg, TWSPStatus& aWspStatus, TRequestStatus& aReqStatus, TUint32 aTimeout); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
145 |
virtual void Notification(TInt aMessage, const TDesC8& aData); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
146 |
private: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
147 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
148 |
The pointer to the WSP message client's requested header buffer |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
149 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
150 |
TDes8* iClientReqHeaders; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
151 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
152 |
The pointer to the WSP message client's requested body buffer |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
153 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
154 |
TDes8* iClientReqBody; |
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 |
The pointer to the WSP message client's requested transaction ID. |
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 |
TUint8* iClientTransactionId; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
159 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
160 |
The pointer to the WSP message client's requested WSP status. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
161 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
162 |
TWSPStatus* iClientWspStatus; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
163 |
}; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
164 |
|
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
165 |
class CWdpMessageApiAgent : public CWapMessageApiAgent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
166 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
167 |
The class to handle Wdp PDU for SWS message APIs |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
168 |
@internalComponent |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
169 |
@released |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
170 |
@since v8.0 |
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 |
public: |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
174 |
static CWdpMessageApiAgent* NewL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
175 |
CWdpMessageApiAgent(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
176 |
virtual ~CWdpMessageApiAgent(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
177 |
void ConstructL(); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
178 |
TInt ReceiveWdpMessage(TDes8& aRemoteHost, Wap::TPort& aRemotePort, 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
|
179 |
TInt AwaitRecvDataSize(TPckg<TUint16>& aDataSizePckg, TRequestStatus& aReqStatus); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
180 |
TInt SendWdpMessage(const TDesC8& aBuffer, 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
|
181 |
TInt SendWdpMessage(const TDesC8& aBuffer); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
182 |
virtual void Notification(TInt aMessage, const TDesC8& aData); |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
183 |
private: |
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 |
The pointer to Wdp message client's requested data buffer |
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 |
TDes8* iClientPduBuffer; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
188 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
189 |
The pointer to Wdp message client's request data size |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
190 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
191 |
TPckg<TUint16>* iClientDataSize; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
192 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
193 |
The pointer to client's requested remote host buffer |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
194 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
195 |
TDes8* iClientRemoteHost; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
196 |
/** |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
197 |
The pointer to client's requested remote port buffer |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
198 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
199 |
Wap::TPort* iClientRemotePort; |
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 |
The pointer to client's requested flag. |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
202 |
*/ |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
203 |
TBool* iClientTruncated; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
204 |
}; |
50bae5c5c85f
Add wapstack/wapmessageapi component, to fix Bug 1398
Nithin Vijay <nithin.vjay@nokia.com>
parents:
diff
changeset
|
205 |
#endif //__MSGAPIAGENT_H__ |