diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-30 15:34:29 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-30 15:34:29 +0000 |
| commit | 8fd99730d003cf1eff4b686fe13498952213ecc5 (patch) | |
| tree | d4bc040534f32cb4e2427b992578b32f0d12d713 /python/environs | |
| parent | 78178c89fbdbe48f3d00ec9b82b457bbae84456f (diff) | |
| download | lasso-8fd99730d003cf1eff4b686fe13498952213ecc5.tar.gz lasso-8fd99730d003cf1eff4b686fe13498952213ecc5.tar.xz lasso-8fd99730d003cf1eff4b686fe13498952213ecc5.zip | |
Update end
Diffstat (limited to 'python/environs')
| -rw-r--r-- | python/environs/py_login.c | 2 | ||||
| -rw-r--r-- | python/environs/py_login.h | 1 | ||||
| -rw-r--r-- | python/environs/py_profile.c | 116 | ||||
| -rw-r--r-- | python/environs/py_profile.h | 7 |
4 files changed, 126 insertions, 0 deletions
diff --git a/python/environs/py_login.c b/python/environs/py_login.c index 7ed92ce7..26c2f9aa 100644 --- a/python/environs/py_login.c +++ b/python/environs/py_login.c @@ -63,6 +63,8 @@ PyObject *login_getattr(PyObject *self, PyObject *args) { "protocolProfile", "assertionArtifact"); if (!strcmp(attr, "identity")) return (LassoIdentity_wrap(LASSO_PROFILE(login)->identity)); + if (!strcmp(attr, "session")) + return (LassoSession_wrap(LASSO_PROFILE(login)->session)); if (!strcmp(attr, "request")) return (LassoNode_wrap(LASSO_PROFILE(login)->request)); if (!strcmp(attr, "response")) diff --git a/python/environs/py_login.h b/python/environs/py_login.h index a9aa3b38..650ed7cc 100644 --- a/python/environs/py_login.h +++ b/python/environs/py_login.h @@ -30,6 +30,7 @@ #include "py_server.h" #include "py_identity.h" +#include "py_session.h" typedef struct { PyObject_HEAD diff --git a/python/environs/py_profile.c b/python/environs/py_profile.c index a2528d78..3e0bbe98 100644 --- a/python/environs/py_profile.c +++ b/python/environs/py_profile.c @@ -86,6 +86,87 @@ PyObject *profile_new(PyObject *self, PyObject *args) { return (LassoProfile_wrap(ctx)); } +PyObject *profile_get_identity(PyObject *self, PyObject *args) { + PyObject *ctx_obj; + LassoIdentity *identity; + + if (CheckArgs(args, "O:profile_get_identity")) { + if(!PyArg_ParseTuple(args, (char *) "O:profile_get_identity", + &ctx_obj)) + return NULL; + } + else return NULL; + + identity = lasso_profile_get_identity(LassoProfile_get(ctx_obj)); + + return(LassoIdentity_wrap(identity)); +} + +PyObject *profile_get_session(PyObject *self, PyObject *args) { + PyObject *ctx_obj; + LassoSession *session; + + if (CheckArgs(args, "O:profile_get_session")) { + if(!PyArg_ParseTuple(args, (char *) "O:profile_get_session", + &ctx_obj)) + return NULL; + } + else return NULL; + + session = lasso_profile_get_session(LassoProfile_get(ctx_obj)); + + return(LassoSession_wrap(session)); +} + +PyObject *profile_is_identity_dirty(PyObject *self, PyObject *args) { + PyObject *ctx_obj; + int ret; + + if (CheckArgs(args, "O:profile_is_identity_dirty")) { + if(!PyArg_ParseTuple(args, (char *) "O:profile_is_identity_dirty", + &ctx_obj)) + return NULL; + } + else return NULL; + + ret = lasso_profile_is_identity_dirty(LassoProfile_get(ctx_obj)); + + return(int_wrap(ret)); +} + +PyObject *profile_is_session_dirty(PyObject *self, PyObject *args) { + PyObject *ctx_obj; + int ret; + + if (CheckArgs(args, "O:profile_is_session_dirty")) { + if(!PyArg_ParseTuple(args, (char *) "O:profile_is_session_dirty", + &ctx_obj)) + return NULL; + } + else return NULL; + + ret = lasso_profile_is_session_dirty(LassoProfile_get(ctx_obj)); + + return(int_wrap(ret)); +} + +PyObject *profile_set_identity(PyObject *self, PyObject *args) { + PyObject *ctx_obj, *identity_obj; + gint ret; + + if (CheckArgs(args, "OO:profile_set_identity")) { + if(!PyArg_ParseTuple(args, (char *) "OO:profile_set_identity", + &ctx_obj, &identity_obj)) + return NULL; + } + else return NULL; + + ret = lasso_profile_set_identity(LassoProfile_get(ctx_obj), + LassoIdentity_get(identity_obj)); + + return(int_wrap(ret)); +} + PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args) { PyObject *ctx_obj; gchar *dump; @@ -103,3 +184,38 @@ PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args) { return(int_wrap(ret)); } + +PyObject *profile_set_session(PyObject *self, PyObject *args) { + PyObject *ctx_obj, *session_obj; + gint ret; + + if (CheckArgs(args, "OO:profile_set_session")) { + if(!PyArg_ParseTuple(args, (char *) "OO:profile_set_session", + &ctx_obj, &session_obj)) + return NULL; + } + else return NULL; + + ret = lasso_profile_set_session(LassoProfile_get(ctx_obj), + LassoSession_get(session_obj)); + + return(int_wrap(ret)); +} + +PyObject *profile_set_session_from_dump(PyObject *self, PyObject *args) { + PyObject *ctx_obj; + gchar *dump; + gint ret; + + if (CheckArgs(args, "OS:profile_set_session_from_dump")) { + if(!PyArg_ParseTuple(args, (char *) "Os:profile_set_session_from_dump", + &ctx_obj, &dump)) + return NULL; + } + else return NULL; + + ret = lasso_profile_set_session_from_dump(LassoProfile_get(ctx_obj), + dump); + + return(int_wrap(ret)); +} diff --git a/python/environs/py_profile.h b/python/environs/py_profile.h index c71142b5..98f7e767 100644 --- a/python/environs/py_profile.h +++ b/python/environs/py_profile.h @@ -39,7 +39,14 @@ PyObject *LassoProfile_wrap(LassoProfile *ctx); PyObject *profile_get_request_type_from_soap_msg(PyObject *self, PyObject *args); PyObject *profile_new(PyObject *self, PyObject *args); +PyObject *profile_get_identity(PyObject *self, PyObject *args); +PyObject *profile_get_session(PyObject *self, PyObject *args); +PyObject *profile_is_identity_dirty(PyObject *self, PyObject *args); +PyObject *profile_is_session_dirty(PyObject *self, PyObject *args); +PyObject *profile_set_identity(PyObject *self, PyObject *args); PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args); +PyObject *profile_set_session(PyObject *self, PyObject *args); +PyObject *profile_set_session_from_dump(PyObject *self, PyObject *args); #endif /* __PYLASSO_PY_PROFILE_H__ */ |
