diff mbox series

[13/17] Remove dependencies from suricatta for channel API

Message ID 1511176210-28928-13-git-send-email-sbabic@denx.de
State Accepted
Headers show
Series [01/17] parser: added function to get net child in tree | expand

Commit Message

Stefano Babic Nov. 20, 2017, 11:10 a.m. UTC
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
diff mbox series

Patch

diff --git a/include/channel_op_res.h b/include/channel_op_res.h
new file mode 100644
index 0000000..2e40ef1
--- /dev/null
+++ b/include/channel_op_res.h
@@ -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;
diff --git a/include/suricatta/channel.h b/include/suricatta/channel.h
index 98fc851..f0c13a7 100644
--- a/include/suricatta/channel.h
+++ b/include/suricatta/channel.h
@@ -18,7 +18,7 @@ 
  */
 
 #pragma once
-#include "suricatta.h"
+#include "channel_op_res.h"
 
 /* Suricatta Channel Interface.
  *
diff --git a/include/suricatta/suricatta.h b/include/suricatta/suricatta.h
index c04aff4..e38af4d 100644
--- a/include/suricatta/suricatta.h
+++ b/include/suricatta/suricatta.h
@@ -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,