xa.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1998
* Sleepycat Software. All rights reserved.
*
* @(#)xa.h 10.1 (Sleepycat) 6/22/98
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Start of xa.h header
*
* Define a symbol to prevent multiple inclusions of this header file
*/
#ifndef XA_H
#define XA_H
/*
* Transaction branch identification: XID and NULLXID:
*/
struct xid_t {
long formatID; /* format identifier */
long gtrid_length; /* value from 1 through 64 */
long bqual_length; /* value from 1 through 64 */
char data[XIDDATASIZE];
};
/*
* A value of -1 in formatID means that the XID is null.
*/
/*
* Declarations of routines by which RMs call TMs:
*/
/*
* XA Switch Data Structure
*/
/* including the null terminator */
/* strings, including the null
terminator */
struct xa_switch_t {
long flags; /* resource manager specific options */
long version; /* must be 0 */
int (*xa_open_entry) /* xa_open function pointer */
__P((char *, int, long));
int (*xa_close_entry) /* xa_close function pointer */
__P((char *, int, long));
int (*xa_start_entry) /* xa_start function pointer */
int (*xa_end_entry) /* xa_end function pointer */
int (*xa_rollback_entry) /* xa_rollback function pointer */
int (*xa_prepare_entry) /* xa_prepare function pointer */
int (*xa_commit_entry) /* xa_commit function pointer */
int (*xa_recover_entry) /* xa_recover function pointer */
int (*xa_forget_entry) /* xa_forget function pointer */
int (*xa_complete_entry) /* xa_complete function pointer */
__P((int *, int *, int, long));
};
/*
* Flag definitions for the RM switch
*/
selected */
registers */
association migration */
asynchronous operations */
/*
* Flag definitions for xa_ and ax_ routines
*/
/* use TMNOFLAGGS, defined above, when not specifying other flags */
optimisation */
transaction branch rollback-only */
exists */
suspended transaction branch */
branch */
association */
operation */
transaction branch */
migration */
/*
* ax_() return codes (transaction manager reports to resource manager)
*/
transaction branch */
suspended transaction branch */
#define TM_OK 0 /* normal execution */
manager */
context */
/*
* xa_() return codes (resource manager reports to transaction manager)
*/
rollback codes */
unspecified reason */
communication failure */
integrity of the resources was
detected */
transaction branch for a reason not
on this list */
resource manager */
rollback codes */
suspension occurred */
been heuristically completed */
heuristically committed */
heuristically rolled back */
heuristically committed and rolled
back */
may be re-issued */
and has been committed */
#define XA_OK 0 /* normal execution */
outstanding */
the transaction branch */
context */
transaction */
#endif /* ifndef XA_H */
/*
* End of xa.h header
*/