|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /******************************************************************************** |
|
21 * |
|
22 * Switches |
|
23 * |
|
24 *******************************************************************************/ |
|
25 #ifndef __NTOH_H__ |
|
26 #define __NTOH_H__ |
|
27 |
|
28 /******************************************************************************** |
|
29 * |
|
30 * Includes |
|
31 * |
|
32 *******************************************************************************/ |
|
33 #include <e32std.h> |
|
34 |
|
35 /******************************************************************************** |
|
36 * |
|
37 * Definitions |
|
38 * |
|
39 *******************************************************************************/ |
|
40 #define LilEnd 0 |
|
41 #define BigEnd 1 |
|
42 |
|
43 /******************************************************************************** |
|
44 * |
|
45 * Macro Functions |
|
46 * |
|
47 *******************************************************************************/ |
|
48 |
|
49 /******************************************************************************** |
|
50 * |
|
51 * Prototypes |
|
52 * |
|
53 *******************************************************************************/ |
|
54 int DetectLocalEndian(); |
|
55 long LittleToBigL( long src ); |
|
56 long BigToLittleL( long src ); |
|
57 short LittleToBigS( short src ); |
|
58 short BigToLittleS( short src ); |
|
59 long ntohl( long src ); |
|
60 long htonl( long src ); |
|
61 short ntohs( short src ); |
|
62 short htons( short src ); |
|
63 |
|
64 #endif // __NTOH_H__ |