/*
_____       _    _    Corso   Italia,  178
(_|__   .  (_   |_|_  56125           Pisa
(_|_) |)|(()_)()| |   tel.  +39  050 46380
  |   |               picosoft@picosoft.it

 Copyright (C) Picosoft s.r.l. 1999-2002

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2, or (at your option)
 any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
#ifndef picolog_h
#define picolog_h "$Id: picolog.h,v 1.1 2002/05/06 11:24:52 picoSoft Exp $"

# define TNX_BEGIN_WORK    0x4257
# define TNX_COMMIT_WORK   0x4357
# define TNX_ROLLBACK_WORK 0x5257
# define TNX_FILE_OPEN     0x464F
# define TNX_FILE_CLOSE    0x4643
# define TNX_INSERT        0x494E
# define TNX_UPDATE        0x5550
# define TNX_DELETE        0x4445

typedef int (*TransactionCallback)(unsigned short , short , unsigned long,
                                   char *, unsigned short ,
                                   char *, unsigned short);
typedef int (*RecoverCallback)(unsigned short , char * , unsigned long,
                               char *, unsigned short ,
                               char *, unsigned short);

int _pI__logOpen (char *fileName, TransactionCallback commit,
                                  TransactionCallback rollback);
int _pI__logClose ();
int _pI__transaction (unsigned short tnxType, short isfd, unsigned long recNum,
                      char *beforeImage, unsigned short biLen,
                      char *afterImage, unsigned short aiLen);
int _pI__recover (RecoverCallback fDo);

# endif
