summaryrefslogtreecommitdiffstats
path: root/libcnary/iterator.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-06-13 18:30:37 +0200
committerGravatar Nikias Bassen2011-06-13 18:30:37 +0200
commitc7412d4813ccb994fdd219f421eaba8bb37831dd (patch)
tree5b7f3016ceb337b31afdd62c9fee646f33e8b271 /libcnary/iterator.c
parent3277a11f0beedda8b5d65ffccb05fabd4e8ded28 (diff)
downloadlibplist-c7412d4813ccb994fdd219f421eaba8bb37831dd.tar.gz
libplist-c7412d4813ccb994fdd219f421eaba8bb37831dd.tar.bz2
Bundle libcnary for better packaging1.5
Diffstat (limited to 'libcnary/iterator.c')
-rw-r--r--libcnary/iterator.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/libcnary/iterator.c b/libcnary/iterator.c
new file mode 100644
index 0000000..f4897f9
--- /dev/null
+++ b/libcnary/iterator.c
@@ -0,0 +1,45 @@
+/*
+ * iterator.c
+ *
+ * Created on: Mar 8, 2011
+ * Author: posixninja
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "list.h"
+#include "object.h"
+#include "iterator.h"
+
+void iterator_destroy(iterator_t* iterator) {
+ if(iterator) {
+ free(iterator);
+ }
+}
+
+iterator_t* iterator_create(list_t* list) {
+ iterator_t* iterator = (iterator_t*) malloc(sizeof(iterator_t));
+ if(iterator == NULL) {
+ return NULL;
+ }
+ memset(iterator, '\0', sizeof(iterator_t));
+
+ if(list != NULL) {
+ // Create and bind to list
+
+ } else {
+ // Empty Iterator
+ }
+
+ return iterator;
+}
+
+object_t* iterator_next(iterator_t* iterator) {
+ return NULL;
+}
+
+int iterator_bind(iterator_t* iterator, list_t* list) {
+ return -1;
+}