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