summaryrefslogtreecommitdiff
path: root/ext/mnogosearch/php_mnogo.h
blob: 45e9e01a957ae28f83ca1d9c312a176b026fe432 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* $Source$ */
/* $Id$ */

/* 
   +----------------------------------------------------------------------+
   | 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.               |
   +----------------------------------------------------------------------+
   | Authors: 								                                            |
   |  Initial version     by  Alex Barkov <bar@izhcom.ru>                 |
   |                      and Ramil Kalimullin <ram@izhcom.ru>            |
   |  Further development by  Sergey Kartashoff <gluke@mail.ru>           |
   +----------------------------------------------------------------------+
 */

#ifndef _PHP_MNOGO_H
#define _PHP_MNOGO_H

#if HAVE_MNOGOSEARCH

#include <udm_config.h>
#include <udmsearch.h>

#if UDM_VERSION_ID >= 30203
#include <udm_crc32.h>
#include <udm_store.h>
#endif

extern zend_module_entry mnogosearch_module_entry;
#define mnogosearch_module_ptr &mnogosearch_module_entry

#ifdef PHP_WIN32                            
#define PHP_MNOGO_API __declspec(dllexport)  
#else                                       
#define PHP_MNOGO_API                        
#endif                                      

#ifdef ZTS       
#include "TSRM.h"
#endif           

/* mnoGoSearch functions */
DLEXPORT PHP_MINIT_FUNCTION(mnogosearch);
DLEXPORT PHP_RINIT_FUNCTION(mnogosearch);
DLEXPORT PHP_MSHUTDOWN_FUNCTION(mnogosearch);
DLEXPORT PHP_MINFO_FUNCTION(mnogosearch);

DLEXPORT PHP_FUNCTION(udm_api_version);
#if UDM_VERSION_ID >= 30200
DLEXPORT PHP_FUNCTION(udm_check_charset);
#if UDM_VERSION_ID == 30203
DLEXPORT PHP_FUNCTION(udm_open_stored);
DLEXPORT PHP_FUNCTION(udm_check_stored);
DLEXPORT PHP_FUNCTION(udm_close_stored);
#endif
#if UDM_VERSION_ID >= 30203
DLEXPORT PHP_FUNCTION(udm_crc32);
#endif
#if UDM_VERSION_ID >= 30204
DLEXPORT PHP_FUNCTION(udm_parse_query_string);
DLEXPORT PHP_FUNCTION(udm_make_excerpt);
DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex);
DLEXPORT PHP_FUNCTION(udm_get_res_field_ex);
#endif
#endif

DLEXPORT PHP_FUNCTION(udm_alloc_agent);
DLEXPORT PHP_FUNCTION(udm_set_agent_param);

DLEXPORT PHP_FUNCTION(udm_load_ispell_data);
DLEXPORT PHP_FUNCTION(udm_free_ispell_data);

DLEXPORT PHP_FUNCTION(udm_add_search_limit);
DLEXPORT PHP_FUNCTION(udm_clear_search_limits);

DLEXPORT PHP_FUNCTION(udm_error);
DLEXPORT PHP_FUNCTION(udm_errno);

DLEXPORT PHP_FUNCTION(udm_find);
DLEXPORT PHP_FUNCTION(udm_get_res_field);
DLEXPORT PHP_FUNCTION(udm_get_res_param);

DLEXPORT PHP_FUNCTION(udm_cat_list);
DLEXPORT PHP_FUNCTION(udm_cat_path);

DLEXPORT PHP_FUNCTION(udm_free_res);
DLEXPORT PHP_FUNCTION(udm_free_agent);

#if UDM_VERSION_ID > 30110
DLEXPORT PHP_FUNCTION(udm_get_doc_count);
#endif

#else

#define mnogosearch_module_ptr NULL

#endif

#define phpext_mnogosearch_ptr mnogosearch_module_ptr

#endif /* _PHP_MNOGO_H */