From f1d2812a740a1463bf920e6501e14baafe632aed Mon Sep 17 00:00:00 2001 From: Valery Febvre Date: Tue, 13 Apr 2004 10:15:54 +0000 Subject: *** empty log message *** --- python/xml/py_xml.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ python/xml/py_xml.h | 3 +++ 2 files changed, 55 insertions(+) (limited to 'python/xml') diff --git a/python/xml/py_xml.c b/python/xml/py_xml.c index 1ce046eb..d2816ceb 100644 --- a/python/xml/py_xml.c +++ b/python/xml/py_xml.c @@ -60,6 +60,40 @@ PyObject *node_dump(PyObject *self, PyObject *args) { return (Py_None); } +PyObject *node_get_attr_value(PyObject *self, PyObject *args) { + PyObject *node_obj; + const xmlChar *name; + xmlChar *ret; + + if (CheckArgs(args, "OS:node_get_attr_value")) { + if(!PyArg_ParseTuple(args, (char *) "Os:node_get_attr_value", + &node_obj, &name)) + return NULL; + } + else return NULL; + + ret = lasso_node_get_attr_value(LassoNode_get(node_obj), name); + + return (xmlCharPtr_wrap(ret)); +} + +PyObject *node_get_child(PyObject *self, PyObject *args) { + PyObject *node_obj; + const xmlChar *name; + LassoNode *ret; + + if (CheckArgs(args, "OS:node_get_child")) { + if(!PyArg_ParseTuple(args, (char *) "Os:node_get_child", + &node_obj, &name)) + return NULL; + } + else return NULL; + + ret = lasso_node_get_child(LassoNode_get(node_obj), name); + + return (LassoNode_wrap(ret)); +} + PyObject *node_unref(PyObject *self, PyObject *args) { PyObject *node_obj; @@ -94,3 +128,21 @@ PyObject *node_url_encode(PyObject *self, PyObject *args) { return (charPtr_wrap(ret)); } + +PyObject *node_verify_signature(PyObject *self, PyObject *args) { + PyObject *node_obj; + const gchar *certificate_file; + gint ret; + + if (CheckArgs(args, "OS:node_verify_signature")) { + if(!PyArg_ParseTuple(args, (char *) "Os:node_verify_signature", + &node_obj, &certificate_file)) + return NULL; + } + else return NULL; + + ret = lasso_node_verify_signature(LassoNode_get(node_obj), + certificate_file); + + return (int_wrap(ret)); +} diff --git a/python/xml/py_xml.h b/python/xml/py_xml.h index a1a186ab..2de90e1a 100644 --- a/python/xml/py_xml.h +++ b/python/xml/py_xml.h @@ -36,7 +36,10 @@ typedef struct { PyObject *LassoNode_wrap(LassoNode *node); PyObject *node_dump(PyObject *self, PyObject *args); +PyObject *node_get_attr_value(PyObject *self, PyObject *args); +PyObject *node_get_child(PyObject *self, PyObject *args); PyObject *node_unref(PyObject *self, PyObject *args); PyObject *node_url_encode(PyObject *self, PyObject *args); +PyObject *node_verify_signature(PyObject *self, PyObject *args); #endif /* __PYLASSO_PY_XML_H__ */ -- cgit