| Revision 237 (by dpavlin, 2004/03/08 17:43:12) |
initial import of openisis 0.9.0 vendor drop
|
/*
openisis - an open implementation of the CDS/ISIS database
Version 0.8.x (patchlevel see file Version)
Copyright (C) 2001-2003 by Erik Grziwotz, erik@openisis.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
see README for more information
EOH */
#ifndef LDSP_H
#define LDSP_H
/*
$Id: ldsp.h,v 1.4 2003/06/15 15:57:43 mawag Exp $
openisis internal request dispatcher interface.
*/
/** server side method for transformation of record fields to utf-8 encoding.
@param enc 0-terminated encoding of src; if 0, free src after usage
@param src source string
@param slen length of src
@param dstbuf optional output buffer
@param dlen length of dstbuf
@param invert if != 0, convert src from utf-8 to enc
@return utf-8 representation of src, 0 on error, returned pointer
must be freed if it not equals dstbuf or src
*/
typedef const char* OpenIsisEnc2Utf8Func (const char *enc,
const char *src, int slen, char *dstbuf, int dlen, int invert);
/** pointer to transformation function provided by external environment.
transformation is disabled if environment defines no or null
transformation function.
*/
extern OpenIsisEnc2Utf8Func *openIsisEnc2Utf8;
/** server side method for command evaluation.
@param cmd command record
@param res address of optional result record
@return error code
*/
typedef int OpenIsisEvalFunc (OpenIsisRec *cmd, OpenIsisRec **res);
/** pointer to evaluation function provided by external environment.
command evaluation is disabled if environment defines no or null
evaluation function.
*/
extern OpenIsisEvalFunc *openIsisEval;
/** callback for delivering response record.
*/
typedef int LdspDlvCb (OpenIsisRec **rsp, void *cld);
/** server side request processing.
* @param rsp optional address where to store response
*/
extern int ldspProcess (
OpenIsisRec *rqs, OpenIsisRec **rsp, LdspDlvCb *cb, void *cld);
#endif /* LDSP_H */