COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GeoWorks 1989 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		Database Manager -- Library Interface
FILE:		dbase.def

AUTHOR:		John Wedgwood, 21-Jun-89

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	jcw	21-Jun-89	Initial revision


DESCRIPTION:
	Include file for people using the database manager.
		
	$Id: dbase.def,v 1.1 97/04/04 14:24:00 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

SetDef	__DBASE

StartKernel

global DBLock:far
global DBUnlock:far
global DBDirty:far
global DBAlloc:far
global DBReAlloc:far
global DBFree:far
global DBGroupAlloc:far
global DBGroupFree:far
global DBSetMap:far
global DBGetMap:far
global DBLockMap:far
global DBInsertAt:far
global DBDeleteAt:far
global DBCopyDBItem:far
global DBInfo:far

;-

global DBLOCKUNGROUPED:far
global DBUNLOCK:far
global DBDIRTY:far
global DBGETMAP:far
global DBLOCKGETREFUNGROUPED:far
global DBRAWALLOC:far
global DBREALLOCUNGROUPED:far
global DBFREEUNGROUPED:far
global DBGROUPALLOC:far
global DBGROUPFREE:far
global DBINSERTATUNGROUPED:far
global DBDELETEATUNGROUPED:far
global DBSETMAPUNGROUPED:far
global DBRAWCOPYDBITEM:far
global DBINFOUNGROUPED:far

DBGroupAndItem	struct
    DBGI_item	word
    DBGI_group	word
DBGroupAndItem	ends

; This constant, when passed to the routine DBAlloc() will cause the
; allocation to occur in one of (potentially) many the database files
; locally managed groups. The group in which the item is allocated is
; returned to the caller so that it has a reference to it.

; This concept of allowing the database manager to choose the group in which
; the item is allocated is termed "allocating an item ungrouped".

; This is somewhat of a misnomer, since the item has a group, and the
; application needs to specify the group when manipulating or accessing the
; item.

; The idea behind ungrouped items is that their group and item blocks are
; managed by the database manager in such a way that the group blocks are
; kept to a reasonable size.

; If an application has one type of data (say a simple rolodex database) but
; can have potentially thousands and thousands of records, it can use
; ungrouped allocation to force the database manager to do the bookkeeping
; regarding when to create a new group for records.

DB_UNGROUPED	=	-1

EndKernel


