summaryrefslogtreecommitdiffstats
path: root/php/php_lasso.h
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-04 16:12:49 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-08-04 16:12:49 +0000
commitf3e2bfbb4f3243bc82caa57eb922ba414909ee37 (patch)
tree2f0b56c8a0e9f021a9bc068287fde47fe367079d /php/php_lasso.h
parent59073ea1dde142312d2dec01e14f1607501e8cd9 (diff)
downloadlasso-f3e2bfbb4f3243bc82caa57eb922ba414909ee37.tar.gz
lasso-f3e2bfbb4f3243bc82caa57eb922ba414909ee37.tar.xz
lasso-f3e2bfbb4f3243bc82caa57eb922ba414909ee37.zip
first php binding import
Diffstat (limited to 'php/php_lasso.h')
-rw-r--r--php/php_lasso.h145
1 files changed, 145 insertions, 0 deletions
diff --git a/php/php_lasso.h b/php/php_lasso.h
new file mode 100644
index 00000000..4e55ef5b
--- /dev/null
+++ b/php/php_lasso.h
@@ -0,0 +1,145 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 4 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2003 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.02 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: |
+ +----------------------------------------------------------------------+
+
+ $Id$
+*/
+
+#ifndef PHP_LASSO_H
+#define PHP_LASSO_H
+
+extern zend_module_entry lasso_module_entry;
+#define phpext_lasso_ptr &lasso_module_entry
+
+#ifdef PHP_WIN32
+#define PHP_LASSO_API __declspec(dllexport)
+#else
+#define PHP_LASSO_API
+#endif
+
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
+/* Resource */
+#define le_lassonode_name "LASSO Node Resource"
+#define le_lassoserver_name "LASSO Server Resource"
+#define le_lassologin_name "LASSO Login Resource"
+#define le_lassoidentity_name "LASSO Identity Resource"
+#define le_lassosession_name "LASSO Session Resource"
+#define le_lassofederation_name "LASSO Federation Resource"
+#define le_lassoprofile_name "LASSO Profile Resource"
+#define le_lassolibauthnrequest_name "LASSO Lib Authn Request Resource"
+
+PHP_MINIT_FUNCTION(lasso);
+PHP_MSHUTDOWN_FUNCTION(lasso);
+PHP_RINIT_FUNCTION(lasso);
+PHP_RSHUTDOWN_FUNCTION(lasso);
+PHP_MINFO_FUNCTION(lasso);
+
+PHP_FUNCTION(lasso_init);
+PHP_FUNCTION(lasso_version);
+PHP_FUNCTION(lasso_shutdown);
+
+/* lasso_server.c */
+PHP_FUNCTION(lasso_server_new);
+PHP_FUNCTION(lasso_server_dump);
+PHP_FUNCTION(lasso_server_add_provider);
+PHP_FUNCTION(lasso_server_destroy);
+PHP_FUNCTION(lasso_server_new_from_dump);
+
+/* lasso_login.c */
+PHP_FUNCTION(lasso_login_new);
+PHP_FUNCTION(lasso_login_new_from_dump);
+PHP_FUNCTION(lasso_login_init_authn_request);
+PHP_FUNCTION(lasso_login_build_request_msg);
+PHP_FUNCTION(lasso_login_destroy);
+PHP_FUNCTION(lasso_login_build_authn_request_msg);
+
+/* lasso_user.c */
+PHP_FUNCTION(lasso_identity_new);
+PHP_FUNCTION(lasso_identity_get_next_providerid);
+PHP_FUNCTION(lasso_identity_dump);
+PHP_FUNCTION(lasso_identity_destroy);
+
+/* lasso_federation.c */
+PHP_FUNCTION(lasso_federation_new);
+
+/* lasso_profile_.c */
+PHP_FUNCTION(lasso_profile_new);
+PHP_FUNCTION(lasso_profile_dump);
+PHP_FUNCTION(lasso_profile_set_remote_providerid);
+PHP_FUNCTION(lasso_profile_set_response_status);
+PHP_FUNCTION(lasso_profile_user_from_dump);
+PHP_FUNCTION(lasso_profile_get_request_type_from_soap_msg);
+PHP_FUNCTION(lasso_cast_to_profile);
+PHP_FUNCTION(lasso_profile_get_request);
+PHP_FUNCTION(lasso_profile_get_msg_url);
+PHP_FUNCTION(lasso_profile_get_msg_body);
+PHP_FUNCTION(lasso_profile_get_msg_relaystate);
+
+/* lasso_lib_authn_request.c */
+PHP_FUNCTION(lasso_cast_to_lib_authn_request);
+PHP_FUNCTION(lasso_lib_authn_request_set_consent);
+PHP_FUNCTION(lasso_lib_authn_request_set_ispassive);
+PHP_FUNCTION(lasso_lib_authn_request_set_forceauthn);
+PHP_FUNCTION(lasso_lib_authn_request_set_nameidpolicy);
+PHP_FUNCTION(lasso_lib_authn_request_set_relaystate);
+PHP_FUNCTION(lasso_lib_authn_request_set_protocolprofile);
+
+/* GLOBALS */
+ZEND_BEGIN_MODULE_GLOBALS(lasso)
+ long global_value;
+ char *global_string;
+ZEND_END_MODULE_GLOBALS(lasso)
+
+/* global resoucres */
+extern int le_lasso;
+extern int le_lassonode;
+extern int le_lassoserver;
+extern int le_lassologin;
+extern int le_lassoidentity;
+extern int le_lassosession;
+extern int le_lassofederation;
+extern int le_lassoprofile;
+extern int le_lassolibauthnrequest;
+
+/* In every utility function you add that needs to use variables
+ in php_lasso_globals, call TSRMLS_FETCH(); after declaring other
+ variables used by that function, or better yet, pass in TSRMLS_CC
+ after the last function argument and declare your utility function
+ with TSRMLS_DC after the last declared argument. Always refer to
+ the globals in your function as LASSO_G(variable). You are
+ encouraged to rename these macros something shorter, see
+ examples in any other php module directory.
+*/
+
+#ifdef ZTS
+#define LASSO_G(v) TSRMG(lasso_globals_id, zend_lasso_globals *, v)
+#else
+#define LASSO_G(v) (lasso_globals.v)
+#endif
+
+#endif /* PHP_LASSO_H */
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */