summaryrefslogtreecommitdiff
path: root/sapi/pi3web/pi3web_sapi.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /sapi/pi3web/pi3web_sapi.h
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'sapi/pi3web/pi3web_sapi.h')
-rw-r--r--sapi/pi3web/pi3web_sapi.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/sapi/pi3web/pi3web_sapi.h b/sapi/pi3web/pi3web_sapi.h
new file mode 100644
index 0000000..d229fec
--- /dev/null
+++ b/sapi/pi3web/pi3web_sapi.h
@@ -0,0 +1,102 @@
+#ifndef _PI3WEB_SAPI_H_
+#define _PI3WEB_SAPI_H_
+
+#ifdef PHP_WIN32
+# include <windows.h>
+# ifdef PHP5PI3WEB_EXPORTS
+# define MODULE_API __declspec(dllexport)
+# else
+# define MODULE_API __declspec(dllimport)
+# endif
+#else
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define MODULE_API __attribute__ ((visibility("default")))
+# else
+# define MODULE_API
+# endif
+# define far
+
+ typedef int BOOL;
+ typedef void far *LPVOID;
+ typedef unsigned long DWORD;
+ typedef DWORD far *LPDWORD;
+ typedef char CHAR;
+ typedef CHAR *LPSTR;
+ typedef unsigned char BYTE;
+ typedef BYTE far *LPBYTE;
+#endif
+
+ typedef LPVOID HCONN;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PHP_MODE_STANDARD 1
+#define PHP_MODE_HIGHLIGHT 2
+#define PHP_MODE_INDENT 3
+#define PHP_MODE_LINT 4
+
+//
+// passed to the procedure on a new request
+//
+typedef struct _CONTROL_BLOCK {
+ DWORD cbSize; // size of this struct.
+ HCONN ConnID; // Context number not to be modified!
+ DWORD dwHttpStatusCode; // HTTP Status code
+ CHAR lpszLogData[80]; // null terminated log info
+
+ LPSTR lpszMethod; // REQUEST_METHOD
+ LPSTR lpszQueryString; // QUERY_STRING
+ LPSTR lpszPathInfo; // PATH_INFO
+ LPSTR lpszPathTranslated; // PATH_TRANSLATED
+ LPSTR lpszFileName; // FileName to PHP3 physical file
+ LPSTR lpszUri; // The request URI
+ LPSTR lpszReq; // The whole HTTP request line
+ LPSTR lpszUser; // The authenticated user
+ LPSTR lpszPassword; // The authenticated password
+
+ DWORD cbTotalBytes; // Total bytes indicated from client
+ DWORD cbAvailable; // Available number of bytes
+ LPBYTE lpbData; // pointer to cbAvailable bytes
+
+ LPSTR lpszContentType; // Content type of client data
+ DWORD dwBehavior; // PHP behavior (standard, highlight, intend
+
+
+ LPVOID (* GetVariableNames) (HCONN hConn);
+
+ BOOL (* GetServerVariable) ( HCONN hConn,
+ LPSTR lpszVariableName,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwSize );
+
+ BOOL (* WriteClient) ( HCONN hConn,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwBytes,
+ DWORD dwReserved );
+
+ BOOL (* ReadClient) ( HCONN hConn,
+ LPVOID lpvBuffer,
+ LPDWORD lpdwSize );
+
+ BOOL (* SendHeaderFunction)( HCONN hConn,
+ LPDWORD lpdwSize,
+ LPDWORD lpdwDataType );
+
+} CONTROL_BLOCK, *LPCONTROL_BLOCK;
+
+MODULE_API DWORD PHP5_wrapper(LPCONTROL_BLOCK lpCB);
+MODULE_API BOOL PHP5_startup();
+MODULE_API BOOL PHP5_shutdown();
+
+// the following type declaration is for the server side
+typedef DWORD ( * PFN_WRAPPERFUNC )( CONTROL_BLOCK *pCB );
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // end definition _PI3WEB_SAPI_H_