From 856c939b40c2268253ba075cde49f76d3f3443a0 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Wed, 12 Dec 2007 23:51:31 -0500 Subject: [PATCH] core: 1st compile - corrected function pointer declarations --- core/include/output_item.h | 68 +++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 31 deletions(-) rewrite core/include/output_item.h (62%) diff --git a/core/include/output_item.h b/core/include/output_item.h dissimilarity index 62% index 4db0d6c..a5b3648 100644 --- a/core/include/output_item.h +++ b/core/include/output_item.h @@ -1,31 +1,37 @@ -#ifndef OUTPUT_ITEM_H -#define OUTPUT_ITEM_H - -#include - -#include "fdtypes.h" - -typedef struct { - (void)(added_to*)(output_item *this, output_item* target); - (size_t)(get_size*)(output_item *this); - (void)(prepare*)(output_item *this); - - /* Handle windows handles? */ - /* TODO: Define return values */ - (int)(send*)(output_item* this, int fd, int fdtype); - (size_t)(remaining*)(output_item *this); - (void)(on_complete*)(output_item *this); - /* Error codes? Strings? */ - (void)(on_error*)(output_item *this); - (void)(release)(output_item *this); -} output_item_ops; - -typedef struct { - output_item_ops *ops; - /* User callbacks */ - (void)(on_complete*)(output_item *this); - (void)(on_error*)(output_item *this); -} output_item; - - -#endif +#ifndef OUTPUT_ITEM_H +#define OUTPUT_ITEM_H + +#include + +#include "fdtypes.h" + +/* TODO: RELOCATE */ +typedef unsigned char BYTE; + +struct output_item_t; +typedef struct output_item_t output_item; + +typedef struct { + void (*added_to)(output_item *this, output_item *target); + size_t (*get_size)(output_item *this); + void (*prepare)(output_item *this); + + /* Handle windows handles? */ + /* TODO: Define return values */ + int (*send)(output_item* this, int fd, int fdtype); + size_t (*remaining)(output_item *this); + void (*on_complete)(output_item *this); + /* Error codes? Strings? */ + void (*on_error)(output_item *this); + void (*release)(output_item *this); +} output_item_ops; + +struct output_item_t { + output_item_ops *ops; + /* User callbacks */ + void (*on_complete)(output_item *this); + void (*on_error)(output_item *this); +}; + + +#endif -- 2.11.4.GIT