blob: 16e910b25037c3524788bc52ff698c911d9e44cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 */
|