#ifndef YAZ_ZCLIENT_H
#define YAZ_ZCLIENT_H
/*#include "../include/yaz/z-core.h"*/


/* the new yaz_zclient made for use with Greenstone. Based on client.c 
 * (version 2.1.4) and the old yaz_zclient (version 1.6 for greenstone)
 * Note: from end Oct 2016, moved to yaz version 2.1.56.
 */
void z_initialize(void);

/* creates a connection, given a host and port, and database name */
int z_cmd_open(char *host_and_port, char *base);

/* returns number of records found */
int z_cmd_dosearch(char *search);

/* returns an array of strings containing record titles. The first element
   is an int, saying how many titles follow (can be zero). NULL on error. */
char **z_getrecordTitles(int start,int count);

/* returns a string containing the whole marc record */
char *z_getfullRecord(int record);

/* close the connection */
int z_cmd_close(const char *arg);

/* returns a string containing name, ID, etc, or NULL if not connected */
char *z_get_initResponse(); 

/* gets a generic response from the server */
int z_getnextAPDU ();
#endif 
