summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--include/CMakeLists.txt1
-rw-r--r--include/afb/afb-evmgr-itf.h (renamed from include/afb-evmgr-itf.h)0
-rw-r--r--include/afb/afb-plugin.h (renamed from include/afb-plugin.h)4
-rw-r--r--include/afb/afb-req-itf.h (renamed from include/afb-req-itf.h)0
-rw-r--r--plugins/afm-main-plugin/afm-main-plugin.c2
-rw-r--r--plugins/audio/audio-api.c4
-rw-r--r--plugins/media/media-api.c4
-rw-r--r--plugins/radio/radio-api.c4
-rw-r--r--plugins/samples/ClientCtx.c2
-rw-r--r--plugins/samples/HelloWorld.c2
-rw-r--r--plugins/samples/SamplePost.c2
-rw-r--r--plugins/session/token-api.c2
-rw-r--r--src/afb-api-dbus.c4
-rw-r--r--src/afb-api-so.c6
-rw-r--r--src/afb-apis.c2
-rw-r--r--src/afb-hreq.c3
-rw-r--r--src/afb-hsrv.c2
-rw-r--r--src/afb-hswitch.c2
-rw-r--r--src/afb-ws-json1.c2
-rw-r--r--src/main.c2
21 files changed, 27 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12e4be95..76000105 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,5 +121,6 @@ SET(plugin_install_dir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/afb)
ADD_DEFINITIONS(-DPLUGIN_INSTALL_DIR="${plugin_install_dir}")
ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(plugins)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
new file mode 100644
index 00000000..07cbb04b
--- /dev/null
+++ b/include/CMakeLists.txt
@@ -0,0 +1 @@
+INSTALL(DIRECTORY afb DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
diff --git a/include/afb-evmgr-itf.h b/include/afb/afb-evmgr-itf.h
index 90b1e0a9..90b1e0a9 100644
--- a/include/afb-evmgr-itf.h
+++ b/include/afb/afb-evmgr-itf.h
diff --git a/include/afb-plugin.h b/include/afb/afb-plugin.h
index 40b26cfa..2cfe6289 100644
--- a/include/afb-plugin.h
+++ b/include/afb/afb-plugin.h
@@ -17,8 +17,8 @@
#pragma once
-#include "afb-req-itf.h"
-#include "afb-evmgr-itf.h"
+#include <afb/afb-req-itf.h>
+#include <afb/afb-evmgr-itf.h>
/* Plugin Type */
enum AFB_pluginE
diff --git a/include/afb-req-itf.h b/include/afb/afb-req-itf.h
index a8980ffc..a8980ffc 100644
--- a/include/afb-req-itf.h
+++ b/include/afb/afb-req-itf.h
diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c
index 95767307..705efcb0 100644
--- a/plugins/afm-main-plugin/afm-main-plugin.c
+++ b/plugins/afm-main-plugin/afm-main-plugin.c
@@ -21,7 +21,7 @@
#include <assert.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
#include "utils-jbus.h"
diff --git a/plugins/audio/audio-api.c b/plugins/audio/audio-api.c
index 00f81001..c486d1c1 100644
--- a/plugins/audio/audio-api.c
+++ b/plugins/audio/audio-api.c
@@ -25,8 +25,8 @@
#include "audio-pulse.h"
#endif
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
/* ------ BACKEND FUNCTIONS ------- */
diff --git a/plugins/media/media-api.c b/plugins/media/media-api.c
index 7b4fa18f..91676d4c 100644
--- a/plugins/media/media-api.c
+++ b/plugins/media/media-api.c
@@ -24,8 +24,8 @@
#include "media-api.h"
#include "media-rygel.h"
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
json_object* _rygel_list (mediaCtxHandleT *);
diff --git a/plugins/radio/radio-api.c b/plugins/radio/radio-api.c
index edeb9786..e4a89ba6 100644
--- a/plugins/radio/radio-api.c
+++ b/plugins/radio/radio-api.c
@@ -22,8 +22,8 @@
#include "radio-api.h"
#include "radio-rtlsdr.h"
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
/* ********************************************************
diff --git a/plugins/samples/ClientCtx.c b/plugins/samples/ClientCtx.c
index 4d8e7205..bf26937f 100644
--- a/plugins/samples/ClientCtx.c
+++ b/plugins/samples/ClientCtx.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
typedef struct {
/*
diff --git a/plugins/samples/HelloWorld.c b/plugins/samples/HelloWorld.c
index 6f9d01d8..4795dd36 100644
--- a/plugins/samples/HelloWorld.c
+++ b/plugins/samples/HelloWorld.c
@@ -19,7 +19,7 @@
#include <string.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
const struct AFB_interface *interface;
diff --git a/plugins/samples/SamplePost.c b/plugins/samples/SamplePost.c
index 25e73f93..1d3069e8 100644
--- a/plugins/samples/SamplePost.c
+++ b/plugins/samples/SamplePost.c
@@ -20,7 +20,7 @@
#include <string.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
// Sample Generic Ping Debug API
diff --git a/plugins/session/token-api.c b/plugins/session/token-api.c
index 80289486..fd312608 100644
--- a/plugins/session/token-api.c
+++ b/plugins/session/token-api.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
// Dummy sample of Client Application Context
typedef struct {
diff --git a/src/afb-api-dbus.c b/src/afb-api-dbus.c
index 3a882a56..52d449f0 100644
--- a/src/afb-api-dbus.c
+++ b/src/afb-api-dbus.c
@@ -25,8 +25,8 @@
#include <systemd/sd-bus.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
#include "afb-common.h"
diff --git a/src/afb-api-so.c b/src/afb-api-so.c
index 6ac5070f..72599e5b 100644
--- a/src/afb-api-so.c
+++ b/src/afb-api-so.c
@@ -27,9 +27,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
-#include "afb-evmgr-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
+#include <afb/afb-evmgr-itf.h>
#include "session.h"
#include "afb-common.h"
diff --git a/src/afb-apis.c b/src/afb-apis.c
index 834850f2..5ebc96ff 100644
--- a/src/afb-apis.c
+++ b/src/afb-apis.c
@@ -26,7 +26,7 @@
#include "verbose.h"
#include "afb-apis.h"
#include "afb-context.h"
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
struct api_desc {
struct afb_api api;
diff --git a/src/afb-hreq.c b/src/afb-hreq.c
index 0f2f0ffb..a1c750b4 100644
--- a/src/afb-hreq.c
+++ b/src/afb-hreq.c
@@ -33,7 +33,7 @@
#endif
#include "afb-method.h"
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
#include "afb-msg-json.h"
#include "afb-context.h"
#include "afb-hreq.h"
@@ -471,6 +471,7 @@ int afb_hreq_reply_file(struct afb_hreq *hreq, int dirfd, const char *filename)
int afb_hreq_redirect_to(struct afb_hreq *hreq, const char *url)
{
+ /* TODO: append the query part! */
afb_hreq_reply_static(hreq, MHD_HTTP_MOVED_PERMANENTLY, 0, NULL,
MHD_HTTP_HEADER_LOCATION, url, NULL);
DEBUG("redirect from [%s] to [%s]", hreq->url, url);
diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c
index 743315cb..46e61a01 100644
--- a/src/afb-hsrv.c
+++ b/src/afb-hsrv.c
@@ -33,7 +33,7 @@
#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-hsrv.h"
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
#include "verbose.h"
#include "afb-common.h"
diff --git a/src/afb-hswitch.c b/src/afb-hswitch.c
index bdded7fb..8dee80b3 100644
--- a/src/afb-hswitch.c
+++ b/src/afb-hswitch.c
@@ -23,7 +23,7 @@
#include <microhttpd.h>
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-apis.h"
diff --git a/src/afb-ws-json1.c b/src/afb-ws-json1.c
index fe7514d9..85dc0259 100644
--- a/src/afb-ws-json1.c
+++ b/src/afb-ws-json1.c
@@ -29,7 +29,7 @@
#include "afb-ws-json1.h"
#include "afb-msg-json.h"
#include "session.h"
-#include "afb-req-itf.h"
+#include <afb/afb-req-itf.h>
#include "afb-apis.h"
#include "afb-context.h"
diff --git a/src/main.c b/src/main.c
index fdea9079..dbfbac5d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,7 +41,7 @@
#include "verbose.h"
#include "afb-common.h"
-#include "afb-plugin.h"
+#include <afb/afb-plugin.h>
#if !defined(PLUGIN_INSTALL_DIR)
#error "you should define PLUGIN_INSTALL_DIR"