bump product version to 5.0.4.1
[LibreOffice.git] / sal / qa / osl / socket / osl_Socket_Const.h
blob768d76eb58029b7d5ff4b3f183459854c27805ce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _OSL_SOCKET_CONST_H_
21 #define _OSL_SOCKET_CONST_H_
23 #include <sal/types.h>
24 #include <rtl/textenc.h>
25 #include <rtl/ustring.hxx>
26 #include <rtl/ustring.h>
27 #include <osl/socket.hxx>
28 #include <osl/socket.h>
29 #include <osl/thread.hxx>
30 #include <osl/file.hxx>
31 #include <osl/mutex.hxx>
32 #include <osl/time.h>
34 const char * pTestString1 = "test socket";
35 const char * pTestString2 = " Passed#OK";
37 #ifdef __cplusplus
38 extern "C"
40 #endif
42 # include <stdio.h>
44 // OS dependent declaration and includes
46 #if ( defined UNX ) //Unix
47 # include <unistd.h>
48 # include <limits.h>
49 # include <string.h>
50 # include <math.h>
51 # include <errno.h>
52 # include <fcntl.h>
53 # include <sys/stat.h>
54 # include <sys/statfs.h>
55 # include <sys/statvfs.h>
56 # include <sys/types.h>
57 # include <sys/socket.h>
58 # include <netdb.h>
59 # include <netinet/in.h>
60 # include <arpa/inet.h>
61 #endif
62 #if ( defined WNT ) // Windows
63 # include <winsock.h>
64 # include <string.h>
65 #endif
67 // macro definition for the ASCII array/OUString declarations,
68 // we use p### for the ASCII array,
69 // a### for the OUString,
70 // n###Len for its length
72 #define OSLTEST_DECLARE( str_name, str_value ) \
73 static const sal_Char p##str_name[] = str_value; \
74 static const sal_Int32 n##str_name##Len = sizeof( p##str_name ) -1; \
75 ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( p##str_name )
77 // Ip version definition
79 #define IP_VER 4 /// currently only IPv4 is considered.
81 // Hostnames.
83 // OSLTEST_DECLARE( HostName1, "localhost" );
84 // OSLTEST_DECLARE( HostIp1, "127.0.0.1" );
85 OSLTEST_DECLARE( HostName2, "longshot.prc.sun.com" );
86 OSLTEST_DECLARE( HostIp2, "129.158.217.202" );
87 OSLTEST_DECLARE( HostName3, "deuce.prc.sun.com" );
88 OSLTEST_DECLARE( HostIp3, "129.158.217.199" );
89 OSLTEST_DECLARE( HostName4, "sceri.PRC.Sun.COM" ); //Beijing server for test
90 OSLTEST_DECLARE( HostIp4, "129.158.217.107" );
91 OSLTEST_DECLARE( HostName5, "koori.SFBay.Sun.COM" ); //"grande.Germany.Sun.COM" ); //Germany server for test
92 OSLTEST_DECLARE( HostIp5, "10.5.32.20" );
93 OSLTEST_DECLARE( HostName6, "crumple.SFBay.Sun.COM" ); //sfbay
94 OSLTEST_DECLARE( HostIp6, "10.6.103.83" );
95 OSLTEST_DECLARE( HostIpInval, "123.45.67.89" ); //this is valid ip number,but can not arrive --mindy
96 // OSLTEST_DECLARE( HostIpInval1, "123.345.67.89" ); //this is real invalid ip number --mindy
97 OSLTEST_DECLARE( HostNameInval, "www.the_hostname_that_can_not_resolvable_to_an_IP_Address.com" );
98 OSLTEST_DECLARE( HostIpZero, "0.0.0.0" );
100 // OS independent file definition
102 OSLTEST_DECLARE( NullURL, "" );
104 #ifdef __cplusplus
106 #endif
108 #endif /* _OSL_SOCKET_CONST_H_ */
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */