cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Copyright (c) 1997 Metro Link Incorporated
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Permission is hereby granted, free of charge, to any person obtaining a
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * copy of this software and associated documentation files (the "Software"),
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * to deal in the Software without restriction, including without limitation
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * and/or sell copies of the Software, and to permit persons to whom the
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Software is furnished to do so, subject to the following conditions:
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * The above copyright notice and this permission notice shall be included in
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * all copies or substantial portions of the Software.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * SOFTWARE.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Except as contained in this notice, the name of the Metro Link shall not be
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * used in advertising or otherwise to promote the sale, use or other dealings
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * in this Software without prior written authorization from Metro Link.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#ifndef _xisb_H_
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#define _xisb_H_
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#include <unistd.h>
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/******************************************************************************
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Definitions
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * structs, typedefs, #defines, enums
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *****************************************************************************/
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsynctypedef struct _XISBuffer
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync{
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync int fd;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync int trace;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync int block_duration;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync ssize_t current; /* bytes read */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync ssize_t end;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync ssize_t buffer_size;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync unsigned char *buf;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync} XISBuffer;
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/******************************************************************************
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * Declarations
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * variables: use xisb_LOC in front
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * of globals.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * put locals in the .c file.
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync *****************************************************************************/
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT XISBuffer * XisbNew (int fd, ssize_t size);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT void XisbFree (XISBuffer *b);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT int XisbRead (XISBuffer *b);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT void XisbTrace (XISBuffer *b, int trace);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsyncextern _X_EXPORT void XisbBlockDuration (XISBuffer *b, int block_duration);
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync/*
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync * DO NOT PUT ANYTHING AFTER THIS ENDIF
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync */
cabde247f900dcf6e58d009bbdd15099c028c6fcvboxsync#endif