summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-09-12 15:06:58 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-09-12 15:06:58 +0000
commit9ed0670e48665f590eda685e0cfebf8c4cadb8fb (patch)
treea3f909876ca336256b304de9a350ab526d16abea /bindings
parent73d9c98f92b9664c6d78843c4110b71520fa3f67 (diff)
downloadlasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.tar.gz
lasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.tar.xz
lasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.zip
* Remove ending blanks
Diffstat (limited to 'bindings')
-rw-r--r--bindings/bindings.py6
-rw-r--r--bindings/ghashtable.h2
-rw-r--r--bindings/java/lang.py12
-rw-r--r--bindings/java/wrapper_top.c52
-rw-r--r--bindings/php4/lang.py18
-rw-r--r--bindings/php4/lasso_php4_helper.c6
-rw-r--r--bindings/php5/lang.py2
-rw-r--r--bindings/php5/php_code.py6
-rw-r--r--bindings/php5/wrapper_header.py2
-rw-r--r--bindings/php5/wrapper_source.py2
-rw-r--r--bindings/php5/wrapper_source_top.c6
-rw-r--r--bindings/python/lang.py8
-rw-r--r--bindings/python/tests/XmlTestRunner.py6
-rwxr-xr-xbindings/python/tests/binding_tests.py4
-rwxr-xr-xbindings/python/tests/idwsf1_tests.py18
-rwxr-xr-xbindings/python/tests/idwsf2_tests.py26
-rwxr-xr-xbindings/python/tests/profiles_tests.py6
-rwxr-xr-xbindings/python/tests/tests.py10
-rw-r--r--bindings/python/wrapper_top.c42
-rw-r--r--bindings/utils.py6
20 files changed, 120 insertions, 120 deletions
diff --git a/bindings/bindings.py b/bindings/bindings.py
index e886cca1..0db922bf 100644
--- a/bindings/bindings.py
+++ b/bindings/bindings.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
#
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -179,7 +179,7 @@ class Function:
return_owner = True
skip = False
errors = None
-
+
def __repr__(self):
return '<Function return_type:%s name:%s args:%r>' % (
self.return_type, self.name, self.args)
@@ -502,7 +502,7 @@ def main():
java_binding = lang.Binding(binding)
java_binding.print_list_of_files();
-
+
if __name__ == '__main__':
main()
diff --git a/bindings/ghashtable.h b/bindings/ghashtable.h
index f349e92e..f8c9755d 100644
--- a/bindings/ghashtable.h
+++ b/bindings/ghashtable.h
@@ -1,4 +1,4 @@
-#ifndef G_HASHTABLE_H
+#ifndef G_HASHTABLE_H
#define G_HASHTABLE_H 1
#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 14)
diff --git a/bindings/java/lang.py b/bindings/java/lang.py
index b4249052..1ba915e2 100644
--- a/bindings/java/lang.py
+++ b/bindings/java/lang.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -126,7 +126,7 @@ class Binding:
print p,
print
print
-
+
def is_int_type(self, type):
return type in ['gboolean','int','gint'] + self.binding_data.enums
@@ -193,7 +193,7 @@ public abstract interface LassoConstants {
self.generate_JNI_functions(m, fd)
self.generate_JNI_footer(fd)
fd.close();
-
+
def generate_JNI_header(self, fd):
print >> fd, '''\
/* this file has been generated automatically; do not edit */
@@ -295,7 +295,7 @@ protected static native void destroy(long cptr);
print >> fd, ' public static native void %s(GObject obj, %s[] value);' % (name,jtype)
name = '%s_add' % prefix
print >> fd, ' public static native void %s(GObject obj, %s value);' % (name,jtype)
- if not m[2].get('elem_type') in ('xmlNode*',):
+ if not m[2].get('elem_type') in ('xmlNode*',):
name = '%s_remove' % prefix
print >> fd, ' public static native void %s(GObject obj, %s value);' % (name,jtype)
elif mtype == 'GHashTable*':
@@ -324,8 +324,8 @@ protected static native void destroy(long cptr);
}
'''
print >>fd, '}'
-
-
+
+
# Wrappers
def generate_wrapper(self):
fd = open('com_entrouvert_lasso_LassoJNI.c', 'w')
diff --git a/bindings/java/wrapper_top.c b/bindings/java/wrapper_top.c
index d17ba2b7..e98f149e 100644
--- a/bindings/java/wrapper_top.c
+++ b/bindings/java/wrapper_top.c
@@ -9,8 +9,8 @@
#define LASSO_ROOT "com/entrouvert/lasso/"
#define check_exception (*env)->ExceptionCheck(env)
-#define g_return_val_if_exception(value) if ((*env)->ExceptionCheck(env)) return (value);
-#define g_return_if_exception() if ((*env)->ExceptionCheck(env)) return;
+#define g_return_val_if_exception(value) if ((*env)->ExceptionCheck(env)) return (value);
+#define g_return_if_exception() if ((*env)->ExceptionCheck(env)) return;
#define convert_jlong_to_gobject(value) ((GObject*)(ptrdiff_t)value)
#define g_error_if_fail(value) { if (!(value)) { g_on_error_query("LassoJNI"); } }
#define PTR_TO_JLONG(x) (jlong)((ptrdiff_t)x)
@@ -173,12 +173,12 @@ static int nullWeakRef(JNIEnv *env, jweak weakRef) {
return weakRef && (*env)->IsSameObject(env, weakRef, NULL);
}
/** Return the shadow object associated with the gobject.
- * If the weak global reference is dead, frees it.
+ * If the weak global reference is dead, frees it.
* If not shadow object is present, return NULL. */
-static jobject
+static jobject
get_shadow_object(JNIEnv *env, GObject *obj) {
jweak weakRef;
-
+
g_error_if_fail (obj && env);
weakRef = (jweak)g_object_get_qdata(obj, lasso_wrapper_key);
if (weakRef == NULL) {
@@ -197,11 +197,11 @@ get_shadow_object(JNIEnv *env, GObject *obj) {
* Replacing a non NULL weak global reference by another one should not happend.
* It means that two java shadow object for the same GObject exist at the same time
*/
-static void
+static void
set_shadow_object(JNIEnv *env, GObject *obj, jobject shadow_object) {
jweak weakRef;
jweak old_weakRef;
-
+
g_error_if_fail(obj && env);
old_weakRef = (jweak)g_object_get_qdata(obj, lasso_wrapper_key);
@@ -218,7 +218,7 @@ set_shadow_object(JNIEnv *env, GObject *obj, jobject shadow_object) {
}
}
/** Throw a new RuntimeException containing this message. */
-static void
+static void
exception(JNIEnv *env, char *message) {
jclass cls = (*env)->FindClass(env, "java/lang/RuntimeException");
if (cls != NULL) {
@@ -338,7 +338,7 @@ out:
}
/* lasso objects handling impl */
-static void
+static void
create_class_name(char *dest, const char *typename) {
char *ret;
@@ -346,8 +346,8 @@ create_class_name(char *dest, const char *typename) {
if (ret) {
typename = ret+5;
}
- strncpy(dest+sizeof(LASSO_ROOT)-1, typename,50);
- dest[sizeof(LASSO_ROOT)+49] = 0;
+ strncpy(dest+sizeof(LASSO_ROOT)-1, typename,50);
+ dest[sizeof(LASSO_ROOT)+49] = 0;
}
/** Convert the GObject obj to a java object encapsulating it.
* If obj is NULL, return NULL.
@@ -375,7 +375,7 @@ gobject_to_jobject_aux(JNIEnv *env, GObject *obj, gboolean doRef, jobject *jobj)
/* Create the shadow object */
char clsName[sizeof(LASSO_ROOT)+50] = LASSO_ROOT;
const char *typename;
-
+
typename = G_OBJECT_TYPE_NAME(obj);
create_class_name(clsName, typename);
if (! new_object_with_gobject(env, obj, clsName, &self)) {
@@ -410,7 +410,7 @@ static int
jobject_to_gobject(JNIEnv *env, jobject obj, GObject **gobj) {
jlong value;
GObject *gobject;
-
+
g_error_if_fail(env);
if (! obj) {
@@ -444,7 +444,7 @@ jobject_to_gobject_for_list(JNIEnv *env, jobject obj, GObject **gobj) {
}
/* List handling */
-static void
+static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@@ -519,9 +519,9 @@ error:
free_glist(&new, free_function);
return 0;
}
-/** Remove a value obtained via the convert function on obj from *list.
+/** Remove a value obtained via the convert function on obj from *list.
* It is searched inside *list using the compare function.
- * If pointer is found, it is freed using the free_function.
+ * If pointer is found, it is freed using the free_function.
* Return 0 if an exception was throwed.
**/
static int
@@ -559,7 +559,7 @@ remove_from_list_of_strings(JNIEnv *env, GList **list, jstring jstr) {
* Returns 1.
* Returns 0 and throws if anything fail.
*/
-static int
+static int
add_to_list(JNIEnv* env, GList** list, jobject obj, OutConverter convert) {
gpointer data;
@@ -612,7 +612,7 @@ out:
return ret;
}
/** Fill a GHashTable with content of java array arr.
- * Even indexed element coressponds to keys (jstring) and
+ * Even indexed element coressponds to keys (jstring) and
* odd indexed one to value (GObject).
* Returns 1.
* Returns 0 and thows an exception if anything fail.
@@ -633,13 +633,13 @@ set_hash_of_objects(JNIEnv *env, GHashTable *hashtable, jobjectArray jarr)
for (i = 1; i < l; i += 2) {
jobject jobj;
GObject *gobj;
-
+
g_return_val_if_fail(get_array_element(env, jarr, i, &jobj), 0);
g_return_val_if_fail(jobject_to_gobject(env, jobj, &gobj), 0);
g_object_ref(gobj);
}
}
- /** Remove old values, if hashtable is well initialized
+ /** Remove old values, if hashtable is well initialized
* it should unref objects automatically. */
g_hash_table_remove_all(hashtable);
/** Insert new values */
@@ -670,7 +670,7 @@ set_hash_of_objects(JNIEnv *env, GHashTable *hashtable, jobjectArray jarr)
/** Insert a java String array, containing
* keys at odd indexes, and values at even indexes into an existing
* GHashTable. Old entries are lost, but hopefully deallocated by
- * the hashtable free functions --- setted at creation, see GLib
+ * the hashtable free functions --- setted at creation, see GLib
* documentation.
*
* @param env the JNI context given by the JVM
@@ -734,7 +734,7 @@ remove_from_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey) {
}
/** Add a jobject to an hashtable */
static int
-add_to_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey, jobject jvalue, OutConverter convert, GFunc free_function)
+add_to_hash(JNIEnv *env, GHashTable *hashtable, jstring jkey, jobject jvalue, OutConverter convert, GFunc free_function)
{
void *value = NULL;
char *key = NULL;
@@ -754,8 +754,8 @@ error:
free_function(value, NULL);
return 0;
}
-static int
-get_hash_by_name(JNIEnv *env, GHashTable *hashtable, jstring jkey, Converter convert, jobject *jvalue)
+static int
+get_hash_by_name(JNIEnv *env, GHashTable *hashtable, jstring jkey, Converter convert, jobject *jvalue)
{
const char *key;
gpointer value;
@@ -782,7 +782,7 @@ throw_by_name(JNIEnv *env, const char *name, const char *msg)
/* JNI Functions */
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_init2(JNIEnv *env, jclass cls) {
- lasso_wrapper_key = g_quark_from_static_string("JavaLasso::wrapper");
+ lasso_wrapper_key = g_quark_from_static_string("JavaLasso::wrapper");
}
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_destroy(JNIEnv *env, jclass cls, jlong cptr) {
GObject *obj = (GObject*)(ptrdiff_t)cptr;
@@ -791,7 +791,7 @@ JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_destroy(JNIEnv *env, j
}
JNIEXPORT void JNICALL Java_com_entrouvert_lasso_LassoJNI_set_1shadow_1object(JNIEnv *env, jclass cls, jlong cptr, jobject shadow_object) {
GObject *gobj;
-
+
gobj = convert_jlong_to_gobject(cptr);
set_shadow_object(env, gobj, shadow_object);
}
diff --git a/bindings/php4/lang.py b/bindings/php4/lang.py
index a5a3a033..32ce5a40 100644
--- a/bindings/php4/lang.py
+++ b/bindings/php4/lang.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -100,10 +100,10 @@ class Binding:
def success(self):
self.ret('SUCCESS')
-
+
def declare_zval(self, name):
self.declare('zval*', zval(name))
-
+
def declare(self, type, name):
self.module('%s %s;' % (type, name))
@@ -147,7 +147,7 @@ class Binding:
if options.get('nonull') == None and ret:
ret += '!'
return ret
-
+
def generate_parse_args(self, arg):
type, name, options = arg
ret = ''
@@ -215,7 +215,7 @@ class Binding:
def method_epilogue(self, args = list()):
for arg in args:
- type, name, options = arg
+ type, name, options = arg
type, name, options = arg
if type == 'gboolean' and type in ['int', 'gint'] + self.binding_data.enums and type in ('char*', 'gchar*','const char*','const gchar*'):
pass
@@ -253,7 +253,7 @@ class Binding:
else:
par = '%s = %s;'
self.module(pat % (left, right))
-
+
def return_c_value(self, type, name, options = dict()):
if type is None:
return
@@ -292,7 +292,7 @@ class Binding:
self.module('RETVAL_NULL();')
self.close()
#
-
+
def generate(self):
self.generate_php()
self.generate_module()
@@ -411,7 +411,7 @@ class Binding:
def generate_module_minit_constants(self):
self.module('/* Constants (both enums and defines) */')
- mapping = {
+ mapping = {
'i': 'REGISTER_LONG_CONSTANT("%(name)s", %(name)s, CONST_CS|CONST_PERSISTENT);',
's': 'REGISTER_STRING_CONSTANT("%(name)s", %(name)s, CONST_CS|CONST_PERSISTENT);',
'b': '''\
@@ -437,7 +437,7 @@ class Binding:
def generate_module_rinit(self):
self.generate_module_dummy_function('PHP_RINIT(lasso)')
-
+
def generate_module_rshutdown(self):
self.generate_module_dummy_function('PHP_RSHUTDOWN(lasso)')
diff --git a/bindings/php4/lasso_php4_helper.c b/bindings/php4/lasso_php4_helper.c
index 5a1ca6fd..6bdc3bb2 100644
--- a/bindings/php4/lasso_php4_helper.c
+++ b/bindings/php4/lasso_php4_helper.c
@@ -98,7 +98,7 @@ PHP_FUNCTION(lasso_get_object_typename)
}
/* List handling */
-static void
+static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@@ -304,9 +304,9 @@ get_hashtable_from_array_of_objects(zval *array)
}
} else {
if (cvt_temp != NULL) {
- g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
+ g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
} else {
- g_hash_table_insert(result, (gpointer)index, NULL);
+ g_hash_table_insert(result, (gpointer)index, NULL);
}
}
}
diff --git a/bindings/php5/lang.py b/bindings/php5/lang.py
index fbed5d47..32d92465 100644
--- a/bindings/php5/lang.py
+++ b/bindings/php5/lang.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
diff --git a/bindings/php5/php_code.py b/bindings/php5/php_code.py
index 8b8eef84..1a5d238c 100644
--- a/bindings/php5/php_code.py
+++ b/bindings/php5/php_code.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -62,7 +62,7 @@ function cptrToPhp ($cptr) {
if (is_null($cptr) || !$cptr) return null;
$typename = lasso_get_object_typename($cptr);
$class_name = $typename . "NoInit";
- $obj = new $class_name();
+ $obj = new $class_name();
if (! is_null($obj)) {
$obj->_cptr = $cptr;
return $obj;
@@ -182,7 +182,7 @@ function lassoRegisterIdWsf2DstService($prefix, $href) {
mtype = m[0]
mname = utils.format_as_camelcase(m[1])
options = m[2]
-
+
# Getters
print >> self.fd, ' /**'
print >> self.fd, ' * @return %s' % self.get_docstring_return_type(mtype)
diff --git a/bindings/php5/wrapper_header.py b/bindings/php5/wrapper_header.py
index 3cf895af..3bae4c0e 100644
--- a/bindings/php5/wrapper_header.py
+++ b/bindings/php5/wrapper_header.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
diff --git a/bindings/php5/wrapper_source.py b/bindings/php5/wrapper_source.py
index 319b9671..ab2d2715 100644
--- a/bindings/php5/wrapper_source.py
+++ b/bindings/php5/wrapper_source.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
diff --git a/bindings/php5/wrapper_source_top.c b/bindings/php5/wrapper_source_top.c
index ba7f1fe6..c8d9eee1 100644
--- a/bindings/php5/wrapper_source_top.c
+++ b/bindings/php5/wrapper_source_top.c
@@ -82,7 +82,7 @@ static void php_gobject_generic_destructor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
}
/* List handling */
-static void
+static void
free_glist(GList **list, GFunc free_function) {
g_return_if_fail(list);
if (*list) {
@@ -287,9 +287,9 @@ get_hashtable_from_array_of_objects(zval *array)
}
} else {
if (cvt_temp != NULL) {
- g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
+ g_hash_table_insert(result, (gpointer)index, g_object_ref(cvt_temp->obj));
} else {
- g_hash_table_insert(result, (gpointer)index, NULL);
+ g_hash_table_insert(result, (gpointer)index, NULL);
}
}
}
diff --git a/bindings/python/lang.py b/bindings/python/lang.py
index 26d86d53..8fdd4385 100644
--- a/bindings/python/lang.py
+++ b/bindings/python/lang.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -33,7 +33,7 @@ class Binding:
def is_pygobject(self, t):
if t:
m = re.match(r'(?:const\s*)?(.*)',t) # Remove const modifier
- t = m.group(1)
+ t = m.group(1)
return t not in ['char*', 'gchar*',
'GList*', 'GHashTable*',
'int', 'gint', 'gboolean', 'xmlNode*'] + self.binding_data.enums
@@ -106,7 +106,7 @@ class frozendict(dict):
print >> fd, '''\
class Error(Exception):
code = None
-
+
@staticmethod
def raise_on_rc(rc):
global exceptions_dict
@@ -270,7 +270,7 @@ if WSF_SUPPORT:
c_args.append('%s._cptr' % arg_name)
else:
c_args.append(arg_name)
-
+
c_args = ', '.join(c_args)
py_args = ', ' + ', '.join(py_args)
print >> fd, ' def __init__(self%s):' % py_args
diff --git a/bindings/python/tests/XmlTestRunner.py b/bindings/python/tests/XmlTestRunner.py
index 152dc8b2..3fa8a239 100644
--- a/bindings/python/tests/XmlTestRunner.py
+++ b/bindings/python/tests/XmlTestRunner.py
@@ -5,19 +5,19 @@
# XmlTestRunner
#
# Copyright (C) 2004-2007 Entr'ouvert
-#
+#
# Authors: Frederic Peters <fpeters@entrouvert.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/bindings/python/tests/binding_tests.py b/bindings/python/tests/binding_tests.py
index d86d519b..872d2f3c 100755
--- a/bindings/python/tests/binding_tests.py
+++ b/bindings/python/tests/binding_tests.py
@@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
diff --git a/bindings/python/tests/idwsf1_tests.py b/bindings/python/tests/idwsf1_tests.py
index 3dc5cf86..a2f26b83 100755
--- a/bindings/python/tests/idwsf1_tests.py
+++ b/bindings/python/tests/idwsf1_tests.py
@@ -12,12 +12,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -98,7 +98,7 @@ class IdWsf1TestCase(unittest.TestCase):
sp_login.request.nameIdPolicy = lasso.LIB_NAMEID_POLICY_TYPE_FEDERATED
sp_login.request.protocolProfile = lasso.LIB_PROTOCOL_PROFILE_BRWS_POST
sp_login.buildAuthnRequestMsg()
-
+
idp_login = lasso.Login(idp)
idp_login.processAuthnRequestMsg(sp_login.msgBody)
idp_login.validateRequestMsg(True, True)
@@ -182,7 +182,7 @@ class DiscoveryModifyTestCase(IdWsf1TestCase):
# Process Modify
request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody)
- self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
+ self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
idp_disco = lasso.Discovery(self.idp)
idp_disco.processModifyMsg(wsp_disco.msgBody)
idp_disco.setIdentityFromDump(idp_identity_dump)
@@ -216,7 +216,7 @@ class DiscoveryRemoveTestCase(IdWsf1TestCase):
# Process Modify
request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody)
- self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
+ self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY)
idp_disco = lasso.Discovery(self.idp)
idp_disco.processModifyMsg(wsp_disco.msgBody)
idp_disco.setIdentityFromDump(idp_identity_dump)
@@ -274,7 +274,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service.buildRequestMsg()
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
- self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
+ self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)
@@ -313,9 +313,9 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service = self.get_pp_service()
wsc_service.initModify(xpath, new_data)
wsc_service.buildRequestMsg()
-
+
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
- self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
+ self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)
@@ -347,7 +347,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase):
wsc_service.buildRequestMsg()
request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody)
- self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
+ self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY)
self.wsp = self.get_wsp_server()
wsp_service = lasso.DataService(self.wsp)
diff --git a/bindings/python/tests/idwsf2_tests.py b/bindings/python/tests/idwsf2_tests.py
index 0c52a321..7500ab25 100755
--- a/bindings/python/tests/idwsf2_tests.py
+++ b/bindings/python/tests/idwsf2_tests.py
@@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -79,7 +79,7 @@ class IdWsf2TestCase(unittest.TestCase):
server.getProvider(server.providerIds[0]).setEncryptionMode(lasso.ENCRYPTION_MODE_NAMEID);
server.addProvider(lasso.PROVIDER_ROLE_SP, wsc_metadata, None, None)
self.idp_server_dump = server.dump()
-
+
return server
def idpRegisterSelf(self, idp_server):
@@ -131,7 +131,7 @@ class IdWsf2TestCase(unittest.TestCase):
idp_identity_dump = idp_login.identity.dump()
if idp_login.isSessionDirty:
idp_session_dump = idp_login.session.dump()
-
+
sp_login = lasso.Login(sp)
query = idp_login.msgUrl.split('?')[1]
query = query.replace("%3D", "=")
@@ -416,9 +416,9 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase):
wsp_disco.setSessionFromDump(wsp_session_dump)
wsp_disco.initMetadataAssociationAdd(svcMDID)
wsp_disco.buildRequestMsg()
-
+
self.failUnless(wsp_disco.msgBody, 'missing msgBody')
-
+
def test05(self):
"""Process metadata association add request"""
idp = self.getIdpServer()
@@ -436,7 +436,7 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase):
wsp_disco.buildRequestMsg()
idp_disco = lasso.IdWsf2Discovery(idp)
-
+
try:
idp_disco.processMetadataAssociationAddMsg(wsp_disco.msgBody)
except lasso.Error, e:
@@ -1217,7 +1217,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service, wsp = self.getProfileService()
lasso.registerIdWsf2DstService('pp2', 'urn:liberty:id-sis-pp:2005-05')
service.initQuery()
-
+
try:
service.addQueryItem('/pp2:PP/pp2:InformalName', 'name')
except lasso.Error, e:
@@ -1230,7 +1230,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.initQuery()
service.addQueryItem('/pp2:PP/pp2:InformalName', 'name')
service.buildRequestMsg()
-
+
self.failUnless(service.msgBody, 'missing msgBody')
def test05(self):
@@ -1242,7 +1242,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.addQueryItem('not existing attribute', 'not existing attribute')
service.addQueryItem('/pp2:PP/pp2:MsgContact', 'email')
service.buildRequestMsg()
-
+
self.failUnless(service.msgBody, 'missing msgBody')
def test06(self):
@@ -1589,7 +1589,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
informal_name = service.getAttributeNode()
-
+
self.failUnlessEqual(informal_name, """<pp2:InformalName xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">User name</pp2:InformalName>""", 'first attribute node is wrong')
def test21(self):
@@ -1617,7 +1617,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
informal_name = service.getAttributeString('name')
-
+
self.failUnlessEqual(informal_name, 'User name', 'attribute string is wrong')
def test22(self):
@@ -1645,7 +1645,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase):
service.processQueryResponseMsg(wsp_service.msgBody)
email = service.getAttributeNode('email')
-
+
expected_result = """<pp2:MsgContact xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">.*?<pp2:MsgAccount>Email account</pp2:MsgAccount>.*?<pp2:MsgProvider>Email server</pp2:MsgProvider>.*?</pp2:MsgContact>"""
import re
diff --git a/bindings/python/tests/profiles_tests.py b/bindings/python/tests/profiles_tests.py
index 84647b21..b1dd0442 100755
--- a/bindings/python/tests/profiles_tests.py
+++ b/bindings/python/tests/profiles_tests.py
@@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -207,7 +207,7 @@ class LoginTestCase(unittest.TestCase):
self.failUnless('<action>do</action>' in extensionsList[0])
self.failUnless('<action2>do action 2</action2>' in extensionsList[0])
self.failUnless('<action3>do action 3</action3>' in extensionsList[0])
-
+
class LogoutTestCase(unittest.TestCase):
def test01(self):
diff --git a/bindings/python/tests/tests.py b/bindings/python/tests/tests.py
index 9915a64e..14c8c864 100755
--- a/bindings/python/tests/tests.py
+++ b/bindings/python/tests/tests.py
@@ -14,12 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -68,13 +68,13 @@ if options.xmlMode:
print """<testsuites xmlns="http://check.sourceforge.net/ns">"""
print """ <title>Python Bindings</title>"""
print """ <datetime>%s</datetime>""" % time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
-
+
success = True
for testSuite in testSuites:
fp, pathname, description = imp.find_module(testSuite)
- try:
+ try:
module = imp.load_module(testSuite, fp, pathname, description)
- finally:
+ finally:
if fp:
fp.close()
if not module:
diff --git a/bindings/python/wrapper_top.c b/bindings/python/wrapper_top.c
index 3e65393e..3a710ab7 100644
--- a/bindings/python/wrapper_top.c
+++ b/bindings/python/wrapper_top.c
@@ -50,7 +50,7 @@ get_dict_from_hashtable_of_objects(GHashTable *value)
item_value = g_hash_table_lookup(value, keys->data);
if (item_value) {
item = PyGObjectPtr_New(G_OBJECT(item_value));
- PyDict_SetItemString(dict, (char*)keys->data, item);
+ PyDict_SetItemString(dict, (char*)keys->data, item);
Py_DECREF(item);
} else {
PyErr_Warn(PyExc_RuntimeWarning, "hashtable contains a null value");
@@ -108,12 +108,12 @@ free_list(GList **a_list, GFunc free_help) {
}
/** Remove all elements from a_hash and replace them with
- * the key-values pairs from the python dict.
+ * the key-values pairs from the python dict.
* Increase reference of new values before removeing
* values from the hash, so if there are somme common
* values with RefCoun = 1 they won't be deallocated.
* */
-static void
+static void
set_hashtable_of_pygobject(GHashTable *a_hash, PyObject *dict) {
PyObject *key, *value;
int i;
@@ -132,7 +132,7 @@ set_hashtable_of_pygobject(GHashTable *a_hash, PyObject *dict) {
while (PyDict_Next(dict, &i, &key, &value)) {
if (! PyString_Check(key) || ! PyObject_TypeCheck(value, &PyGObjectPtrType))
{
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_TypeError,
"value should be a dict,"
"with string keys"
"and GObjectPtr values");
@@ -155,7 +155,7 @@ failure:
}
}
-/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
+/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of char*.
*/
static void
@@ -170,7 +170,7 @@ set_list_of_strings(GList **a_list, PyObject *seq) {
for (i=0; i<l; i++) {
PyObject *pystr = PySequence_Fast_GET_ITEM(seq, i);
if (! PyString_Check(pystr)) {
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_TypeError,
"value should be a tuple of strings");
goto failure;
}
@@ -183,7 +183,7 @@ failure:
free_list(&list, (GFunc)g_free);
}
-/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
+/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of xmlNode*.
*/
static void
@@ -199,7 +199,7 @@ set_list_of_xml_nodes(GList **a_list, PyObject *seq) {
PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
xmlNode *item_node;
if (! PyString_Check(item)) {
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_TypeError,
"value should be a tuple of strings");
goto failure;
}
@@ -213,7 +213,7 @@ failure:
free_list(&list, (GFunc)xmlFreeNode);
}
-/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
+/** Set the GList* pointer, pointed by a_list, to a pointer on a new GList
* created by converting the python seq into a GList of GObject*.
*/
static void
@@ -229,7 +229,7 @@ set_list_of_pygobject(GList **a_list, PyObject *seq) {
PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
GObject *gobject;
if (! PyObject_TypeCheck(item, &PyGObjectPtrType)) {
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_TypeError,
"value should be a tuple of PyGobject");
goto failure;
}
@@ -279,7 +279,7 @@ get_list_of_strings(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, str);
i++;
} else {
- PyErr_Warn(PyExc_RuntimeWarning,
+ PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@@ -289,7 +289,7 @@ get_list_of_strings(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
- Py_XDECREF(a_tuple);
+ Py_XDECREF(a_tuple);
return noneRef();
}
@@ -312,11 +312,11 @@ get_list_of_xml_nodes(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, str);
i++;
} else {
- PyErr_Warn(PyExc_RuntimeWarning,
+ PyErr_Warn(PyExc_RuntimeWarning,
"could not convert an xmlNode to a string");
}
} else {
- PyErr_Warn(PyExc_RuntimeWarning,
+ PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@@ -326,7 +326,7 @@ get_list_of_xml_nodes(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
- Py_XDECREF(a_tuple);
+ Py_XDECREF(a_tuple);
return noneRef();
}
@@ -350,11 +350,11 @@ get_list_of_pygobject(const GList *a_list) {
PyTuple_SetItem(a_tuple, i, pygobject);
i++;
} else {
- PyErr_Warn(PyExc_RuntimeWarning,
+ PyErr_Warn(PyExc_RuntimeWarning,
"could not convert a GObject to a PyGobject");
}
} else {
- PyErr_Warn(PyExc_RuntimeWarning,
+ PyErr_Warn(PyExc_RuntimeWarning,
"list contains a NULL value");
}
a_list = a_list->next;
@@ -364,7 +364,7 @@ get_list_of_pygobject(const GList *a_list) {
return a_tuple;
failure:
PyErr_SetString(PyExc_TypeError, "Allocation problem in get_list_of_strings");
- Py_XDECREF(a_tuple);
+ Py_XDECREF(a_tuple);
return noneRef();
}
@@ -390,7 +390,7 @@ PyGObjectPtr_dealloc(PyGObjectPtr *self)
static int
startswith(const char *string, const char *prefix)
{
- return strncmp(string, prefix, strlen(prefix)) == 0;
+ return strncmp(string, prefix, strlen(prefix)) == 0;
}
static PyObject*
@@ -438,7 +438,7 @@ static PyMemberDef PyGObjectPtr_members[] = {
{NULL}
};
-static PyObject*
+static PyObject*
PyGObjectPtr_get_refcount(PyGObjectPtr *self, G_GNUC_UNUSED void *closure)
{
PyObject *refcount;
@@ -495,7 +495,7 @@ set_object_field(GObject **a_gobject_ptr, PyGObjectPtr *a_pygobject) {
g_object_unref(*a_gobject_ptr);
}
if ((PyObject*)a_pygobject == Py_None) {
- *a_gobject_ptr = NULL;
+ *a_gobject_ptr = NULL;
} else {
*a_gobject_ptr = g_object_ref(a_pygobject->obj);
}
diff --git a/bindings/utils.py b/bindings/utils.py
index 2f6408f2..a2370b9c 100644
--- a/bindings/utils.py
+++ b/bindings/utils.py
@@ -1,5 +1,5 @@
# Lasso - A free implementation of the Liberty Alliance specifications.
-#
+#
# Copyright (C) 2004-2007 Entr'ouvert
# http://lasso.entrouvert.org
#
@@ -97,6 +97,6 @@ def group(list):
pile.append(t)
prev = x
return pile[0]
-
-
+
+