summaryrefslogtreecommitdiff
path: root/cleopatre/application/cwmp/inc
diff options
context:
space:
mode:
authorYacine Belkadi2011-01-06 16:03:40 +0100
committerYacine Belkadi2011-01-18 17:38:12 +0100
commit7e68d3e26a23ff397b2e76c8d580ab8fe46e1774 (patch)
treec848b04d5c1b2ece4c08270852ad0a82f6ca61fd /cleopatre/application/cwmp/inc
parent901dcd14ce7f59e55e803ec348bc10f3b82fdb9e (diff)
cleo/app/cwmp: split impl.c
Split (the too big) impl.c into smaller files: - impl_get.c - impl_set.c - impl_instance.c - impl_helpers.c
Diffstat (limited to 'cleopatre/application/cwmp/inc')
-rw-r--r--cleopatre/application/cwmp/inc/common.h11
-rw-r--r--cleopatre/application/cwmp/inc/impl.h6
-rw-r--r--cleopatre/application/cwmp/inc/impl_internals.h45
-rw-r--r--cleopatre/application/cwmp/inc/utils.h2
4 files changed, 51 insertions, 13 deletions
diff --git a/cleopatre/application/cwmp/inc/common.h b/cleopatre/application/cwmp/inc/common.h
deleted file mode 100644
index 3f46c6deb8..0000000000
--- a/cleopatre/application/cwmp/inc/common.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef COMMON_H
-#define COMMON_H
-
-typedef enum {
- IMPL_STATUS_OK = 0,
- IMPL_STATUS_ERROR = 1,
- IMPL_STATUS_PENDING = 2
-} impl_status_t;
-
-#endif /* COMMON_H */
-
diff --git a/cleopatre/application/cwmp/inc/impl.h b/cleopatre/application/cwmp/inc/impl.h
index 28eb63d2f2..b7a59972d7 100644
--- a/cleopatre/application/cwmp/inc/impl.h
+++ b/cleopatre/application/cwmp/inc/impl.h
@@ -22,7 +22,11 @@
#include <stdbool.h>
-#include "common.h"
+typedef enum {
+ IMPL_STATUS_OK = 0,
+ IMPL_STATUS_ERROR = 1,
+ IMPL_STATUS_PENDING = 2
+} impl_status_t;
impl_status_t impl_init(void);
impl_status_t impl_after_session(void);
diff --git a/cleopatre/application/cwmp/inc/impl_internals.h b/cleopatre/application/cwmp/inc/impl_internals.h
new file mode 100644
index 0000000000..008465ea5a
--- /dev/null
+++ b/cleopatre/application/cwmp/inc/impl_internals.h
@@ -0,0 +1,45 @@
+#ifndef IMPL_INTERNAL_H
+#define IMPL_INTERNAL_H
+
+/*
+ * (C) Copyright 2010 SPiDCOM Technologies
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <stdbool.h>
+
+#include "impl.h"
+
+#define NULL_INSTANCE_NUMBER 0
+
+impl_status_t cache_nvram(void);
+impl_status_t cache_network_interfaces_stats(void);
+impl_status_t complete_pending(void);
+
+/* Helpers */
+impl_status_t copy_str_with_truncation(char *dest, int dest_size, const char *src, int src_size);
+impl_status_t get_string_param_from_file(const char *param_name, int param_size, char *out_buffer, int out_buffer_size);
+impl_status_t set_string_param_in_file(const char *param_name, int param_size, const char *param_value);
+impl_status_t get_bool_param_from_file(const char *param_name, bool *out_value);
+impl_status_t set_bool_param_in_file(const char *param_name, const char *param_value);
+impl_status_t get_uint_param_from_file(const char *param_name, int param_size, unsigned int *out_value);
+impl_status_t set_uint_param_in_file(const char *param_name, const char *param_value);
+
+impl_status_t read_key_values(const char *key, unsigned int values[], unsigned int nb_values);
+impl_status_t write_key_values(const char *key, unsigned int values[], unsigned int nb_values);
+
+#endif /* IMPL_INTERNAL_H */
diff --git a/cleopatre/application/cwmp/inc/utils.h b/cleopatre/application/cwmp/inc/utils.h
index f4de26fe21..779a09d980 100644
--- a/cleopatre/application/cwmp/inc/utils.h
+++ b/cleopatre/application/cwmp/inc/utils.h
@@ -21,7 +21,7 @@
*/
#include "avs/cwmp.h"
-#include "common.h"
+#include "impl.h"
#define log_debug(...) cwmp_log(DEBUG, __VA_ARGS__)
#define log_error(...) cwmp_log(ERROR, __VA_ARGS__)