X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fzoom.h;h=14247a3fd4067ccbac2f5f5daf4b8fa5f5a37441;hb=f3700fe68a59e969d9ef1f98e1748e10f4a80471;hp=e577d35add303b7bc9e5d58c5a8e012540884941;hpb=bd3fc10785d649f854929dfab90d8a002d55572c;p=yaz-moved-to-github.git diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index e577d35..14247a3 100644 --- a/include/yaz/zoom.h +++ b/include/yaz/zoom.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data. + * Copyright (C) 1995-2010 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -74,6 +74,9 @@ ZOOM_API(void) ZOOM_connection_connect(ZOOM_connection c, const char *host, int portnum); +ZOOM_API(void) +ZOOM_connection_close(ZOOM_connection c); + /* destroy connection (close connection also) */ ZOOM_API(void) ZOOM_connection_destroy(ZOOM_connection c); @@ -251,11 +254,11 @@ ZOOM_connection_scan1(ZOOM_connection c, ZOOM_query startterm); ZOOM_API(const char *) ZOOM_scanset_term(ZOOM_scanset scan, size_t pos, - int *occ, int *len); + size_t *occ, size_t *len); ZOOM_API(const char *) ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos, - int *occ, int *len); + size_t *occ, size_t *len); ZOOM_API(size_t) ZOOM_scanset_size(ZOOM_scanset scan); @@ -413,6 +416,20 @@ ZOOM_API(int) ZOOM_connection_process(ZOOM_connection c); +/** \brief executes non-blocking tasks for connection + \param c connection + \retval 0 no task was executed + \retval 1 task was executed (but probably not completed) + + This function, unlike, ZOOM_connection_process, does not try to + return any events (and remove them). But events may be generated + from it. These are saved and may later be retrieved with + ZOOM_connection_process and ZOOM_connection_last_event . +*/ +ZOOM_API(int) +ZOOM_connection_exec_task(ZOOM_connection c); + + /** \brief get socket fd for ZOOM connection \param c connection \retval -1 no socket assigned for connection @@ -474,7 +491,6 @@ ZOOM_API(int) ZOOM_connection_fire_event_socket(ZOOM_connection c, int mask); - /** \brief peek at next event \param c connection \returns ZOOM_EVENT_NONE (for no events in queue), ZOOM_EVENT_CONNECT, ..