txtinfo: determine the mime type via the functions table
[olsrd.git] / lib / info / info_types.h
index 652d174..7b51b48 100644 (file)
 /* this data is not normal format but olsrd.conf format */
 #define SIW_OLSRD_CONF 0x2000
 
+typedef const char * (*mime_type)(unsigned int send_what);
 typedef void (*printer_neighbors)(struct autobuf *abuf, bool list_2hop);
 typedef void (*printer_generic)(struct autobuf *abuf);
 
 typedef struct {
+    mime_type determine_mime_type;
     printer_neighbors neighbors;
     printer_generic links;
     printer_generic routes;
@@ -90,4 +92,14 @@ typedef struct {
     printer_generic plugins;
 } printer_functions_t;
 
+#define MAX_CLIENTS 3
+
+typedef struct {
+  char *buffer[MAX_CLIENTS];
+  size_t size[MAX_CLIENTS];
+  size_t written[MAX_CLIENTS];
+  int socket[MAX_CLIENTS];
+  int count;
+} outbuffer_t;
+
 #endif /* _OLSRD_INFO_TYPES_H */