00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef BRIDGE_H
00028
00029 #define BRIDGE_H 1
00030
00031 #include <stdio.h>
00032 #include <stdarg.h>
00033 #include <stdlib.h>
00034 #include <time.h>
00035 #include "anyconfig/CString.h"
00036
00037 #ifdef _WIN32
00038 #ifndef SOCKET
00039 #include "winsock.h"
00040 #endif
00041 #endif
00042 #include "anyconfig/anycfg.h"
00043
00044 extern "C" {
00046 typedef void * IRPLUS_H;
00048 typedef void * CORBA_H;
00050 typedef void * DOM_H;
00052 typedef void * IRP_ITEM_H;
00053
00055 ANYCFG_H sbInitialize (int argn, char *argv []);
00057 void sbTerminate (ANYCFG_H hdl);
00058
00060 CORBA_H initCorba (int argn, char *argv []);
00062 void termCorba (CORBA_H hdl);
00063
00065 IRPLUS_H initIRPlus (CORBA_H cbaHdl, ANYCFG_H cfhHdl);
00067 void termIRPlus (IRPLUS_H hdl);
00068
00069 const char *iterIRPlus (IRPLUS_H hdl, IRP_ITEM_H *itm);
00070
00072 DOM_H parseDOM (const unsigned char *pBuf, const unsigned long size);
00074 void releaseDOM (DOM_H hdl);
00075 };
00076
00078 enum FaultCode { sfVersion, sfUnderstand, sfClient, sfServer};
00079
00080 extern void GetXML(unsigned char * &buf, unsigned long &siz, DOM_H toWrite, const char *encoding = "UTF-8");
00081 extern bool GetSOAP (CString &soap_in, CString &soap_out, IRPLUS_H hdl, const char *interfaceMethod);
00082 extern void EncodeBase64 (const unsigned char *buf, const unsigned long csiz, CString &str, bool isSMTP);
00083 extern void DecodeBase64 (unsigned char *ou, unsigned long &nsiz, const char *buf);
00084 extern double sec_u (void);
00085
00086 #include "log4cpp/Category.hh"
00087 #include "log4cpp/Appender.hh"
00088 #include "log4cpp/FileAppender.hh"
00089 #ifdef HAVE_SYSLOG
00090 #include "log4cpp/SyslogAppender.hh"
00091 #endif
00092 #include "log4cpp/RemoteSyslogAppender.hh"
00093 #include "log4cpp/BasicLayout.hh"
00094
00095 extern log4cpp::Category *soapBridgeLog;
00096 extern log4cpp::Category *corbaBridgeLog;
00097 extern log4cpp::Category *generalLog;
00098
00099 #endif
00100