+++ /dev/null
-/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
-
-Zebra is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-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 this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-*/
-void idzebra_api_init(void);
-
-char **api_errors(void);
-
-int api_check_error(void);
-
-void api_clear_error(void);
-
-
-IDZebraService idzebra_start (RES_LIST);
-
-IDZEBRA_RES idzebra_stop(IDZebraService srv);
-
-
-IDZebraSession idzebra_open (IDZebraService srv, RES_LIST);
-
-IDZEBRA_RES idzebra_close(IDZebraSession sess);
-
-IDZEBRA_RES idzebra_samplefunc(IDZebraSession sess, RES_LIST);
-
-
-/*
--------------------------------------------------------------------------------
- Utility functions for argument handling
--------------------------------------------------------------------------------
-*/
-
-#if __STDC_VERSION__ < 199901L
-# if __GNUC__ >= 2
-# define __func__ __FUNCTION__
-# else
-# define __func__ "<unknown>"
-# endif
-#endif
-
-#define API_SET_CONTEXT api_error_context = __func__
-
-void args_parse_res (Res r,
- const char **valid_args,
- Res skip,
- char **args);
-
-void args_use (IDZebraSession sess,
- Res r,
- Res rr,
- int mandatory,
- const char **args);
-
-#define ARG_MODE_OPTIONAL 0
-#define ARG_MODE_MANDATORY 1
-#define ARG_MODE_FORCE 2
-
-#define RES_OPEN(var,def,over) \
- var = res_open(def, over); \
- res_set(var,"__context__", __func__ ); \
-
-#define ARGS_INIT \
- Res local = 0; \
- Res func_res = 0; \
- Res temp_res = 0; \
-
-#define ARGS_PARSE(...) \
- { \
- const char *vargs[] = { __VA_ARGS__ , 0 }; \
- RES_OPEN(func_res, 0, 0); \
- RES_OPEN(local, 0, 0); \
- args_parse_res(func_res, vargs, local, res_args); \
- } \
-
-#define ARGS_APPLY \
- temp_res = res_add_over(sess->res, func_res); \
-
-#define ARGS_PROCESS(mode, ...) \
- { \
- const char *vargs[] = { __VA_ARGS__ , 0 }; \
- args_use(sess, local, func_res, mode, vargs); \
- } \
-
-#define ARGS_REVOKE \
- { \
- const char **used; \
- res_remove_over(temp_res); \
- used = res_get_array(local, "_used"); \
- args_use(sess, sess->res, 0, ARG_MODE_FORCE, used); \
- free_array(used); \
- } \
-
-#define ARGS_DONE \
- if (func_res) res_close(func_res); \
- if (temp_res) res_close_over(temp_res); \
- if (local) res_close(local); \
-
-#endif /* API_SWIG_H */
-/*
- * Local variables:
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-