@@ -30,7 +30,7 @@
#include <network_ipc.h>
#include <util.h>
#include "sslapi.h"
-#include "suricatta/channel.h"
+#include "channel.h"
#include "channel_curl.h"
#define SPEED_LOW_BYTES_SEC 8
new file mode 100644
@@ -0,0 +1,39 @@
+/*
+ * 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
+#include "channel_op_res.h"
+
+/* Suricatta Channel Interface.
+ *
+ * Each suricatta channel has to implement this interface.
+ * Cf. `channel_hawkbit.c` for an example implementation targeted towards the
+ * [hawkBit](https://projects.eclipse.org/projects/iot.hawkbit) server.
+ */
+typedef struct channel channel_t;
+struct channel {
+ channel_op_res_t (*open)(channel_t *this, void *cfg);
+ channel_op_res_t (*close)(channel_t *this);
+ channel_op_res_t (*get)(channel_t *this, void *data);
+ channel_op_res_t (*get_file)(channel_t *this, void *data, int file_handle);
+ channel_op_res_t (*put)(channel_t *this, void *data);
+ void *priv;
+};
+
+channel_t *channel_new(void);
deleted file mode 100644
@@ -1,39 +0,0 @@
-/*
- * 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
-#include "channel_op_res.h"
-
-/* Suricatta Channel Interface.
- *
- * Each suricatta channel has to implement this interface.
- * Cf. `channel_hawkbit.c` for an example implementation targeted towards the
- * [hawkBit](https://projects.eclipse.org/projects/iot.hawkbit) server.
- */
-typedef struct channel channel_t;
-struct channel {
- channel_op_res_t (*open)(channel_t *this, void *cfg);
- channel_op_res_t (*close)(channel_t *this);
- channel_op_res_t (*get)(channel_t *this, void *data);
- channel_op_res_t (*get_file)(channel_t *this, void *data, int file_handle);
- channel_op_res_t (*put)(channel_t *this, void *data);
- void *priv;
-};
-
-channel_t *channel_new(void);
@@ -32,7 +32,7 @@
#include <sys/time.h>
#include <swupdate_status.h>
#include "suricatta/suricatta.h"
-#include "suricatta/channel.h"
+#include "channel.h"
#include "channel_curl.h"
#include "suricatta/state.h"
#include "server_hawkbit.h"
@@ -19,7 +19,6 @@
#pragma once
#include <stdbool.h>
-#include <suricatta/channel.h>
#include <suricatta/state.h>
#include <swupdate_dict.h>
Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/channel_curl.c | 2 +- include/channel.h | 39 +++++++++++++++++++++++++++++++++++++++ include/suricatta/channel.h | 39 --------------------------------------- suricatta/server_hawkbit.c | 2 +- suricatta/server_hawkbit.h | 1 - 5 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 include/channel.h delete mode 100644 include/suricatta/channel.h