summaryrefslogtreecommitdiffstats
path: root/src/save/ufo-roof-read.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2020-09-03 03:00:30 +0200
committerSuren A. Chilingaryan <csa@suren.me>2020-09-03 03:00:30 +0200
commit5172421d248250b4ab3b69eb57fd83656e23a4da (patch)
treea499d9f1dd0b74b754816884a59927b3171656fc /src/save/ufo-roof-read.h
parent7b2e6168b049be9e7852b2d364d897592eff69fc (diff)
downloadufo-roof-temp-master.tar.gz
ufo-roof-temp-master.tar.bz2
ufo-roof-temp-master.tar.xz
ufo-roof-temp-master.zip
This is unfinished work implemeting out-of-UFO network serversHEADmaster
Diffstat (limited to 'src/save/ufo-roof-read.h')
-rw-r--r--src/save/ufo-roof-read.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/save/ufo-roof-read.h b/src/save/ufo-roof-read.h
new file mode 100644
index 0000000..16e910b
--- /dev/null
+++ b/src/save/ufo-roof-read.h
@@ -0,0 +1,61 @@
+#ifndef __UFO_ROOF_READ_H
+#define __UFO_ROOF_READ_H
+
+typedef struct _UfoRoofRead UfoRoofRead;
+
+#include "ufo-roof-config.h"
+#include "ufo-roof-buffer.h"
+//#include "ufo-roof-read-thread.h"
+
+G_BEGIN_DECLS
+
+typedef struct _UfoRoofReadInterface UfoRoofReadInterface;
+typedef struct _UfoRoofReadInterfaceSettings UfoRoofReadInterfaceSettings;
+
+//typedef guint (*UfoRoofReaderRead)(UfoRoofReadInterface *reader, uint8_t *buf, GError **error);
+
+typedef guint (*UfoRoofReaderRead)(UfoRoofReadInterface *reader, uint8_t **buf, GError **error);
+typedef void (*UfoRoofReaderClose)(UfoRoofReadInterface *reader);
+
+struct _UfoRoofReadInterfaceSettings {
+ guint padding; // Packet size + padding
+};
+
+struct _UfoRoofReadInterface {
+ UfoRoofReaderRead read;
+ UfoRoofReaderClose close;
+
+ UfoRoofReadInterfaceSettings settings;
+};
+
+typedef enum {
+ UFO_ROOF_OP_STOP = 0,
+ UFO_ROOF_OP_READ
+} UfoRoofOp;
+
+struct _UfoRoofReadContext {
+ UfoRoofConfig *cfg;
+ UfoRoofBuffer *buf;
+ UfoRoofReadInterface *rdi;
+
+ gulong packet
+// UfoRoofReadThread *thr;
+
+ guint n_threads;
+ UfoRoofOp op; // Current operation (reading by default)
+};
+
+
+
+/*
+UfoRoofRead *ufo_roof_read_new(UfoRoofConfig *cfg, UfoRoofReadInterface *rdi, UfoRoofBuffer *buf, GError **error);
+void ufo_roof_read_free(UfoRoofRead *ctx);
+gboolean ufo_roof_read_start(UFORoofRead *ctx, GError **error);
+gboolean ufo_roof_read_stop(UFORoofRead *ctx, GError **error);
+
+const UfoRoofReadInterfaceSettings *ufo_roof_read_get_settings(UFORoofRead *ctx, GError **error);
+*/
+
+G_END_DECLS
+
+#endif /* __UFO_ROOF_READ_H */