home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / include / php / Zend / zend_extensions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-26  |  3.2 KB  |  98 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | Zend Engine                                                          |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 0.92 of the Zend license,     |
  8.    | that is bundled with this package in the file LICENSE, and is        | 
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.zend.com/license/0_92.txt.                                |
  11.    | If you did not receive a copy of the Zend license and are unable to  |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@zend.com so we can mail you a copy immediately.              |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Andi Gutmans <andi@zend.com>                                |
  16.    |          Zeev Suraski <zeev@zend.com>                                |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20.  
  21. #ifndef _ZEND_EXTENSIONS_H
  22. #define _ZEND_EXTENSIONS_H
  23.  
  24. #include "zend_compile.h"
  25.  
  26. #define ZEND_EXTENSION_API_NO        20000622
  27.  
  28. typedef struct _zend_extension_version_info {
  29.     int zend_extension_api_no;
  30.     char *required_zend_version;
  31.     unsigned char thread_safe;
  32.     unsigned char debug;
  33. } zend_extension_version_info;
  34.  
  35.  
  36. typedef struct _zend_extension zend_extension;
  37.  
  38. struct _zend_extension {
  39.     char *name;
  40.     char *version;
  41.     char *author;
  42.     char *URL;
  43.     char *copyright;
  44.  
  45.     int (*startup)(zend_extension *extension);
  46.     void (*shutdown)(zend_extension *extension);
  47.     void (*activate)();
  48.     void (*deactivate)();
  49.  
  50.     void (*message_handler)(int message, void *arg);
  51.  
  52.     void (*op_array_handler)(zend_op_array *op_array);
  53.     
  54.     void (*statement_handler)(zend_op_array *op_array);
  55.     void (*fcall_begin_handler)(zend_op_array *op_array);
  56.     void (*fcall_end_handler)(zend_op_array *op_array);
  57.  
  58.     void (*op_array_ctor)(zend_op_array *op_array);
  59.     void (*op_array_dtor)(zend_op_array *op_array);
  60.  
  61.     void *reserved1;
  62.     void *reserved2;
  63.     void *reserved3;
  64.     void *reserved4;
  65.     void *reserved5;
  66.     void *reserved6;
  67.     void *reserved7;
  68.     void *reserved8;
  69.  
  70.     DL_HANDLE handle;
  71.     int resource_number;
  72. };
  73.  
  74.  
  75. ZEND_API int zend_get_resource_handle(zend_extension *extension);
  76. ZEND_API void zend_extension_dispatch_message(int message, void *arg);
  77.  
  78. #define ZEND_EXTMSG_NEW_EXTENSION        1
  79.  
  80.  
  81. #define ZEND_EXTENSION()    \
  82.     ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
  83.  
  84. #define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
  85.  
  86.  
  87. ZEND_API extern zend_llist zend_extensions;
  88.  
  89. void zend_extension_dtor(zend_extension *extension);
  90. ZEND_API int zend_load_extension(char *path);
  91. ZEND_API int zend_load_extensions(char **extension_paths);
  92. ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
  93. void zend_append_version_info(zend_extension *extension);
  94. int zend_startup_extensions(void);
  95. void zend_shutdown_extensions(void);
  96.  
  97. #endif /* _ZEND_EXTENSIONS_H */
  98.