new file mode 100644
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2017
+ * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
+ *
+ * Author: Christian Storm
+ * Copyright (C) 2016, Siemens AG
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+#pragma once
+
+typedef enum {
+ CHANNEL_OK,
+ CHANNEL_EINIT,
+ CHANNEL_ENONET,
+ CHANNEL_ENOMEM,
+ CHANNEL_EACCES,
+ CHANNEL_ENOENT,
+ CHANNEL_EIO,
+ CHANNEL_EILSEQ,
+ CHANNEL_EAGAIN,
+ CHANNEL_ELOOP,
+ CHANNEL_EBADMSG
+} channel_op_res_t;
@@ -18,7 +18,7 @@
*/
#pragma once
-#include "suricatta.h"
+#include "channel_op_res.h"
/* Suricatta Channel Interface.
*
@@ -19,6 +19,8 @@
#pragma once
+#include "channel_op_res.h"
+
/* Suricatta Main Interface.
*
* `start_suricatta()` is the main interface to suricatta's functionality.
@@ -29,20 +31,6 @@
*/
typedef enum {
- CHANNEL_OK,
- CHANNEL_EINIT,
- CHANNEL_ENONET,
- CHANNEL_ENOMEM,
- CHANNEL_EACCES,
- CHANNEL_ENOENT,
- CHANNEL_EIO,
- CHANNEL_EILSEQ,
- CHANNEL_EAGAIN,
- CHANNEL_ELOOP,
- CHANNEL_EBADMSG
-} channel_op_res_t;
-
-typedef enum {
SERVER_OK,
SERVER_EERR,
SERVER_EBADMSG,
Channel API is independent from suricatta daemon. Split the headers to separate channel API from suricatta. Signed-off-by: Stefano Babic <sbabic@denx.de> --- include/channel_op_res.h | 37 +++++++++++++++++++++++++++++++++++++ include/suricatta/channel.h | 2 +- include/suricatta/suricatta.h | 16 ++-------------- 3 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 include/channel_op_res.h