summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py0
-rw-r--r--python/pygupnp-igd-filters.defs22
-rw-r--r--python/pygupnp-igd-module.c31
-rw-r--r--python/pygupnp-igd.defs108
-rw-r--r--python/pygupnp-igd.override12
-rwxr-xr-xpython/rebuild-defs.sh26
6 files changed, 0 insertions, 199 deletions
diff --git a/python/__init__.py b/python/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/python/__init__.py
+++ /dev/null
diff --git a/python/pygupnp-igd-filters.defs b/python/pygupnp-igd-filters.defs
deleted file mode 100644
index 14efe02..0000000
--- a/python/pygupnp-igd-filters.defs
+++ /dev/null
@@ -1,22 +0,0 @@
-(define-object Simple
- (in-module "GUPnPIgd")
- (parent "GObject")
- (c-name "GUPnPSimpleIgd")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD")
-)
-
-(define-object SimpleThread
- (in-module "GUPnPSimpleIgd")
- (parent "GUPnPSimpleIgd")
- (c-name "GUPnPSimpleIgdThread")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD_THREAD")
-)
-
-(define-enum Error
- (in-module "GUPnPSimpleIgd")
- (c-name "GUPnPSimpleIgdError")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD_ERROR")
- (values
- '("s" "GUPNP_SIMPLE_IGD_ERROR_EXTERNAL_ADDRESS")
- )
-)
diff --git a/python/pygupnp-igd-module.c b/python/pygupnp-igd-module.c
deleted file mode 100644
index 11373ee..0000000
--- a/python/pygupnp-igd-module.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <pygobject.h>
-#include <libgupnp-igd/gupnp-simple-igd.h>
-#include <libgupnp-igd/gupnp-simple-igd-thread.h>
-
-void igd_register_classes (PyObject *d);
-void igd_add_constants(PyObject *module, const gchar *strip_prefix);
-
-DL_EXPORT(void) initigd(void);
-extern PyMethodDef igd_functions[];
-
-DL_EXPORT(void)
-initigd(void)
-{
- PyObject *m, *d;
-
- init_pygobject ();
-
- m = Py_InitModule ("igd", igd_functions);
- d = PyModule_GetDict (m);
-
- //PyModule_AddIntConstant (m, "CODEC_ID_ANY", FS_CODEC_ID_ANY);
- //PyModule_AddIntConstant (m, "CODEC_ID_ANY", FS_CODEC_ID_ANY);
-
- igd_register_classes (d);
- igd_add_constants(m, "GUPNP_");
-
- if (PyErr_Occurred ()) {
- PyErr_Print();
- Py_FatalError ("can't initialise module gupnp.igd");
- }
-}
diff --git a/python/pygupnp-igd.defs b/python/pygupnp-igd.defs
deleted file mode 100644
index 8f758dc..0000000
--- a/python/pygupnp-igd.defs
+++ /dev/null
@@ -1,108 +0,0 @@
-(define-object Simple
- (in-module "GUPnPIgd")
- (parent "GObject")
- (c-name "GUPnPSimpleIgd")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD")
-)
-
-(define-object SimpleThread
- (in-module "GUPnPSimpleIgd")
- (parent "GUPnPSimpleIgd")
- (c-name "GUPnPSimpleIgdThread")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD_THREAD")
-)
-
-(define-enum Error
- (in-module "GUPnPSimpleIgd")
- (c-name "GUPnPSimpleIgdError")
- (gtype-id "GUPNP_TYPE_SIMPLE_IGD_ERROR")
- (values
- '("s" "GUPNP_SIMPLE_IGD_ERROR_EXTERNAL_ADDRESS")
- )
-)
-;; -*- scheme -*-
-; object definitions ...
-;; Enumerations and flags ...
-
-
-;; From gupnp-simple-igd.h
-
-(define-function error_quark
- (c-name "gupnp_simple_igd_error_quark")
- (return-type "GQuark")
-)
-
-(define-function get_type
- (c-name "gupnp_simple_igd_get_type")
- (return-type "GType")
-)
-
-(define-function new
- (c-name "gupnp_simple_igd_new")
- (is-constructor-of "GupnpSimpleIgd")
- (return-type "GUPnPSimpleIgd*")
-)
-
-(define-method add_port
- (of-object "GUPnPSimpleIgd")
- (c-name "gupnp_simple_igd_add_port")
- (return-type "none")
- (parameters
- '("const-gchar*" "protocol")
- '("guint16" "external_port")
- '("const-gchar*" "local_ip")
- '("guint16" "local_port")
- '("guint32" "lease_duration")
- '("const-gchar*" "description")
- )
-)
-
-(define-method remove_port
- (of-object "GUPnPSimpleIgd")
- (c-name "gupnp_simple_igd_remove_port")
- (return-type "none")
- (parameters
- '("const-gchar*" "protocol")
- '("guint" "external_port")
- )
-)
-
-(define-method delete_all_mappings
- (of-object "GUPnPSimpleIgd")
- (c-name "gupnp_simple_igd_delete_all_mappings")
- (return-type "gboolean")
-)
-
-
-;; -*- scheme -*-
-; object definitions ...
-;; Enumerations and flags ...
-
-
-;; From gupnp-simple-igd-thread.h
-
-(define-function thread_get_type
- (c-name "gupnp_simple_igd_thread_get_type")
- (return-type "GType")
-)
-
-(define-function thread_new
- (c-name "gupnp_simple_igd_thread_new")
- (is-constructor-of "GupnpSimpleIgdThread")
- (return-type "GUPnPSimpleIgdThread*")
-)
-
-
-;; -*- scheme -*-
-; object definitions ...
-;; Enumerations and flags ...
-
-
-;; From gupnp-enum-types.h
-
-(define-function error_get_type
- (c-name "gupnp_simple_igd_error_get_type")
- (return-type "GType")
-)
-
-
diff --git a/python/pygupnp-igd.override b/python/pygupnp-igd.override
deleted file mode 100644
index b939604..0000000
--- a/python/pygupnp-igd.override
+++ /dev/null
@@ -1,12 +0,0 @@
-%%
-headers
-#include <Python.h>
-#include <pygobject.h>
-#include <libgupnp-igd/gupnp-simple-igd.h>
-#include <libgupnp-igd/gupnp-simple-igd-thread.h>
-#include <libgupnp-igd/gupnp-enum-types.h>
-
-%%
-modulename gupnpigd
-%%
-import gobject.GObject as PyGObject_Type
diff --git a/python/rebuild-defs.sh b/python/rebuild-defs.sh
deleted file mode 100755
index 357c4cf..0000000
--- a/python/rebuild-defs.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-HEADERS=" \
- gupnp-simple-igd.h \
- gupnp-simple-igd-thread.h \
- gupnp-enum-types.h"
-
-srcdir=../libgupnp-igd/
-
-output=pygupnp-igd.defs
-filter=pygupnp-igd-filters.defs
-modulename=gupnp_simple_igd
-
-cat $filter>$output
-
-H2DEF="$(pkg-config --variable=codegendir pygobject-2.0)/h2def.py"
-[ -z "${H2DEF}" ] && H2DEF="$(pkg-config --variable=codegendir pygtk-2.0)/h2def.py"
-[ -z "${H2DEF}" -a -f /usr/share/pygtk/2.0/codegen/h2def.py ] && H2DEF=/usr/share/pygtk/2.0/codegen/h2def.py
-
-for h in $HEADERS; do
- python ${H2DEF} --defsfilter=${filter} --modulename=${modulename} ${srcdir}/$h >> $output
-done
-
-sed -e "/of-object \"GUPnpSimpleIgd\"/ a \
- \ (unblock-threads t)" \
- -i ${output}