/* * rplay.h * * Copyright (c) 1992 by Mark Boyns * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation. This software is provided "as is" without express or * implied warranty. */ #ifndef _rplay_h #define _rplay_h /* * rplay UDP port for non-inetd users */ #define RPLAY_PORT 55555 /* * maximum size of an rplay packet */ #define MAX_PACKET 8192 /* * the rplay attributes */ #define RPLAY_NULL 0 #define RPLAY_PLAY 1 #define RPLAY_VOLUME_PLAY 2 #define RPLAY_STOP 3 #define RPLAY_PAUSE 4 #define RPLAY_CONTINUE 5 #define RPLAY_APPEND_PLAY 6 #define RPLAY_APPEND_VOLUME_PLAY 7 #define RPLAY_APPEND_STOP 8 #define RPLAY_APPEND_PAUSE 9 #define RPLAY_APPEND_CONTINUE 10 /* * rplay volume restrictions */ #define RPLAY_MIN_VOLUME 0 #define RPLAY_DEFAULT_VOLUME 128 #define RPLAY_MAX_VOLUME 255 /* * rplay errors used by rplay_errno */ #define RPLAY_ERROR_NONE 0 #define RPLAY_ERROR_MEMORY 1 #define RPLAY_ERROR_HOST 2 #define RPLAY_ERROR_SERVICE 3 #define RPLAY_ERROR_CONNECT 4 #define RPLAY_ERROR_SOCKET 5 #define RPLAY_ERROR_ATTRIBUTE 6 #define RPLAY_ERROR_WRITE 7 #define RPLAY_ERROR_CLOSE 8 #define RPLAY_ERROR_APPEND 9 #define RPLAY_ERROR_PACKET_SIZE 10 #define RPLAY_ERROR_BROADCAST 11 /* * the RPLAY structure */ typedef struct { int size; int grow; int len; char *buf; } RPLAY; extern int rplay_errno; extern char *rplay_errlist[]; RPLAY *rplay_create(); #endif _rplay_h