info: rename a http header function
[olsrd.git] / lib / info / info_types.h
index cbf3141..82001af 100644 (file)
@@ -39,8 +39,8 @@
  *
  */
 
-#ifndef _OLSRD_INFO_TYPES_H
-#define _OLSRD_INFO_TYPES_H
+#ifndef _OLSRD_LIB_INFO_INFO_TYPES_H_
+#define _OLSRD_LIB_INFO_INFO_TYPES_H_
 
 #include <stdbool.h>
 
@@ -75,6 +75,7 @@
 typedef void (*init_plugin)(const char *plugin_name);
 typedef bool (*determine_command)(const char *str, unsigned int siw);
 typedef const char * (*mime_type)(unsigned int send_what);
+typedef void (*output_start_end)(struct autobuf *abuf);
 typedef void (*printer_neighbors)(struct autobuf *abuf, bool list_2hop);
 typedef void (*printer_generic)(struct autobuf *abuf);
 
@@ -82,6 +83,8 @@ typedef struct {
     init_plugin init;
     determine_command is_command;
     mime_type determine_mime_type;
+    output_start_end output_start;
+    output_start_end output_end;
     printer_neighbors neighbors;
     printer_generic links;
     printer_generic routes;
@@ -95,16 +98,16 @@ typedef struct {
     printer_generic interfaces;
     printer_generic config;
     printer_generic plugins;
-} printer_functions_t;
-
-#define MAX_CLIENTS 3
+} info_plugin_functions_t;
 
 typedef struct {
-  char *buffer[MAX_CLIENTS];
-  size_t size[MAX_CLIENTS];
-  size_t written[MAX_CLIENTS];
-  int socket[MAX_CLIENTS];
-  int count;
-} outbuffer_t;
+    union olsr_ip_addr accept_ip;
+    union olsr_ip_addr listen_ip;
+    int ipc_port;
+    int nompr;
+    bool http_headers;
+    bool allow_localhost;
+    int ipv6_only;
+} info_plugin_config_t;
 
-#endif /* _OLSRD_INFO_TYPES_H */
+#endif /* _OLSRD_LIB_INFO_INFO_TYPES_H_ */