summaryrefslogtreecommitdiffstats
path: root/python/environs/py_profile.c
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-30 12:02:28 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-30 12:02:28 +0000
commit407ce45c3b8ff3cbaafe3551423d09759ea699a6 (patch)
treef8762b82681037db9db5ca966bf089b51a2086ce /python/environs/py_profile.c
parent04c32c9de2acb7bc10303b071fdd064ea0a355be (diff)
downloadlasso-407ce45c3b8ff3cbaafe3551423d09759ea699a6.tar.gz
lasso-407ce45c3b8ff3cbaafe3551423d09759ea699a6.tar.xz
lasso-407ce45c3b8ff3cbaafe3551423d09759ea699a6.zip
Update
Diffstat (limited to 'python/environs/py_profile.c')
-rw-r--r--python/environs/py_profile.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/python/environs/py_profile.c b/python/environs/py_profile.c
index ec07b9a6..a2528d78 100644
--- a/python/environs/py_profile.c
+++ b/python/environs/py_profile.c
@@ -25,7 +25,8 @@
#include "../lassomod.h"
#include "py_profile.h"
-#include "py_user.h"
+#include "py_identity.h"
+#include "py_session.h"
#include "py_server.h"
PyObject *LassoProfile_wrap(LassoProfile *ctx) {
@@ -61,40 +62,44 @@ PyObject *profile_get_request_type_from_soap_msg(PyObject *self, PyObject *args)
/******************************************************************************/
PyObject *profile_new(PyObject *self, PyObject *args) {
- PyObject *server_obj, *user_obj;
+ PyObject *server_obj, *identity_obj, *session_obj;
LassoProfile *ctx;
- LassoUser *user = NULL;
+ LassoIdentity *identity = NULL;
+ LassoSession *session = NULL;
- if (CheckArgs(args, "Oo:profile_new")) {
- if(!PyArg_ParseTuple(args, (char *) "O|O:profile_new",
- &server_obj, &user_obj))
+ if (CheckArgs(args, "Ooo:profile_new")) {
+ if(!PyArg_ParseTuple(args, (char *) "O|OO:profile_new",
+ &server_obj, &identity_obj, &session_obj))
return NULL;
}
else return NULL;
- if (user_obj != Py_None) {
- user = LassoUser_get(user_obj);
+ if (identity_obj != Py_None) {
+ identity = LassoIdentity_get(identity_obj);
+ }
+ if (session_obj != Py_None) {
+ session = LassoSession_get(session_obj);
}
ctx = lasso_profile_new(LassoServer_get(server_obj),
- user);
+ identity, session);
return (LassoProfile_wrap(ctx));
}
-PyObject *profile_set_user_from_dump(PyObject *self, PyObject *args) {
+PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args) {
PyObject *ctx_obj;
gchar *dump;
gint ret;
- if (CheckArgs(args, "OS:profile_set_user_from_dump")) {
- if(!PyArg_ParseTuple(args, (char *) "Os:profile_set_user_from_dump",
+ if (CheckArgs(args, "OS:profile_set_identity_from_dump")) {
+ if(!PyArg_ParseTuple(args, (char *) "Os:profile_set_identity_from_dump",
&ctx_obj, &dump))
return NULL;
}
else return NULL;
- ret = lasso_profile_set_user_from_dump(LassoProfile_get(ctx_obj),
- dump);
+ ret = lasso_profile_set_identity_from_dump(LassoProfile_get(ctx_obj),
+ dump);
return(int_wrap(ret));
}