summaryrefslogtreecommitdiffstats
path: root/php/environs
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-16 15:03:48 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-16 15:03:48 +0000
commitc398b83f37550f400b3a8f13d32cc6d5f2b75ed9 (patch)
tree2cf759482f6c3cfb031b065dc87692f06ba20de7 /php/environs
parentefa9e723b14e730d678df3efe1aa70ff8c706e2f (diff)
Add lasso_profile_get_identity, lasso_profile_is_identity_dirty, lasso_profile_get_session, lasso_profile_is_session_dirty
Diffstat (limited to 'php/environs')
-rw-r--r--php/environs/lasso_profile.c100
-rw-r--r--php/environs/lasso_session.c1
2 files changed, 100 insertions, 1 deletions
diff --git a/php/environs/lasso_profile.c b/php/environs/lasso_profile.c
index 722d5655..ecaa0137 100644
--- a/php/environs/lasso_profile.c
+++ b/php/environs/lasso_profile.c
@@ -189,7 +189,6 @@ PHP_FUNCTION(lasso_profile_get_msg_url) {
if (ctx->msg_url)
RETURN_STRING(ctx->msg_url, 1);
}
-
/* }}} */
/* {{{ proto string lasso_profile_get_msg_body(resource ctx) */
@@ -243,3 +242,102 @@ PHP_FUNCTION(lasso_profile_get_msg_relaystate) {
RETURN_STRING(ctx->msg_relayState, 1);
}
/* }}} */
+
+
+/* {{{ proto string lasso_profile_get_identity(resource ctx) */
+PHP_FUNCTION(lasso_profile_get_identity) {
+ LassoProfile *ctx;
+ LassoIdentity *identity;
+
+ zval *parm;
+
+ int num_args;
+ int ret;
+
+ if ((num_args = ZEND_NUM_ARGS()) != 1)
+ WRONG_PARAM_COUNT
+
+ if (zend_parse_parameters(num_args TSRMLS_CC, "z", &parm) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ctx, LassoProfile *, &parm, -1, le_lassoprofile_name, le_lassoprofile);
+
+ identity = lasso_profile_get_identity(ctx);
+
+ ZEND_REGISTER_RESOURCE(return_value, identity, le_lassoidentity);
+}
+/* }}} */
+
+/* {{{ proto string lasso_profile_is_identity_dirty(resource ctx) */
+PHP_FUNCTION(lasso_profile_is_identity_dirty) {
+ LassoProfile *ctx;
+
+ zval *parm;
+
+ int num_args;
+ int ret;
+
+ if ((num_args = ZEND_NUM_ARGS()) != 1)
+ WRONG_PARAM_COUNT
+
+ if (zend_parse_parameters(num_args TSRMLS_CC, "z", &parm) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ctx, LassoProfile *, &parm, -1, le_lassoprofile_name, le_lassoprofile);
+
+ ret = lasso_profile_is_identity_dirty(ctx);
+
+ RETURN_BOOL(ret);
+}
+/* }}} */
+
+/* {{{ proto string lasso_profile_get_session(resource ctx) */
+PHP_FUNCTION(lasso_profile_get_session) {
+ LassoProfile *ctx;
+ LassoSession *session;
+
+ zval *parm;
+
+ int num_args;
+ int ret;
+
+ if ((num_args = ZEND_NUM_ARGS()) != 1)
+ WRONG_PARAM_COUNT
+
+ if (zend_parse_parameters(num_args TSRMLS_CC, "z", &parm) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ctx, LassoProfile *, &parm, -1, le_lassoprofile_name, le_lassoprofile);
+
+ session = lasso_profile_get_session(ctx);
+
+ ZEND_REGISTER_RESOURCE(return_value, session, le_lassosession);
+}
+/* }}} */
+
+/* {{{ proto string lasso_profile_is_session_dirty(resource ctx) */
+PHP_FUNCTION(lasso_profile_is_session_dirty) {
+ LassoProfile *ctx;
+
+ zval *parm;
+
+ int num_args;
+ int ret;
+
+ if ((num_args = ZEND_NUM_ARGS()) != 1)
+ WRONG_PARAM_COUNT
+
+ if (zend_parse_parameters(num_args TSRMLS_CC, "z", &parm) == FAILURE) {
+ return;
+ }
+
+ ZEND_FETCH_RESOURCE(ctx, LassoProfile *, &parm, -1, le_lassoprofile_name, le_lassoprofile);
+
+ ret = lasso_profile_is_session_dirty(ctx);
+
+ RETURN_BOOL(ret);
+}
+/* }}} */
diff --git a/php/environs/lasso_session.c b/php/environs/lasso_session.c
index d5b8e307..b0b297ec 100644
--- a/php/environs/lasso_session.c
+++ b/php/environs/lasso_session.c
@@ -32,3 +32,4 @@
#include "lasso.h"
+