8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

ipserver is being deleted. Update build files.

This commit is contained in:
robocop 2004-10-03 06:34:45 +00:00
parent a8d0f250ed
commit c5543b4358
16 changed files with 0 additions and 10372 deletions

View File

@ -738,7 +738,6 @@
F616C4490200B0CF01EF0ADE, F616C4490200B0CF01EF0ADE,
F616C4670200B0CF01EF0ADE, F616C4670200B0CF01EF0ADE,
F616C4920200B0CF01EF0ADE, F616C4920200B0CF01EF0ADE,
F616C5230200B0CF01EF0ADE,
F616C53A0200B0CF01EF0ADE, F616C53A0200B0CF01EF0ADE,
F616C55E0200B0CF01EF0ADE, F616C55E0200B0CF01EF0ADE,
F616C6FC0200B0D001EF0ADE, F616C6FC0200B0D001EF0ADE,
@ -3143,85 +3142,6 @@
path = undef.h; path = undef.h;
refType = 4; refType = 4;
}; };
F616C5230200B0CF01EF0ADE = {
children = (
F616C5240200B0CF01EF0ADE,
F616C5250200B0CF01EF0ADE,
F616C5260200B0CF01EF0ADE,
F616C5270200B0CF01EF0ADE,
F616C5280200B0CF01EF0ADE,
F616C5290200B0CF01EF0ADE,
F616C52A0200B0CF01EF0ADE,
F616C52B0200B0CF01EF0ADE,
F616C52C0200B0CF01EF0ADE,
F616C52D0200B0CF01EF0ADE,
F616C52E0200B0CF01EF0ADE,
F616C52F0200B0CF01EF0ADE,
);
isa = PBXGroup;
path = ipserver;
refType = 4;
};
F616C5240200B0CF01EF0ADE = {
isa = PBXFileReference;
path = alli.cpp;
refType = 4;
};
F616C5250200B0CF01EF0ADE = {
isa = PBXFileReference;
path = alli_proto.h;
refType = 4;
};
F616C5260200B0CF01EF0ADE = {
isa = PBXFileReference;
path = blk.h;
refType = 4;
};
F616C5270200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipapi_proto.h;
refType = 4;
};
F616C5280200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipc.h;
refType = 4;
};
F616C5290200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipcevent.cpp;
refType = 4;
};
F616C52A0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipcli_proto.h;
refType = 4;
};
F616C52B0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipclient.cpp;
refType = 4;
};
F616C52C0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipevt_proto.h;
refType = 4;
};
F616C52D0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ips.h;
refType = 4;
};
F616C52E0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipserver.cpp;
refType = 4;
};
F616C52F0200B0CF01EF0ADE = {
isa = PBXFileReference;
path = ipsrv_proto.h;
refType = 4;
};
F616C53A0200B0CF01EF0ADE = { F616C53A0200B0CF01EF0ADE = {
children = ( children = (
F616C53C0200B0CF01EF0ADE, F616C53C0200B0CF01EF0ADE,
@ -6710,26 +6630,6 @@
path = interface.cpp; path = interface.cpp;
refType = 4; refType = 4;
}; };
F616C8810200B0D001EF0ADE = {
isa = PBXFileReference;
path = ipc.cpp;
refType = 4;
};
F616C8820200B0D001EF0ADE = {
isa = PBXFileReference;
path = ipc.h;
refType = 4;
};
F616C8830200B0D001EF0ADE = {
isa = PBXFileReference;
path = ipc_proto.h;
refType = 4;
};
F616C8840200B0D001EF0ADE = {
isa = PBXFileReference;
path = ipc_server.cpp;
refType = 4;
};
F616C8850200B0D001EF0ADE = { F616C8850200B0D001EF0ADE = {
isa = PBXFileReference; isa = PBXFileReference;
path = isc_tcpent.mar; path = isc_tcpent.mar;

View File

@ -19,10 +19,6 @@
# 2003-Sep-27 BRS Removed IPSERVER after XNET is included # 2003-Sep-27 BRS Removed IPSERVER after XNET is included
# #
# To build with ipserver use the following two lines instead the uncommented ones
# PROD_FLAGS=-O2 -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DMAXPATHLEN=255 -DWIN32_LEAN_AND_MEAN -MMD
# DEV_FLAGS=-ggdb -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DMAXPATHLEN=255 -DDEBUG_GDS_ALLOC -DWIN32_LEAN_AND_MEAN -MMD
# -Wno-unused-variable is used due to unused gpre generated variables # -Wno-unused-variable is used due to unused gpre generated variables
PROD_FLAGS=-O2 -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wshadow -Wundef -pedantic -Wno-long-long -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD PROD_FLAGS=-O2 -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wshadow -Wundef -pedantic -Wno-long-long -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD
DEV_FLAGS=-ggdb -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wshadow -Wundef -pedantic -Wno-long-long -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD DEV_FLAGS=-ggdb -march=i586 -mcpu=i686 -DMINGW -mno-cygwin -mthreads -Wall -Wshadow -Wundef -pedantic -Wno-long-long -Wno-unused-variable -Wno-unknown-pragmas -Wno-parentheses -Wno-switch -fmessage-length=0 -Dlint -DWIN32_LEAN_AND_MEAN -MMD
@ -42,8 +38,6 @@ LIB_GUI:= -mwindows -lcomctl32 -lgdi32
EMBED_UTIL_TARGETS:=gstat gsec nbackup fb_lock_print EMBED_UTIL_TARGETS:=gstat gsec nbackup fb_lock_print
CLIENT_UTIL_TARGETS:=gstat gsec ibguard instsvc instreg nbackup fb_lock_print CLIENT_UTIL_TARGETS:=gstat gsec ibguard instsvc instreg nbackup fb_lock_print
# To build with ipserver uncomment the following line
# WIN_IPSERVER_Files:=ipserver.cpp alli.cpp
Physical_IO_Module=os/win32/winnt.cpp Physical_IO_Module=os/win32/winnt.cpp

View File

@ -216,22 +216,6 @@ SOURCE=..\..\..\src\remote\xdr.cpp
SOURCE=..\..\..\src\remote\xnet.cpp SOURCE=..\..\..\src\remote\xnet.cpp
# End Source File # End Source File
# End Group # End Group
# Begin Group "IPSERVER files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\src\ipserver\alli.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipcevent.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipclient.cpp
# End Source File
# End Group
# Begin Group "DSQL files" # Begin Group "DSQL files"
# PROP Default_Filter "" # PROP Default_Filter ""

View File

@ -1,141 +0,0 @@
# Microsoft Developer Studio Project File - Name="ipserver" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ipserver - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ipserver.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ipserver.mak" CFG="ipserver - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ipserver - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "ipserver - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ipserver - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ""
# PROP BASE Intermediate_Dir ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\temp\debug\ipserver"
# PROP Intermediate_Dir "..\..\..\temp\debug\ipserver"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /GR /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /GR /ZI /Od /I "../../../src/include" /I "../../../src/include/gen" /D "_DEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /D "_X86_" /D "DEV_BUILD" /D "SUPERSERVER" /FD /GZ /c
# ADD BASE RSC /l 0x41d /d "_DEBUG"
# ADD RSC /l 0x41d /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ipserver - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ""
# PROP BASE Intermediate_Dir ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\temp\release\ipserver"
# PROP Intermediate_Dir "..\..\..\temp\release\ipserver"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /GR /Ot /Oi /Op /Oy /Ob2 /I "../../../src/include" /I "../../../src/include/gen" /D "NDEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /D "_X86_" /FD /GZ /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /GR /Ot /Og /Oi /Op /Oy /Ob1 /I "../../../src/include" /I "../../../src/include/gen" /D "NDEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /D "_X86_" /D "SUPERSERVER" /FD /EHc- /c
# ADD BASE RSC /l 0x41d /d "_DEBUG"
# ADD RSC /l 0x41d /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ipserver - Win32 Debug"
# Name "ipserver - Win32 Release"
# Begin Group "IPSERVER files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\..\src\ipserver\alli.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipcevent.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipclient.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipserver.cpp
# End Source File
# End Group
# Begin Group "Header files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\..\src\ipserver\alli_proto.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\blk.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipapi_proto.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipc.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipcli_proto.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipevt_proto.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ips.h
# End Source File
# Begin Source File
SOURCE=..\..\..\src\ipserver\ipsrv_proto.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -1,109 +0,0 @@
/*
* PROGRAM: Interprocess server interface
* MODULE: alli.cpp
* DESCRIPTION: Internal block allocator
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include "firebird.h"
#include <windows.h>
#include "../ipserver/ipc.h"
#define BLKDEF(type, root, tail) {sizeof (struct root), tail},
static struct
{
SSHORT typ_root_length;
SSHORT typ_tail_length;
} PIPE_block_sizes[] = {
{0, 0},
#include "../ipserver/blk.h"
{0, 0}
};
#include "../jrd/gds_proto.h"
#include "../ipserver/alli_proto.h"
//____________________________________________________________
//
// Allocate a block.
//
void* ALLI_alloc(ULONG size)
{
return gds__alloc(size);
}
//____________________________________________________________
//
// Allocate a block from a given pool and initialize the block.
// This is the primary block allocation routine.
//
BLK ALLI_block(UCHAR type, int count)
{
/*
if (type <= (SCHAR) type_MIN || type >= (SCHAR) type_MAX)
abort();
*/
// Compute block length
const USHORT tail = PIPE_block_sizes[type].typ_tail_length;
USHORT size = PIPE_block_sizes[type].typ_root_length + count * tail;
BLK block = (BLK) ALLI_alloc((SLONG) size);
if (block)
{
block->blk_type = type;
block->blk_length = size;
size -= sizeof(struct blk);
if (size)
{
memset((SCHAR *) block + sizeof(struct blk), 0, size);
}
}
return block;
}
//____________________________________________________________
//
// Free a block.
//
void ALLI_free(void* block)
{
gds__free(block);
}
//____________________________________________________________
//
// Release a structured block.
//
void ALLI_release(BLK block)
{
ALLI_free(block);
}

View File

@ -1,33 +0,0 @@
/*
* PROGRAM: Interprocess Interface Allocator
* MODULE: alli_proto.h
* DESCRIPTION: Prototype Header file for alli.cpp
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef ALLI_PROTO_H
#define ALLI_PROTO_H
void* ALLI_alloc(ULONG);
BLK ALLI_block(UCHAR, int);
void ALLI_free(void*);
void ALLI_release(BLK);
#endif /* ALLI_PROTO_H */

View File

@ -1,30 +0,0 @@
/*
* PROGRAM: Interprocess server interface
* MODULE: blk.h
* DESCRIPTION: Block type definitions
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
BLKDEF(type_idb, idb, 0)
BLKDEF(type_irq, irq, 0)
BLKDEF(type_itr, itr, 0)
BLKDEF(type_ibl, ibl, 1)
BLKDEF(type_ivnt, ivnt, 0)
BLKDEF(type_ipserver_isr, ipserver_isr, 0)
BLKDEF(type_icc, icc, 0)

View File

@ -1,167 +0,0 @@
/*
* PROGRAM: JRD Access Method
* MODULE: ipapi_proto.h
* DESCRIPTION: Prototype header file for ipclient.cpp api calls
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPAPI_PROTO_H
#define IPAPI_PROTO_H
#ifdef __cplusplus
extern "C" {
#endif
ISC_STATUS IPI_attach_database(ISC_STATUS*, USHORT, const SCHAR*,
struct idb**, USHORT, const SCHAR*,
const SCHAR*);
ISC_STATUS IPI_blob_info(ISC_STATUS*, struct ibl**, USHORT,
const UCHAR*, USHORT, UCHAR*);
ISC_STATUS IPI_cancel_blob(ISC_STATUS *, struct ibl **);
ISC_STATUS IPI_cancel_events(ISC_STATUS *, struct idb **, SLONG *);
ISC_STATUS IPI_close_blob(ISC_STATUS *, struct ibl **);
ISC_STATUS IPI_commit_transaction(ISC_STATUS *, struct itr **);
ISC_STATUS IPI_commit_retaining(ISC_STATUS *, struct itr **);
ISC_STATUS IPI_compile_request(ISC_STATUS*, struct idb**,
struct irq**,
USHORT, const UCHAR*);
ISC_STATUS IPI_create_blob(ISC_STATUS *, struct idb **,
struct itr **, struct ibl **,
struct bid *);
ISC_STATUS IPI_create_blob2(ISC_STATUS*, struct idb**,
struct itr**, struct ibl**,
struct bid*, USHORT, const UCHAR*);
ISC_STATUS IPI_create_database(ISC_STATUS*, USHORT, const SCHAR*,
struct idb**, USHORT, const SCHAR*,
SSHORT, const SCHAR*);
ISC_STATUS IPI_database_info(ISC_STATUS*, struct idb**, USHORT,
const UCHAR*, USHORT, UCHAR*);
ISC_STATUS IPI_ddl(ISC_STATUS*, struct idb**, struct itr**,
USHORT, const UCHAR*);
ISC_STATUS IPI_detach_database(ISC_STATUS *, struct idb **);
ISC_STATUS IPI_drop_database(ISC_STATUS *, struct idb **);
ISC_STATUS IPI_get_segment(ISC_STATUS *, struct ibl **, USHORT *,
USHORT, UCHAR *);
ISC_STATUS IPI_get_slice(ISC_STATUS*, struct idb**, struct itr**,
struct bid*, USHORT, const UCHAR*, USHORT,
const UCHAR*, SLONG, UCHAR*, SLONG*);
ISC_STATUS IPI_open_blob(ISC_STATUS*, struct idb**, struct itr**,
struct ibl**, struct bid*);
ISC_STATUS IPI_open_blob2(ISC_STATUS*, struct idb**,
struct itr**, struct ibl**,
struct bid*, USHORT, const UCHAR*);
ISC_STATUS IPI_prepare_transaction(ISC_STATUS *, struct itr **,
USHORT, UCHAR *);
ISC_STATUS IPI_put_segment(ISC_STATUS*, struct ibl**, USHORT,
const UCHAR*);
ISC_STATUS IPI_put_slice(ISC_STATUS*, struct idb**, struct itr**,
struct bid*, USHORT, const UCHAR*, USHORT,
const UCHAR*, SLONG, UCHAR*);
ISC_STATUS IPI_que_events(ISC_STATUS*, struct idb**, SLONG*,
USHORT, const UCHAR*,
FPTR_EVENT_CALLBACK, void*);
ISC_STATUS IPI_receive(ISC_STATUS *, struct irq **, SSHORT, USHORT,
UCHAR *, SSHORT
#ifdef SCROLLABLE_CURSORS
, USHORT, ULONG
#endif
);
ISC_STATUS IPI_reconnect_transaction(ISC_STATUS*, struct idb**,
struct itr**, USHORT,
const UCHAR*);
ISC_STATUS IPI_release_request(ISC_STATUS *, struct irq **);
ISC_STATUS IPI_request_info(ISC_STATUS*, struct irq**, USHORT,
USHORT, const UCHAR*, USHORT, UCHAR*);
ISC_STATUS IPI_rollback_transaction(ISC_STATUS *, struct itr **);
ISC_STATUS IPI_rollback_retaining(ISC_STATUS *, struct itr **);
ISC_STATUS IPI_seek_blob(ISC_STATUS *, struct ibl **, SSHORT, SLONG,
SLONG *);
ISC_STATUS IPI_send(ISC_STATUS *, struct irq **, SSHORT, USHORT,
UCHAR *, SSHORT);
ISC_STATUS IPI_service_attach(ISC_STATUS*, USHORT, const TEXT*,
struct idb**, USHORT, const SCHAR*);
ISC_STATUS IPI_service_detach(ISC_STATUS *, struct idb **);
ISC_STATUS IPI_service_query(ISC_STATUS*, struct idb**, ULONG*,
USHORT, const SCHAR*,
USHORT, const SCHAR*,
USHORT, SCHAR*);
ISC_STATUS IPI_service_start(ISC_STATUS*, struct idb**, ULONG*,
USHORT, const SCHAR*);
ISC_STATUS IPI_start_request(ISC_STATUS *, struct irq **,
struct itr **, SSHORT);
ISC_STATUS IPI_start_and_send(ISC_STATUS *, struct irq **,
struct itr **, SSHORT, USHORT,
UCHAR *, SSHORT);
ISC_STATUS IPI_start_multiple(ISC_STATUS *, struct itr **, SSHORT,
int **);
ISC_STATUS IPI_start_transaction(ISC_STATUS *, struct itr **,
SSHORT, ...);
ISC_STATUS IPI_transaction_info(ISC_STATUS*, struct itr**, USHORT,
const UCHAR*, USHORT, UCHAR*);
ISC_STATUS IPI_transact_request(ISC_STATUS*, struct idb**,
struct itr**, USHORT, const UCHAR*,
USHORT, UCHAR*, USHORT,
UCHAR*);
ISC_STATUS IPI_unwind_request(ISC_STATUS *, struct irq **, SSHORT);
/* DSQL entrypoints */
ISC_STATUS IPI_allocate_statement(ISC_STATUS *, struct idb **,
struct ipserver_isr **);
ISC_STATUS IPI_execute(ISC_STATUS *, struct itr **,
struct ipserver_isr **, USHORT, UCHAR *,
USHORT, USHORT, UCHAR *);
ISC_STATUS IPI_execute2(ISC_STATUS *, struct itr **,
struct ipserver_isr **, USHORT, UCHAR *,
USHORT, USHORT, UCHAR *, USHORT,
UCHAR *, USHORT, USHORT, UCHAR *);
ISC_STATUS IPI_execute_immediate(ISC_STATUS*, struct idb**,
struct itr**, USHORT, const UCHAR*,
USHORT, USHORT, const UCHAR*,
USHORT, USHORT, UCHAR*);
ISC_STATUS IPI_execute_immediate2(ISC_STATUS*, struct idb**,
struct itr**, USHORT,
const UCHAR*, USHORT, USHORT,
const UCHAR*, USHORT, USHORT,
UCHAR*, USHORT, UCHAR*,
USHORT, USHORT, UCHAR*);
ISC_STATUS IPI_fetch(ISC_STATUS*, struct ipserver_isr**, USHORT,
const UCHAR*, USHORT, USHORT, UCHAR*);
ISC_STATUS IPI_free_statement(ISC_STATUS *, struct ipserver_isr **,
USHORT);
ISC_STATUS IPI_insert(ISC_STATUS *, struct ipserver_isr **, USHORT,
UCHAR *, USHORT, USHORT, UCHAR *);
ISC_STATUS IPI_prepare(ISC_STATUS *, struct itr **,
struct ipserver_isr **, USHORT, UCHAR *,
USHORT, USHORT, UCHAR *, USHORT,
UCHAR *);
ISC_STATUS IPI_set_cursor_name(ISC_STATUS*, struct ipserver_isr**,
const UCHAR*, USHORT);
ISC_STATUS IPI_sql_info(ISC_STATUS*, struct ipserver_isr**,
USHORT, const UCHAR*, USHORT, UCHAR*);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // IPAPI_PROTO_H

View File

@ -1,669 +0,0 @@
/*
* PROGRAM: Interprocess Interface definitions
* MODULE: ipc.h
* DESCRIPTION: Common descriptions
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPSERVER_IPC_H
#define IPSERVER_IPC_H
#include <stdio.h>
#include "../jrd/common.h"
#include "../jrd/thd.h"
#define ALLOC(type) ALLI_block (type, 0)
#define ALLOCV(type, count) ALLI_block (type, count)
#ifdef BUFSIZ
const USHORT BLOB_LENGTH = BUFSIZ - 20;
#else
const USHORT BLOB_LENGTH = 1024 - 20;
#endif
typedef enum {
op_attach, /* Attach database */
op_create, /* Create database */
op_detach, /* Detach database */
op_compile, /* Request based operations */
op_start,
op_start_and_send,
op_send,
op_receive,
op_unwind,
op_release,
op_transaction, /* Transaction operations */
op_commit,
op_rollback,
op_reconnect,
op_create_blob, /* Blob operations */
op_open_blob,
op_get_segment,
op_put_segment,
op_cancel_blob,
op_close_blob,
op_info_database, /* Information services */
op_info_request,
op_info_transaction,
op_info_blob,
op_prepare2,
op_commit_retaining,
op_rollback_retaining,
op_open_blob2,
op_create_blob2,
op_ddl,
op_que_events,
op_cancel_events,
op_put_slice,
op_get_slice,
op_seek_blob,
op_allocate_stmt, /* DSQL operations */
op_execute,
op_exec_immediate,
op_fetch,
op_free_stmt,
op_prepare_stmt,
op_set_cursor,
op_info_sql, /* Last opcode in V3.3 */
op_insert,
op_execute2,
op_exec_immediate2,
op_service_attach,
op_service_detach,
op_service_info,
op_service_start,
op_transact_request,
op_drop_database,
op_ping,
op_disconnect,
op_max,
op_gateway_sync = 127
} P_OP;
/* mapped file parameters */
#define IPS_MAPPED_PER_CLI(p) ((ULONG)(p) * 1024L)
#define IPS_MAPPED_FOR_CLI(p,x) ((ULONG)(x) * IPS_MAPPED_PER_CLI(p))
#define IPS_MAPPED_SIZE(p,c) ((ULONG)(c) * IPS_MAPPED_PER_CLI(p))
#define IPS_USEFUL_SPACE(p) (IPS_MAPPED_PER_CLI(p) - sizeof( ips_comm_area))
const USHORT IPS_DEF_NUM_CLI = 10; /* default clients per mapped file */
// const USHORT IPS_DEF_NUM_MAPS = 10; /* default maps available */
const USHORT IPS_DEF_PAGES_PER_CLI = 8; /* default 1k pages space per client */
const USHORT IPS_MIN_NUM_CLI = 1; /* min clients per mapped file */
// const USHORT IPS_MIN_NUM_MAPS = 1; /* min maps available */
const USHORT IPS_MIN_PAGES_PER_CLI = 1; /* min 1k pages space per client */
const USHORT IPS_MAX_NUM_CLI = 64; /* max clients per mapped file */
// const USHORT IPS_MAX_NUM_MAPS = 64; /* max maps available */
const USHORT IPS_MAX_PAGES_PER_CLI = 16; /* max 1k pages space per client */
#define IPS_PACK_PARAMS(x,p,m,u) (((ULONG)(x) << 24) + ((ULONG)(p) << 16) + ((m) << 8) + (u) + IP_BIAS)
#define IPS_UNPACK_MAX_USERS(n) (((ULONG)(n - IP_BIAS) >> 24) & 0xFF)
#define IPS_UNPACK_PAGES(n) (((ULONG)(n - IP_BIAS) >> 16) & 0xFF)
#define IPS_UNPACK_MAPNUM(n) (((ULONG)(n - IP_BIAS) >> 8) & 0xFF)
#define IPS_UNPACK_USERNUM(n) ((n - IP_BIAS) & 0xFF)
typedef struct bid {
ULONG bid_relation_id; /* Relation id (or null) */
ULONG bid_number; /* Record number */
} *BID;
/* Block types */
struct blk;
#ifndef INCLUDE_FB_BLK
#include "../include/old_fb_blk.h"
#endif
/* Block types */
typedef struct cnct {
int *cnct_read_pipe; /* this is really a FILE pointer */
int *cnct_write_pipe; /* this is really a FILE pointer */
} *CNCT;
/* mapped file structure */
typedef struct ipm {
struct ipm *ipm_next; /* pointer to next one */
USHORT ipm_count; /* slots in use */
USHORT ipm_number; /* mapped area number */
HANDLE ipm_handle; /* handle of mapped memory */
USHORT ipm_flags; /* flag word */
LPVOID ipm_address; /* address of mapped memory */
UCHAR ipm_ids[IPS_MAX_NUM_CLI];
/* ids */
} *IPM;
/* mapped structure flags */
const USHORT IPMF_SERVER_SHUTDOWN = 1; /* server has shut down */
/* thread connection control block */
typedef struct icc
{
blk icc_header;
struct icc* icc_next; /* pointer to next thread */
struct idb* icc_databases; /* linked list of attachments */
struct ipm* icc_ipm; /* pointer back to ipm */
SSHORT icc_file; /* this thread's mapped file number */
SSHORT icc_slot; /* this thread's slot number */
DWORD icc_thread_handle; /* thread's handle */
HANDLE icc_file_handle; /* mapped file's handle */
HANDLE icc_client_sem; /* client's semaphore handle */
HANDLE icc_server_sem; /* server's semaphore handle */
HANDLE icc_server_proc; /* server's process handle */
HANDLE icc_client_proc; /* client's process handle */
DWORD icc_server_id; /* server's process id */
DWORD icc_client_id; /* client's process id */
SSHORT icc_flags; /* status bits */
HANDLE icc_waits[2]; /* wait for these handles */
UCHAR* icc_mapped_addr; /* where the thread's mapped to */
} *ICC;
/* icc structure flags */
const USHORT ICCF_SHUTDOWN = 1; /* shutdown in progress */
const USHORT ICCF_SERVER_SHUTDOWN = 2; /* server has shut down */
const USHORT ICCF_UNMAP_CLIENT = 4; /* client maps must be shut down */
/* database block */
typedef struct idb
{
blk idb_header;
struct icc* idb_thread; /* back pointer to thread */
FB_API_HANDLE idb_handle; /* database handle */
struct itr* idb_transactions; /* linked list of transactions */
struct irq* idb_requests; /* compiled requests */
struct ipserver_isr* idb_sql_requests; /* SQL requests */
struct ivnt* idb_events; /* events */
struct idb* idb_next; /* pointer to next db */
int* idb_status_vector; /* pointer to status vector */
USHORT idb_flags; /* flags (see below) */
SCHAR* idb_setjmp;
} *IDB;
const USHORT IDBF_DATABASE_ATTACHMENT = 1;
const USHORT IDBF_SERVICE_ATTACHMENT = 2;
const USHORT IDBF_SERVER_SHUTDOWN = 4;
/* transaction block */
typedef struct itr
{
blk itr_header;
struct idb* itr_idb;
struct itr* itr_next;
struct ibl* itr_blobs;
FB_API_HANDLE itr_handle;
USHORT itr_flags;
} *ITR;
const USHORT ITR_limbo = 1;
/* blob control block */
typedef struct ibl
{
blk ibl_header;
struct idb* ibl_idb;
struct itr* ibl_itr;
struct ibl* ibl_next;
FB_API_HANDLE ibl_handle;
SLONG ibl_offset; /* Apparent (to user) offset in blob */
USHORT ibl_flags;
UCHAR* ibl_ptr;
USHORT ibl_length;
USHORT ibl_fragment_length;
USHORT ibl_buffer_length;
UCHAR ibl_buffer[1];
} *IBL;
//const USHORT IBL_eof = 1;
//const USHORT IBL_segment = 2;
//const USHORT IBL_eof_pending = 4;
const USHORT IBL_create = 8;
/* request block */
typedef struct irq {
blk irq_header;
struct idb *irq_idb;
struct tra *irq_itr;
struct irq *irq_next;
struct irq **irq_user_handle;
FB_API_HANDLE irq_handle;
} *IRQ;
/* event structure */
typedef struct ivnt {
blk ivnt_header;
struct ivnt *ivnt_next;
struct idb *ivnt_idb;
FPTR_EVENT_CALLBACK ivnt_ast;
void* ivnt_arg;
HWND ivnt_window;
SLONG ivnt_id;
SLONG ivnt_handle;
} *IVNT;
/* remote SQL request */
typedef struct ipserver_isr {
blk isr_header;
struct ipserver_isr *isr_next;
struct idb *isr_idb;
struct itr *isr_itr;
FB_API_HANDLE isr_handle;
USHORT isr_rec_count;
USHORT isr_max_recs;
USHORT isr_eof_flag;
USHORT isr_batch_flag;
ISC_STATUS_ARRAY isr_status;
UCHAR *isr_cursor;
UCHAR *isr_packed;
} *IPSERVER_ISR;
#define BLKDEF(type, root, tail) type,
enum blk_t {
type_MIN = 0,
#include "../ipserver/blk.h"
type_MAX
};
#undef BLKDEF
/*
This structure is used to move stuff between the ipc buffer(s)
and the client's and server's memory.
Three buffers are tracked - a client buffer, a server buffer and
a buffer within the communications data structure. For the client
and server buffers, the address within that task plus the max size
and current size are maintained. there is a flag indicating whether
the buffer is used for input, output, both or neither. For the
comm buffer, a relative offset from the start of the comm area,
the current area mapped in the comm area and its allocated size
in the comm area are maintained.
When the client needs to pass stuff to the server, space will be
allocated in the comm area for all client buffers. If there is
insufficient space, the comm buffer will be filled by the client
and emptied by the server as often as necessary to pass everything.
the same process is carried out when the server responds for any
data passed back to the client.
There can be up to five of these in use for a call to the server.
The flag words are used to indicate what, if anything, to copy for
each of the five transfer blocks.
*/
typedef struct {
ULONG ips_cl_size; /* client buffer size */
ULONG ips_sv_size; /* server buffer size */
ULONG ips_sv_alloced; /* server buffer size allocated */
ULONG ips_cl_copied; /* client buffer copied so far */
ULONG ips_sv_copied; /* server buffer copied so far */
ULONG ips_com_offset; /* offset to comm buffer */
ULONG ips_com_size; /* size of comm buffer */
ULONG ips_com_curr; /* current mapped offset of comm buffer */
ULONG ips_flags; /* flags */
UCHAR *ips_cl_addr; /* address of client buffer */
const UCHAR* ips_sv_addr; /* address of server buffer */
UCHAR *ips_sv_buffer; /* allocated local buffer */
} ips_string;
const ULONG IPS_INPUT_BUFFER = 1; /* used for input from client */
const ULONG IPS_OUTPUT_BUFFER = 2; /* used for output to client */
/*
strucure used for attachments
- attach database
- attach service
- create database
and for info calls
- blob info
- database info
- query service info
- request info
- sql request info
- transaction info
and for simple controls of various objects
- cancel blob
- cancel events
- close blob
- commit transaction
- commit transaction (retaining)
- detach database
- detach service
- drop database
- dsql free statement
- prepare transaction
- release request
- rollback transaction
- unwind request
*/
typedef struct {
UCHAR *ips_handle; /* handle of object */
ULONG ips_parameter; /* a parameter, used if needed */
} ips_object;
const USHORT IPS_ATTACH_NAME = 0; /* use controller 0 for db name */
const USHORT IPS_ATTACH_DPB = 1; /* use controller 1 for dpb */
const USHORT IPS_ATTACH_EXPANDED= 2; /* use controller 2 for exp name */
const USHORT IPS_CREATE_NAME = 0; /* use controller 0 for db name */
const USHORT IPS_CREATE_DPB = 1; /* use controller 1 for dpb */
const USHORT IPS_CREATE_EXPANDED= 2; /* use controller 2 for exp name */
const USHORT IPS_ATTACH_SVC_NAME= 0; /* use controller 0 for service name */
const USHORT IPS_ATTACH_SVC_SPB = 1; /* use controller 1 for spb */
const USHORT IPS_START_SVC_SPB = 2; /* use controller 2 for start spb */
const USHORT IPS_CLOSE_BLOB_REM = 0; /* use controller 0 for remainders */
const USHORT IPS_INFO_ITEMS = 0; /* use controller 0 for items */
const USHORT IPS_INFO_DATA = 1; /* use controller 1 for data */
const USHORT IPS_QUERY_RECV_ITEMS = 2;/* use controller 2 for recv items */
const USHORT IPS_PREPARE_TRANS = 0; /* use controller 0 for string */
/* structure used to compile requests */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_rq_handle; /* returned request handle */
} ips_compile_req;
const USHORT IPS_COMPILE_REQ = 0; /* use controller 0 for blr */
/* structure used by create/open blob (and create/open blob2) */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_tr_handle; /* transaction handle */
UCHAR *ips_bl_handle; /* returned blob handle */
ULONG ips_rel_id; /* returned relation ID */
ULONG ips_bid_number; /* returned blob ID number */
} ips_blob;
const USHORT IPS_BLOB_BPB = 0; /* use contorller 0 for bpb */
/* structure used for DDL operations */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_tr_handle; /* transaction handle */
} ips_ddl;
const USHORT IPS_DDL_DDL = 0; /* use controller 0 for ddl */
/*
structure used for most DSQL operations
- allocate
- execute
- execute2
- execute immediate
- execute immediate2
- fetch
- insert
- prepare
- set cursor
*/
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_tr_handle; /* transaction handle (in/out) */
UCHAR *ips_st_handle; /* statement handle */
ULONG ips_parameter; /* sql dialect/fetch status/set cursor */
USHORT ips_msg_type; /* message type */
USHORT ips_msg_out; /* output message type */
USHORT ips_rec_count; /* packed records count */
} ips_dsql;
const USHORT IPS_DSQL_EXEC_BLR = 0; /* use controller 0 for blr */
const USHORT IPS_DSQL_EXEC_MSG = 1; /* use controller 1 for message */
const USHORT IPS_DSQL_EXEC2_BLR_IN = IPS_DSQL_EXEC_BLR;
const USHORT IPS_DSQL_EXEC2_MSG_IN = IPS_DSQL_EXEC_MSG;
const USHORT IPS_DSQL_EXEC2_BLR_OUT = 2; /* use controller 2 for output blr */
const USHORT IPS_DSQL_EXEC2_MSG_OUT = 3; /* use controller 3 for output msg */
const USHORT IPS_DSQL_EXEC_IMMED_SQL = 0; /* use controller 0 for sql */
const USHORT IPS_DSQL_EXEC_IMMED_BLR = 1; /* use controller 1 for blr */
const USHORT IPS_DSQL_EXEC_IMMED_MSG = 2; /* use controller 2 for message */
const USHORT IPS_DSQL_EXEC_IMMED2_SQL = IPS_DSQL_EXEC_IMMED_SQL;
const USHORT IPS_DSQL_EXEC_IMMED2_BLR_IN = IPS_DSQL_EXEC_IMMED_BLR;
const USHORT IPS_DSQL_EXEC_IMMED2_MSG_IN = IPS_DSQL_EXEC_IMMED_MSG;
const USHORT IPS_DSQL_EXEC_IMMED2_BLR_OUT = 3; /* use controller 3 for output blr */
const USHORT IPS_DSQL_EXEC_IMMED2_MSG_OUT = 4; /* use controller 4 for output msg */
const USHORT IPS_DSQL_FETCH_BLR = 0; /* use controller 0 for blr */
const USHORT IPS_DSQL_FETCH_MSG = 1; /* use controller 1 for message */
const USHORT IPS_DSQL_INSERT_BLR = 0; /* use controller 0 for blr */
const USHORT IPS_DSQL_INSERT_MSG = 1; /* use controller 1 for message */
const USHORT IPS_DSQL_PREP_STRING = 0; /* use controller 0 for string */
const USHORT IPS_DSQL_PREP_ITEMS = 1; /* use controller 1 for items */
const USHORT IPS_DSQL_PREP_BUFFER = 2; /* use controller 2 for buffer */
const USHORT IPS_DSQL_SET_CURSOR = 0; /* use controller 0 for name */
/* structure used to get/put blob segments */
typedef struct {
UCHAR *ips_bl_handle; /* blob handle */
USHORT ips_length; /* returned actual length */
} ips_segment;
const USHORT IPS_BLOB_SEGMENT = 0; /* use controller 0 for segment */
/* structure used to get/put array slices */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_tr_handle; /* transaction handle */
ULONG ips_rel_id; /* array rel id */
ULONG ips_number; /* array number */
ULONG ips_length; /* returned actual length */
} ips_slice;
const USHORT IPS_SLICE_SDL = 0; /* use controller 0 for sdl */
const USHORT IPS_SLICE_PARAM = 1; /* use controller 1 for parameters */
const USHORT IPS_SLICE_BUFFER = 2; /* use controller 2 for slice */
/* structure for queueing events */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
ULONG ips_event_id; /* returned event id */
HWND ips_event_hwnd; /* window handle to return to */
FPTR_EVENT_CALLBACK ips_ast; /* ast address */
UCHAR* ips_arg; /* ast arg */
} ips_que_events;
const USHORT IPS_QUEUE_EVENT = 0; /* use controller 0 for event */
/* structure for send/receive message */
typedef struct {
UCHAR *ips_tr_handle; /* transaction handle */
UCHAR *ips_rq_handle; /* request handle */
USHORT ips_msg_type; /* message type */
USHORT ips_req_level; /* request level */
#ifdef SCROLLABLE_CURSORS
USHORT ips_direction; /* direction */
ULONG ips_offset; /* offset */
#endif
} ips_request;
const USHORT IPS_SEND_MESSAGE = 0; /* use controller 0 for message */
const USHORT IPS_RECEIVE_MESSAGE = 0; /* use controller 0 for message */
/* structure used to reconnect transaction */
typedef struct {
UCHAR *ips_db_handle; /* transaction handle */
UCHAR *ips_tr_handle; /* transaction handle */
} ips_reconnect;
const USHORT IPS_RECONNECT_ID = 0; /* use controller 0 for id */
/* structure used to seek into a blob */
typedef struct {
UCHAR *ips_bl_handle; /* blob handle */
ULONG ips_offset; /* offset into blob */
ULONG ips_result; /* returned result */
USHORT ips_mode; /* seek mode */
} ips_seek_blob;
/* structure used to start transactions */
typedef struct {
UCHAR *ips_tr_handle; /* returned transaction handle */
USHORT ips_db_count; /* number of db's in transaction */
} ips_start_trans;
/* structure used for transact request */
typedef struct {
UCHAR *ips_db_handle; /* database handle */
UCHAR *ips_tr_handle; /* transaction handle (in/out) */
} ips_transact_request;
const USHORT IPS_TRANS_REQ_BLR = 0; /* use controller 0 for blr */
const USHORT IPS_TRANS_REQ_IN_MSG = 1; /* use controller 1 for input msg */
const USHORT IPS_TRANS_REQ_OUT_MSG = 2; /* use controller 2 for output msg */
/*
This structure is mapped to the start of the allocated
communications area between the client and server.
*/
const USHORT MAX_IPS_STRINGS = 5;
typedef struct {
ULONG ips_server_protocol; /* server's protocol level */
ULONG ips_client_protocol; /* client's protocol level */
ISC_STATUS_ARRAY ips_status; /* status vector */
ips_string ips_buffers[MAX_IPS_STRINGS];
/* array of buffer controllers */
USHORT ips_ops_count; /* operations performed */
USHORT ips_sequence; /* transfer sequence number */
USHORT ips_operation; /* operation being performed */
HANDLE ips_server_proc; /* server's process handle */
HANDLE ips_client_proc; /* client's process handle */
DWORD ips_server_id; /* server's process id */
DWORD ips_client_id; /* client's process id */
union {
ips_object ips_op_object;
ips_compile_req ips_op_compile;
ips_blob ips_op_blob;
ips_ddl ips_op_ddl;
ips_dsql ips_op_dsql;
ips_segment ips_op_segment;
ips_slice ips_op_slice;
ips_que_events ips_op_que_evnt;
ips_request ips_op_request;
ips_reconnect ips_op_recon_trans;
ips_seek_blob ips_op_sk_blob;
ips_start_trans ips_op_strt_trans;
ips_transact_request ips_op_trans_req;
} ips_operations;
ULONG ips_data[1]; /* start of data area */
} ips_comm_area, *IPS;
/* size of mapped memory for a given client */
//#define CLIENT_SERVER_AREA_SIZE 8192
/* size available for packing stuff in the mapped area */
//#define CLIENT_SERVER_AVAIL (CLIENT_SERVER_AREA_SIZE - sizeof(ips_comm_area))
/* Windows names used to identify various named objects */
static const char* IPI_MAPPED_FILE_NAME = "%sMappedArea%d";
static const char* IPI_CLIENT_SEM_NAME = "%sClientSem%d_%d";
static const char* IPI_SERVER_SEM_NAME = "%sServerSem%d_%d";
static const char* IPI_EVENT_NAME = "%sEvent%d";
static const char* IPI_EVENT_CLASS = "%sEventClass";
static const char* IPI_EVENT_THREAD = "%sEventThread%d_%d";
/* local event queue structure */
typedef struct eventq {
struct eventq *evq_next; /* next event */
SLONG evq_id; /* event ID */
USHORT evq_length; /* event length */
UCHAR evq_string[1]; /* event string */
} *EVENTQ;
/* interprocess database thread structure */
class tidb : public ThreadData
{
public:
struct rdb *tidb_database;
ISC_STATUS *tidb_status_vector;
UCHAR *tidb_setjmp;
};
typedef tidb* TIDB;
/* bias for connect messages */
const ULONG IP_BIAS = 3333;
#endif /* IPSERVER_IPC_H */

View File

@ -1,126 +0,0 @@
/*
* PROGRAM: Interprocess Client
* MODULE: ipcevent.cpp
* DESCRIPTION: Interprocess interface event window initializer
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include "firebird.h"
#include <windows.h>
#include "../ipserver/ipcli_proto.h"
#include "../ipserver/ipevt_proto.h"
#include "../ipserver/ips.h"
// instance handle
extern HINSTANCE hIBDLLInstance;
// callback for event handling
LRESULT CALLBACK IBEventWindowFunc(HWND, UINT, WPARAM, LPARAM);
int IPC_window_init(
char *class_name,
char *task_name, HWND * event_window, HANDLE event_sem)
{
/**************************************
*
* I P C _ w i n d o w _ i n i t
*
**************************************
*
* Functional description
* Initialize the window used to process events.
*
**************************************/
HWND hWnd;
WNDCLASS wcl;
DWORD result;
MSG msg;
wcl.hInstance = hIBDLLInstance;
wcl.lpszClassName = class_name;
wcl.lpfnWndProc = IBEventWindowFunc;
wcl.style = 0;
wcl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.lpszMenuName = NULL;
wcl.cbClsExtra = 0;
wcl.cbWndExtra = 0;
wcl.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
if (!RegisterClass(&wcl)) {
result = GetLastError();
return 0;
}
hWnd = CreateWindow(class_name,
task_name,
WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU |
WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL,
hIBDLLInstance, NULL);
ShowWindow(hWnd, SW_HIDE);
UpdateWindow(hWnd);
// return handle and signal with semaphore
*event_window = hWnd;
ReleaseSemaphore(event_sem, 1L, NULL);
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK IBEventWindowFunc(HWND hWnd,
UINT message, WPARAM wParam, LPARAM lParam)
{
COPYDATASTRUCT *cpdata;
switch (message) {
case WM_CLOSE:
DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_COPYDATA:
cpdata = (COPYDATASTRUCT *) lParam;
IPC_process_event(cpdata->dwData, cpdata->cbData, cpdata->lpData);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}

View File

@ -1,40 +0,0 @@
/*
* PROGRAM: JRD Access Method
* MODULE: ipcli_proto.h
* DESCRIPTION: Prototype header file for ipclient.cpp
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPCLI_PROTO_H
#define IPCLI_PROTO_H
#ifdef __cplusplus
extern "C" {
#endif
void IPC_process_event(DWORD, DWORD, LPVOID);
void IPC_release_all(void);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* IPCLI_PROTO_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
/*
* PROGRAM: JRD Access Method
* MODULE: ipevt_proto.h
* DESCRIPTION: Prototype header file for ipcevent.cpp
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPEVT_PROTO_H
#define IPEVT_PROTO_H
int IPC_window_init(char*, char*, HWND*, HANDLE);
#endif /* IPEVT_PROTO_H */

View File

@ -1,30 +0,0 @@
/*
* PROGRAM: Interprocess Interface definitions
* MODULE: ips.h
* DESCRIPTION: Common descriptions
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPSERVER_IPS_H
#define IPSERVER_IPS_H
#define IPI_CONNECT_MESSAGE WM_USER + 1
#endif /* IPSERVER_IPS_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
/*
* PROGRAM: Interprocess server
* MODULE: ips_proto.h
* DESCRIPTION: Prototpe header file for ipserver.cpp
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef IPSRV_PROTO_H
#define IPSRV_PROTO_H
USHORT IPS_init(HWND, USHORT, USHORT, USHORT);
ULONG IPS_start_thread(ULONG);
#endif /* IPSRV_PROTO_H */