|
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 // Utilities |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __CSWSWAPMSGUTILS_H__ |
|
19 #define __CSWSWAPMSGUTILS_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32std.h> |
|
23 #include <es_sock.h> |
|
24 #include <wapmessage.h> |
|
25 |
|
26 const TInt KWapStackMaxDatagramSize = 4000; |
|
27 const TInt KWapStackNorminalDatagramSize = 4000; |
|
28 |
|
29 |
|
30 |
|
31 class CSWSWapMsgUtils : public CBase |
|
32 /** |
|
33 Provide a set of static function which to be used by SWS. Contains the functions to build a |
|
34 specific socket address from given parameters, analyse a specific socket address, and to |
|
35 determine the SMS bearer type, GSM. |
|
36 @internalComponent |
|
37 @released |
|
38 @since v8.0 |
|
39 */ |
|
40 { |
|
41 public: |
|
42 // Returns the current local address, a null pointer must be passed in, buffer ownership is given to the client |
|
43 static TInt GetLocalAddress(HBufC8*& aLocalHost); |
|
44 static void BuildAddrL(TSockAddr& aAddr, Wap::TBearer aBearer, const TDesC8& aRemoteHost, Wap::TPort aRemotePort); |
|
45 static void AnalyseAddrL(TSockAddr& aAddr, Wap::TBearer aBearer, TDes8& aRemoteHost, Wap::TPort& aRemotePort); |
|
46 |
|
47 }; |
|
48 |
|
49 #endif //__CSWSWAPMSGUTILS_H__ |
|
50 |