infra: Clean up project setup
[jog] / tx-socket.h
CommitLineData
2ec1e693 1/* -*-c-*-
2 *
0c03354b 3 * $Id: tx-socket.h,v 1.3 2002/02/02 19:17:25 mdw Exp $
2ec1e693 4 *
5 * Socket transport
6 *
7 * (c) 2001 Mark Wooding
8 */
9
10/*----- Licensing notice --------------------------------------------------*
11 *
12 * This file is part of Jog: Programming for a jogging machine.
13 *
14 * Jog is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * Jog is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Jog; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
2ec1e693 29#ifndef TX_SOCKET_H
30#define TX_SOCKET_H
31
32#ifdef __cplusplus
33 extern "C" {
34#endif
35
36/*----- Header files ------------------------------------------------------*/
37
38#ifdef HAVE_CONFIG_H
39# include "config.h"
40#endif
41
42#ifndef TXPORT_H
43# include "txport.h"
44#endif
45
46/*----- Functions provided ------------------------------------------------*/
47
9c493717 48extern txport *txsock_create(const char */*file*/);
2ec1e693 49extern void *txsock_fetch(void */*txv*/);
50extern ssize_t txsock_write(txport */*txg*/,
51 const void */*p*/, size_t /*sz*/);
52extern void txsock_destroy(txport */*txg*/);
53
54#ifdef TX_LIST
55 static const struct txfile txsock_fv[] = {
56 { "JOGSOCK", 0 },
0c03354b 57 { 0, JOGSOCKET },
2ec1e693 58 };
59
60 static txport_ops txsock_ops = {
61 TX_LIST, "socket", txsock_fv, 0,
9c493717 62 txsock_create, 0, txsock_fetch, txsock_write, txsock_destroy
2ec1e693 63 };
64# undef TX_LIST
65# define TX_LIST &txsock_ops
66#endif
67
68/*----- That's all, folks -------------------------------------------------*/
69
70#ifdef __cplusplus
71 }
72#endif
73
74#endif