summaryrefslogtreecommitdiff
path: root/agwlib.h
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
committerDave Hibberd <d@vehibberd.com>2023-09-12 21:38:15 +0100
commit3cdcbeea3e2891f4a10c79b272da144f37ff24f3 (patch)
treedc2daaabc2ba68cc125fc21bd35f8e67bdb0499e /agwlib.h
parentf7fc865d93f8448779d320ce152f0fa44a64fcad (diff)
New upstream version 0.67upstream/0.67
Diffstat (limited to 'agwlib.h')
-rw-r--r--agwlib.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/agwlib.h b/agwlib.h
new file mode 100644
index 0000000..688f918
--- /dev/null
+++ b/agwlib.h
@@ -0,0 +1,45 @@
+
+#ifndef AGWLIB_H
+#define AGWLIB_H 1
+
+
+// Call at beginning to start it up.
+
+int agwlib_init (char *host, char *port, int (*init_func)(void));
+
+
+
+// Send commands to TNC.
+
+
+int agwlib_X_register_callsign (int chan, char *call_from);
+
+int agwlib_x_unregister_callsign (int chan, char *call_from);
+
+int agwlib_G_ask_port_information (void);
+
+int agwlib_C_connect (int chan, char *call_from, char *call_to);
+
+int agwlib_d_disconnect (int chan, char *call_from, char *call_to);
+
+int agwlib_D_send_connected_data (int chan, int pid, char *call_from, char *call_to, int data_len, char *data);
+
+int agwlib_Y_outstanding_frames_for_station (int chan, char *call_from, char *call_to);
+
+
+
+// The application must define these.
+
+void agw_cb_C_connection_received (int chan, char *call_from, char *call_to, int data_len, char *data);
+void on_C_connection_received (int chan, char *call_from, char *call_to, int incoming, char *data);
+
+void agw_cb_d_disconnected (int chan, char *call_from, char *call_to, int data_len, char *data);
+
+void agw_cb_D_connected_data (int chan, char *call_from, char *call_to, int data_len, char *data);
+
+void agw_cb_G_port_information (int num_chan, char *chan_descriptions[]);
+
+void agw_cb_Y_outstanding_frames_for_station (int chan, char *call_from, char *call_to, int frame_count);
+
+
+#endif \ No newline at end of file