| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include <gio/gio.h> |
| 19 |
|
| 20 |
#ifndef __HAVE_BYZANZ_QUEUE_H__ |
| 21 |
#define __HAVE_BYZANZ_QUEUE_H__ |
| 22 |
|
| 23 |
typedef struct _ByzanzQueue ByzanzQueue; |
| 24 |
typedef struct _ByzanzQueueClass ByzanzQueueClass; |
| 25 |
|
| 26 |
#define BYZANZ_QUEUE_FILE_SIZE 16 * 1024 * 1024 |
| 27 |
|
| 28 |
#define BYZANZ_TYPE_QUEUE (byzanz_queue_get_type()) |
| 29 |
#define BYZANZ_IS_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BYZANZ_TYPE_QUEUE)) |
| 30 |
#define BYZANZ_IS_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BYZANZ_TYPE_QUEUE)) |
| 31 |
#define BYZANZ_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BYZANZ_TYPE_QUEUE, ByzanzQueue)) |
| 32 |
#define BYZANZ_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BYZANZ_TYPE_QUEUE, ByzanzQueueClass)) |
| 33 |
#define BYZANZ_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BYZANZ_TYPE_QUEUE, ByzanzQueueClass)) |
| 34 |
|
| 35 |
struct _ByzanzQueue { |
| 36 |
GObject object; |
| 37 |
|
| 38 |
GOutputStream * output; |
| 39 |
GInputStream * input; |
| 40 |
|
| 41 |
volatile int shared_count; |
| 42 |
|
| 43 |
GAsyncQueue * files; |
| 44 |
guint output_closed:1; |
| 45 |
guint input_closed:1; |
| 46 |
}; |
| 47 |
|
| 48 |
struct _ByzanzQueueClass { |
| 49 |
GObjectClass object_class; |
| 50 |
}; |
| 51 |
|
| 52 |
GType byzanz_queue_get_type (void) G_GNUC_CONST; |
| 53 |
|
| 54 |
ByzanzQueue * byzanz_queue_new (void); |
| 55 |
|
| 56 |
GOutputStream * byzanz_queue_get_output_stream (ByzanzQueue * queue); |
| 57 |
GInputStream * byzanz_queue_get_input_stream (ByzanzQueue * queue); |
| 58 |
|
| 59 |
|
| 60 |
#endif |