Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

GDefine.h

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  *
00016  *
00017  * @author Susantha Kumara (skumara@virtusa.com)
00018  *
00019  */
00020 #ifdef WIN32
00021 #pragma warning (disable : 4786)
00022 #pragma warning (disable : 4530)
00023 #endif
00024 
00025 #if !defined(__GDEFINE_OF_AXIS_INCLUDED__)
00026 #define __GDEFINE_OF_AXIS_INCLUDED__
00027 
00028 /* This file contains all global definitions that are valid across whole
00029  * Axis C++ project.
00030  */
00031 
00032 typedef enum {SECURE, UNSECURE} AXIS_SECURE_PROTOCOL;
00033 
00034 typedef enum 
00035 { 
00036     AXIS_SUCCESS=0, 
00037     AXIS_FAIL = -1, 
00038     AXIS_OBJECT_ALREADY_EXISTS=1,
00039     AXIS_NO_SUCH_HANDLER,
00040     AXIS_NO_SUCH_SERVICE
00041 } AXIS_GLOBAL_ERROR;
00042 typedef enum 
00043 { 
00044     APTHTTP=1, APTFTP, APTSMTP, APTHTTPS, APTOTHER 
00045 } AXIS_PROTOCOL_TYPE;
00046 
00047 #define SOAPACTIONHEADER "SOAPAction"
00048 
00049 #define AxisChar char
00050 #define AxisXMLCh char
00051 #define XML_Ch AxisChar
00052 
00053 #ifdef __cplusplus
00054 
00055 #define AXIS_CPP_NAMESPACE_START namespace axiscpp {
00056 #define AXIS_CPP_NAMESPACE_END }
00057 /*
00058 The following is necessary for the skeletons and stubs to be built
00059 */
00060 namespace axiscpp {}
00061 
00062 #define AXIS_CPP_NAMESPACE_USE using namespace axiscpp;
00063 #define AXIS_CPP_NAMESPACE_PREFIX axiscpp::
00064 
00065 
00066 #define AxisString basic_string<char>
00067 #define AxisXMLString basic_string<AxisXMLCh>
00068 
00069 #else
00070 
00071 #define AXIS_CPP_NAMESPACE_START 
00072 #define AXIS_CPP_NAMESPACE_END 
00073 
00074 #define AXIS_CPP_NAMESPACE_USE 
00075 #define AXIS_CPP_NAMESPACE_PREFIX
00076 
00077 #endif
00078 
00079 #ifdef WIN32
00080     #define AxisSprintf(X, Y, Z, W) sprintf(X, Z, W)
00081 #else /* linux */
00082     #define AxisSprintf(X, Y, Z, W) sprintf(X, Z, W)
00083 #endif
00084 
00085 extern void Ax_Sleep(int);
00086 extern void ModuleInitialize();
00087 extern void ModuleUnInitialize();
00088 
00089 #if defined(WIN32) 
00090 #define STORAGE_CLASS_INFO __declspec(dllexport)
00091 #else
00092 #define STORAGE_CLASS_INFO 
00093 #endif
00094 
00095 #if defined(__GNUC__)
00096 /*replaced stdcall with cdecl to make it work on some platforms with older libraries - Samisa*/
00097 /*#define AXISCALL __attribute__((stdcall))*/
00098 #define AXISCALL __attribute__((cdecl))
00099 #else /* unix or win32 */
00100 #if defined(__unix)
00101 #define AXISCALL
00102 #else
00103 #define AXISCALL __stdcall
00104 #endif
00105 #endif
00106 
00107 
00108 /*
00109  * Following macro define an API function of Axis C++
00110  * Format of the AXISAPI macro is as follows
00111  * AXISAPI(<METHOD NAME>, <PARAMETER LIST>)
00112  */
00113 
00114 #ifdef __cplusplus
00115     #define AXISAPI(M, P) AXISCALL M P = 0;
00116     #define APIHASPARAMS
00117     #define APINOPARAMS 
00118 #else 
00119     #define virtual 
00120     #if !defined(bool)
00121         #define bool unsigned char
00122         #define false 0
00123         #define true 1
00124     #endif
00125     #if !defined(NULL)
00126         #define NULL 0
00127     #endif
00128     #define AXISAPI(M, P) (AXISCALL* M) P;
00129     #define APIHASPARAMS void*p,
00130     #define APINOPARAMS void*p
00131 #endif
00132 
00133 #endif 
00134 
00135 

Generated on Fri Oct 22 18:49:04 2004 for AxisC++ by doxygen1.2.18