REC RPC library
defines.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2011, REC Robotics Equipment Corporation GmbH, Planegg, Germany
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
7 
8 - Redistributions of source code must retain the above copyright notice,
9  this list of conditions and the following disclaimer.
10 - Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation and/or
12  other materials provided with the distribution.
13 - Neither the name of the REC Robotics Equipment Corporation GmbH nor the names of
14  its contributors may be used to endorse or promote products derived from this software
15  without specific prior written permission.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
18 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
24 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26 
27 #ifndef _REC_RPC_DEFINES_H_
28 #define _REC_RPC_DEFINES_H_
29 
30 /******************************************************************************/
31 /*** Defines ***/
32 /******************************************************************************/
33 /*
34  * Defines that help to correctly specify dllexport and dllimport on
35  * Windows platforms.
36  */
37 
38 #define REC_RPC_SERVER_DEFAULT_PORT 9280
39 #define QDATASTREAM_VERSION QDataStream::Qt_4_5
40 
41 #ifdef WIN32
42 # ifdef rec_rpc_EXPORTS
43 # define REC_RPC_EXPORT __declspec(dllexport)
44 # else
45 # define REC_RPC_EXPORT __declspec(dllimport)
46 # endif // rec_rpc_EXPORTS
47 # define REC_RPC_VISIBILITY_DEFAULT
48 #else // WIN32
49 # define REC_RPC_EXPORT __attribute__ ((visibility ("default")))
50 # define REC_RPC_VISIBILITY_DEFAULT __attribute__ ((visibility ("default")))
51 #endif // WIN32
52 
53 #ifndef REC_RPC_FUNCTION_IS_NOT_USED
54 #ifdef __GNUC__
55 #define REC_RPC_FUNCTION_IS_NOT_USED __attribute__ ((unused))
56 #else
57 #define REC_RPC_FUNCTION_IS_NOT_USED
58 #endif
59 #endif
60 
61 #ifdef REC_RPC_STATIC
62 #undef REC_RPC_EXPORT
63 #define REC_RPC_EXPORT
64 #undef REC_RPC_VISIBILITY_DEFAULT_C
65 #define REC_RPC_VISIBILITY_DEFAULT_C
66 #undef REC_RPC_VISIBILITY_DEFAULT_CXX
67 #define REC_RPC_VISIBILITY_DEFAULT_CXX
68 #endif
69 
70 #endif // _REC_RPC_DEFINES_H_