summaryrefslogtreecommitdiffstats
path: root/python/environs
diff options
context:
space:
mode:
Diffstat (limited to 'python/environs')
-rw-r--r--python/environs/py_federation_termination.c30
-rw-r--r--python/environs/py_federation_termination.h4
2 files changed, 33 insertions, 1 deletions
diff --git a/python/environs/py_federation_termination.c b/python/environs/py_federation_termination.c
index a9e9718d..6f6d0902 100644
--- a/python/environs/py_federation_termination.c
+++ b/python/environs/py_federation_termination.c
@@ -42,6 +42,36 @@ PyObject *LassoFederationTermination_wrap(LassoFederationTermination *federation
/******************************************************************************/
+PyObject *federation_termination_getattr(PyObject *self, PyObject *args) {
+ PyObject *federation_termination_obj;
+ LassoFederationTermination *federation_termination;
+ const char *attr;
+
+ if (CheckArgs(args, "OS:federation_termination_get_attr")) {
+ if (!PyArg_ParseTuple(args, "Os:federation_termination_get_attr", &federation_termination_obj, &attr))
+ return NULL;
+ }
+ else return NULL;
+
+ federation_termination = LassoFederationTermination_get(federation_termination_obj);
+
+ if (!strcmp(attr, "__members__"))
+ return Py_BuildValue("[ssss]", "user", "msg_url", "msg_body",
+ "msg_relayState");
+
+ if (!strcmp(attr, "user"))
+ return (LassoUser_wrap(LASSO_PROFILE_CONTEXT(federation_termination)->user));
+ if (!strcmp(attr, "msg_url"))
+ return (charPtrConst_wrap(LASSO_PROFILE_CONTEXT(federation_termination)->msg_url));
+ if (!strcmp(attr, "msg_body"))
+ return (charPtrConst_wrap(LASSO_PROFILE_CONTEXT(federation_termination)->msg_body));
+ if (!strcmp(attr, "msg_relayState"))
+ return (charPtrConst_wrap(LASSO_PROFILE_CONTEXT(federation_termination)->msg_relayState));
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
PyObject *federation_termination_new(PyObject *self, PyObject *args) {
PyObject *server_obj, *user_obj;
LassoFederationTermination *federation_termination;
diff --git a/python/environs/py_federation_termination.h b/python/environs/py_federation_termination.h
index cc1ebefb..c68547aa 100644
--- a/python/environs/py_federation_termination.h
+++ b/python/environs/py_federation_termination.h
@@ -39,10 +39,12 @@ typedef struct {
#define LassoFederationTermination_get(v) (((v) == Py_None) ? NULL : (((LassoFederationTermination_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj))
PyObject *LassoFederationTermination_wrap(LassoFederationTermination *federation_termination);
-PyObject *federation_termination_new(PyObject *self, PyObject *args);
+PyObject *federation_termination_getattr(PyObject *self, PyObject *args);
+
PyObject *federation_termination_build_notification_msg(PyObject *self, PyObject *args);
PyObject *federation_termination_destroy(PyObject *self, PyObject *args);
PyObject *federation_termination_init_notification(PyObject *self, PyObject *args);
+PyObject *federation_termination_new(PyObject *self, PyObject *args);
PyObject *federation_termination_process_notification_msg(PyObject *self, PyObject *args);
#endif /* __PYLASSO_PY_FEDERATION_TERMINATION_H__ */