summaryrefslogtreecommitdiff
path: root/xpp/xtalk/xlist.h
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-03-10 18:48:11 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-03-10 18:48:11 +0000
commit760d0a2a75aba6307550bf551c5eb06174c256b5 (patch)
treed526eeb7d5ce0aec9e4572f5df0cb3536a2632d1 /xpp/xtalk/xlist.h
parentcf84710ff24dd09e80f9e5ecfeb16ce15137ddc3 (diff)
xpp: use 'xtalk' for the USB access code
* Move most of the USB access code from xpp/ to xpp/xtalk/ . * astribank_tool and such tools can now use a shorter -D mmm/nnn rather than a full path. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9825 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/xtalk/xlist.h')
-rw-r--r--xpp/xtalk/xlist.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/xpp/xtalk/xlist.h b/xpp/xtalk/xlist.h
new file mode 100644
index 0000000..4f7f818
--- /dev/null
+++ b/xpp/xtalk/xlist.h
@@ -0,0 +1,29 @@
+#ifndef XLIST_H
+#define XLIST_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+struct xlist_node {
+ void *data;
+ struct xlist_node *next;
+ struct xlist_node *prev;
+};
+
+typedef void (*xlist_destructor_t)(void *data);
+
+struct xlist_node *xlist_new(void *data);
+void xlist_destroy(struct xlist_node *list, xlist_destructor_t destructor);
+void xlist_append_item(struct xlist_node *list, struct xlist_node *item);
+void xlist_remove_item(struct xlist_node *item);
+struct xlist_node *xlist_shift(struct xlist_node *list);
+int xlist_empty(const struct xlist_node *list);
+size_t xlist_length(const struct xlist_node *list);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* XLIST_H */