source: trunk/src/ifd/ria.h @ 768

Revision 768, 1.5 KB checked in by aj, 7 years ago (diff)

silence warnings about extra "," and "" style comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*
2 * Access to remote IFD handlers
3 *
4 * Copyright (C) 2003, Olaf Kirch <okir@suse.de>
5 */
6
7#ifndef IFD_REMOTE_H
8#define IFD_REMOTE_H
9
10typedef struct ria_client {
11        /* Socket for communication with ifdproxy */
12        ct_socket_t *sock;
13        uint32_t xid;
14
15        /* queue for buffering data */
16        ct_buf_t data;
17
18        /* application data */
19        void *user_data;
20} ria_client_t;
21
22#define RIA_NAME_MAX    32
23typedef struct ria_device {
24        char address[RIA_NAME_MAX];
25        char type[RIA_NAME_MAX / 2];
26        char handle[RIA_NAME_MAX];
27        char name[RIA_NAME_MAX];
28} ria_device_t;
29
30typedef struct ria_serial_conf {
31        uint32_t speed;
32        uint8_t bits;
33        uint8_t stopbits;
34        uint8_t parity;
35        uint8_t check_parity;
36        uint8_t dtr;
37        uint8_t rts;
38} ria_serial_conf_t;
39
40enum {
41        /* These are for the manager only */
42        RIA_MGR_LIST = 0x00,
43        RIA_MGR_INFO,
44        RIA_MGR_CLAIM,
45        RIA_MGR_REGISTER,
46
47        __RIA_PEER_CMD_BASE = 0x10,
48        RIA_RESET_DEVICE = 0x10,
49        RIA_FLUSH_DEVICE,
50        RIA_SEND_BREAK,
51        RIA_SERIAL_GET_CONFIG,
52        RIA_SERIAL_SET_CONFIG,
53
54        RIA_DATA = 0x80
55};
56
57extern ria_client_t *ria_connect(const char *);
58extern void ria_free(ria_client_t *);
59extern int ria_send(ria_client_t *, unsigned char, const void *, size_t);
60extern int ria_command(ria_client_t *, unsigned char,
61                       const void *, size_t, void *, size_t, long timeout);
62
63extern int ria_svc_listen(const char *, int);
64extern ria_client_t *ria_export_device(const char *, const char *);
65extern int ria_register_device(ria_client_t *, const char *);
66extern void ria_print_packet(ct_socket_t *, int,
67                             const char *, header_t *, ct_buf_t *);
68
69#endif                          /* IFD_REMOTE_H */
Note: See TracBrowser for help on using the repository browser.