root/swish_php/php_swishe.h

Revision 1276, 3.4 kB (checked in by jmruiz, 5 years ago)

Native PHP module for swish. Initial work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2    +----------------------------------------------------------------------+
3    | PHP version 4.0                                                      |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 2.02 of the PHP 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.php.net/license/2_02.txt.                                 |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Jose Ruiz (jmruiz@boe.es)                                   |
16    +----------------------------------------------------------------------+
17  */
18
19 #ifndef PHP_SWISHE_H
20 #define PHP_SWISHE_H
21
22 extern zend_module_entry swishe_module_entry;
23 #define phpext_swishe_ptr &swishe_module_entry
24
25 #ifdef PHP_WIN32
26 #define PHP_SWISHE_API __declspec(dllexport)
27 #else
28 #define PHP_SWISHE_API
29 #endif
30
31 #ifdef ZTS
32 #include "TSRM.h"
33 #endif
34
35 #include <swish-e.h>
36
37 #define PHP_SWISHE_VERSION "0.1"
38
39 PHP_MINIT_FUNCTION(swishe);
40 PHP_MSHUTDOWN_FUNCTION(swishe);
41 PHP_MINFO_FUNCTION(swishe);
42
43 PHP_FUNCTION(confirm_swishe_compiled);      /* For testing, remove later. */
44 PHP_FUNCTION(swishe_open);
45 PHP_FUNCTION(swishe_close);
46 PHP_FUNCTION(swishe_index_names);
47 PHP_FUNCTION(swishe_header_names);
48 PHP_FUNCTION(swishe_header_value);
49 PHP_FUNCTION(swishe_stem);
50 PHP_FUNCTION(swishe_swish_words_by_letter);
51 PHP_FUNCTION(swishe_error);
52 PHP_FUNCTION(swishe_critical_error);
53 PHP_FUNCTION(swishe_abort_last_error);
54 PHP_FUNCTION(swishe_error_string);
55 PHP_FUNCTION(swishe_last_error_msg);
56 PHP_FUNCTION(swishe_query);
57 PHP_FUNCTION(swishe_set_query);
58 PHP_FUNCTION(swishe_set_structure);
59 PHP_FUNCTION(swishe_set_phrase_delimiter);
60 PHP_FUNCTION(swishe_set_search_limit);
61 PHP_FUNCTION(swishe_reset_search_limit);
62 PHP_FUNCTION(swishe_set_sort);
63 PHP_FUNCTION(swishe_execute);
64 PHP_FUNCTION(swishe_hits);
65 PHP_FUNCTION(swishe_parsed_words);
66 PHP_FUNCTION(swishe_removed_stopwords);
67 PHP_FUNCTION(swishe_seek_result);
68 PHP_FUNCTION(swishe_next_result);
69 PHP_FUNCTION(swishe_property);
70 PHP_FUNCTION(swishe_result_index_value);
71 PHP_FUNCTION(swishe);
72 PHP_FUNCTION(swishe_search);
73 PHP_FUNCTION(swishe_results);
74
75 /*
76 ZEND_BEGIN_MODULE_GLOBALS(swishe)
77 ZEND_END_MODULE_GLOBALS(swishe)
78 */
79
80 /* In every utility function you add that needs to use variables
81    in php_swishe_globals, call TSRM_FETCH(); after declaring other
82    variables used by that function, or better yet, pass in TSRMG_CC
83    after the last function argument and declare your utility function
84    with TSRMG_DC after the last declared argument.  Always refer to
85    the globals in your function as SWISHE_G(variable).  You are
86    encouraged to rename these macros something shorter, see
87    examples in any other php module directory.
88 */
89
90 #ifdef ZTS
91 #define SWISHE_G(v) TSRMG(swishe_globals_id, zend_swishe_globals *, v)
92 #else
93 #define SWISHE_G(v) (swishe_globals.v)
94 #endif
95
96 #endif  /* PHP_SWISHE_H */
97
98
99 /*
100  * Local variables:
101  * tab-width: 4
102  * c-basic-offset: 4
103  * indent-tabs-mode: t
104  * End:
105  */
106
Note: See TracBrowser for help on using the browser.