105b261ecSmrg/*
205b261ecSmrg * Copyright (c) 1997  Metro Link Incorporated
305b261ecSmrg *
405b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a
505b261ecSmrg * copy of this software and associated documentation files (the "Software"),
605b261ecSmrg * to deal in the Software without restriction, including without limitation
705b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
805b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the
905b261ecSmrg * Software is furnished to do so, subject to the following conditions:
1005b261ecSmrg *
1105b261ecSmrg * The above copyright notice and this permission notice shall be included in
1205b261ecSmrg * all copies or substantial portions of the Software.
1305b261ecSmrg *
1405b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1505b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1605b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1705b261ecSmrg * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1805b261ecSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
1905b261ecSmrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2005b261ecSmrg * SOFTWARE.
2105b261ecSmrg *
2205b261ecSmrg * Except as contained in this notice, the name of the Metro Link shall not be
2305b261ecSmrg * used in advertising or otherwise to promote the sale, use or other dealings
2405b261ecSmrg * in this Software without prior written authorization from Metro Link.
2505b261ecSmrg *
2605b261ecSmrg */
2705b261ecSmrg
2805b261ecSmrg#ifndef	_xisb_H_
2905b261ecSmrg#define _xisb_H_
3005b261ecSmrg
3105b261ecSmrg#include <unistd.h>
3205b261ecSmrg
3305b261ecSmrg/******************************************************************************
3405b261ecSmrg *		Definitions
3505b261ecSmrg *									structs, typedefs, #defines, enums
3605b261ecSmrg *****************************************************************************/
3705b261ecSmrg
3835c4bbdfSmrgtypedef struct _XISBuffer {
3935c4bbdfSmrg    int fd;
4035c4bbdfSmrg    int trace;
4135c4bbdfSmrg    int block_duration;
4235c4bbdfSmrg    ssize_t current;            /* bytes read */
4335c4bbdfSmrg    ssize_t end;
4435c4bbdfSmrg    ssize_t buffer_size;
4535c4bbdfSmrg    unsigned char *buf;
4605b261ecSmrg} XISBuffer;
4705b261ecSmrg
4805b261ecSmrg/******************************************************************************
4905b261ecSmrg *		Declarations
5005b261ecSmrg *								variables:	use xisb_LOC in front
5105b261ecSmrg *											of globals.
5205b261ecSmrg *											put locals in the .c file.
5305b261ecSmrg *****************************************************************************/
5435c4bbdfSmrgextern _X_EXPORT XISBuffer *XisbNew(int fd, ssize_t size);
5535c4bbdfSmrgextern _X_EXPORT void XisbFree(XISBuffer * b);
5635c4bbdfSmrgextern _X_EXPORT int XisbRead(XISBuffer * b);
5735c4bbdfSmrgextern _X_EXPORT ssize_t XisbWrite(XISBuffer * b, unsigned char *msg,
5835c4bbdfSmrg                                   ssize_t len);
5935c4bbdfSmrgextern _X_EXPORT void XisbTrace(XISBuffer * b, int trace);
6035c4bbdfSmrgextern _X_EXPORT void XisbBlockDuration(XISBuffer * b, int block_duration);
6105b261ecSmrg
6205b261ecSmrg/*
6305b261ecSmrg *	DO NOT PUT ANYTHING AFTER THIS ENDIF
6405b261ecSmrg */
6505b261ecSmrg#endif
66