summaryrefslogtreecommitdiffstats
path: root/cython/plist.pxd
diff options
context:
space:
mode:
authorGravatar Bryan Forbes2011-09-26 17:14:39 +0200
committerGravatar Nikias Bassen2011-09-26 17:14:39 +0200
commit2ca52d65bb113e8639e732f67fec3c3223c0a444 (patch)
treeb937e0c7a6a93eca914c0571bd71c85a3f2408b4 /cython/plist.pxd
parent36ad4384303e94b19cdf7a5ff43182efebe1b398 (diff)
downloadlibplist-2ca52d65bb113e8639e732f67fec3c3223c0a444.tar.gz
libplist-2ca52d65bb113e8639e732f67fec3c3223c0a444.tar.bz2
Added cython bindings.
Diffstat (limited to 'cython/plist.pxd')
-rw-r--r--cython/plist.pxd62
1 files changed, 62 insertions, 0 deletions
diff --git a/cython/plist.pxd b/cython/plist.pxd
new file mode 100644
index 0000000..daafd78
--- /dev/null
+++ b/cython/plist.pxd
@@ -0,0 +1,62 @@
1cdef extern from "plist/plist.h":
2 ctypedef void *plist_t
3 ctypedef void *plist_dict_iter
4
5cdef class Node:
6 cdef plist_t _c_node
7 cdef bool _c_managed
8 cpdef object __deepcopy__(self, memo=*)
9 cpdef bytes to_xml(self)
10 cpdef bytes to_bin(self)
11 cpdef object copy(self)
12
13cdef class Bool(Node):
14 cpdef set_value(self, value)
15 cpdef bool get_value(self)
16
17cdef class Integer(Node):
18 cpdef set_value(self, value)
19 cpdef int get_value(self)
20
21cdef class Real(Node):
22 cpdef set_value(self, value)
23 cpdef float get_value(self)
24
25cdef class String(Node):
26 cpdef set_value(self, unicode value)
27 cpdef unicode get_value(self)
28
29cdef class Date(Node):
30 cpdef set_value(self, value)
31 cpdef object get_value(self)
32
33cdef class Data(Node):
34 cpdef set_value(self, bytes value)
35 cpdef bytes get_value(self)
36
37cdef class Dict(Node):
38 cdef dict _map
39 cdef void _init(self)
40 cpdef set_value(self, dict value)
41 cpdef dict get_value(self)
42 cpdef bool has_key(self, key)
43 cpdef object get(self, key, default=*)
44 cpdef list keys(self)
45 cpdef list items(self)
46 cpdef list values(self)
47 cpdef object iterkeys(self)
48 cpdef object iteritems(self)
49 cpdef object itervalues(self)
50
51cdef class Array(Node):
52 cdef list _array
53 cdef void _init(self)
54 cpdef set_value(self, value)
55 cpdef list get_value(self)
56 cpdef append(self, item)
57
58cpdef object from_xml(xml)
59cpdef object from_bin(bytes bin)
60
61cdef object plist_t_to_node(plist_t c_plist, bool managed=*)
62cdef plist_t native_to_plist_t(object native)