X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=include%2Fzebraapi.h;h=4ae3541adb5111afd2d58565017c23922f49f642;hb=20278c99b7f9faf69e97608a3fc2ba06815d18fa;hp=65faace109a4453af1b3e6aa22690a60f83a276c;hpb=2a6f64379961f30bfe6376964ce279ab5242da1f;p=idzebra-moved-to-github.git diff --git a/include/zebraapi.h b/include/zebraapi.h index 65faace..4ae3541 100644 --- a/include/zebraapi.h +++ b/include/zebraapi.h @@ -1,4 +1,4 @@ -/* $Id: zebraapi.h,v 1.12 2004-01-22 11:27:21 adam Exp $ +/* $Id: zebraapi.h,v 1.13.2.3 2006-08-14 10:38:56 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -15,9 +15,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ /* Return codes: @@ -29,6 +29,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef ZEBRAAPI_H #define ZEBRAAPI_H +#include #include #include #include @@ -82,8 +83,9 @@ typedef struct zebra_service *ZebraService; /* Start Zebra using file 'configName' (usually zebra.cfg) */ /* There should be exactly one ZebraService */ -YAZ_EXPORT ZebraService zebra_start (const char *configName, - Res def_res, Res over_res); +YAZ_EXPORT ZebraService zebra_start (const char *configName); +YAZ_EXPORT ZebraService zebra_start_res (const char *configName, + Res def_res, Res over_res); /* Close the whole Zebra */ YAZ_EXPORT int zebra_stop (ZebraService zs); @@ -186,37 +188,38 @@ YAZ_EXPORT int zebra_admin_import_segment (ZebraHandle zh, YAZ_EXPORT int zebra_admin_import_end (ZebraHandle zh); -int zebra_admin_exchange_record (ZebraHandle zh, +YAZ_EXPORT int zebra_admin_exchange_record (ZebraHandle zh, const char *rec_buf, size_t rec_len, const char *recid_buf, size_t recid_len, int action); -int zebra_begin_trans (ZebraHandle zh, int rw); -int zebra_end_trans (ZebraHandle zh); -int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat); +YAZ_EXPORT int zebra_begin_trans (ZebraHandle zh, int rw); +YAZ_EXPORT int zebra_end_trans (ZebraHandle zh); +YAZ_EXPORT int zebra_end_transaction (ZebraHandle zh, ZebraTransactionStatus *stat); -int zebra_commit (ZebraHandle zh); -int zebra_clean (ZebraHandle zh); +YAZ_EXPORT int zebra_commit (ZebraHandle zh); +YAZ_EXPORT int zebra_clean (ZebraHandle zh); -int zebra_init (ZebraHandle zh); -int zebra_compact (ZebraHandle zh); -int zebra_repository_update (ZebraHandle zh, const char *path); -int zebra_repository_delete (ZebraHandle zh, const char *path); -int zebra_repository_show (ZebraHandle zh, const char *path); +YAZ_EXPORT int zebra_init (ZebraHandle zh); +YAZ_EXPORT int zebra_compact (ZebraHandle zh); +YAZ_EXPORT int zebra_repository_update (ZebraHandle zh, const char *path); +YAZ_EXPORT int zebra_repository_delete (ZebraHandle zh, const char *path); +YAZ_EXPORT int zebra_repository_show (ZebraHandle zh, const char *path); -int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size); +YAZ_EXPORT int zebra_add_record (ZebraHandle zh, const char *buf, int buf_size); -int zebra_insert_record (ZebraHandle zh, +YAZ_EXPORT int zebra_insert_record (ZebraHandle zh, const char *recordType, int *sysno, const char *match, const char *fname, - const char *buf, int buf_size); -int zebra_update_record (ZebraHandle zh, + const char *buf, int buf_size, + int force_update); +YAZ_EXPORT int zebra_update_record (ZebraHandle zh, const char *recordType, int* sysno, const char *match, const char *fname, const char *buf, int buf_size, int force_update); -int zebra_delete_record (ZebraHandle zh, +YAZ_EXPORT int zebra_delete_record (ZebraHandle zh, const char *recordType, int *sysno, const char *match, const char *fname, const char *buf, int buf_size, @@ -233,7 +236,6 @@ YAZ_EXPORT int zebra_sort (ZebraHandle zh, ODR stream, Z_SortKeySpecList *sort_sequence, int *sort_status); - YAZ_EXPORT int zebra_select_databases (ZebraHandle zh, int num_bases, const char **basenames);