summaryrefslogtreecommitdiffstats
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/utils.h b/utils.h
new file mode 100644
index 0000000..2bd14fb
--- /dev/null
+++ b/utils.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of QMI-RIL.
+ *
+ * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
+ * Copyright (C) 2011-2014 Paul Kocialkowski <contact@paulk.fr>
+ * Copyright (C) 2017 Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
+ *
+ * QMI-RIL 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * QMI-RIL 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 QMI-RIL. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _UTILS_H_
+#define _UTILS_H_
+
+#include <qmi-ril.h>
+
+struct list_head {
+ struct list_head *prev;
+ struct list_head *next;
+ const void *data;
+};
+
+struct list_head *list_head_alloc(struct list_head *prev, struct list_head *next,
+ const void *data);
+void list_head_free(struct list_head *list);
+int strings_array_free(char **array, size_t size);
+gchar *array2string(const GArray *data);
+char *data2string(const void *data, size_t size);
+
+#endif