Implemented ZOOM_connection_peek_event.
[yaz-moved-to-github.git] / src / zoom-c.c
index 1888229..3563ab5 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2007, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: zoom-c.c,v 1.105 2007-01-09 13:56:48 adam Exp $
+ * $Id: zoom-c.c,v 1.106 2007-01-10 13:25:46 adam Exp $
  */
 /**
  * \file zoom-c.c
@@ -103,6 +103,12 @@ static ZOOM_Event ZOOM_connection_get_event(ZOOM_connection c)
     return event;
 }
 
+int ZOOM_connection_peek_event(ZOOM_connection c)
+{
+    ZOOM_Event event = c->m_queue_front;
+
+    return event ? event->kind : ZOOM_EVENT_NONE;
+}
 
 static void set_dset_error(ZOOM_connection c, int error,
                            const char *dset,
@@ -1244,7 +1250,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c)
                     odr_prepend(c->odr_out, "ZOOM-C",
                                 ireq->implementationName));
     
-    version = odr_strdup(c->odr_out, "$Revision: 1.105 $");
+    version = odr_strdup(c->odr_out, "$Revision: 1.106 $");
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     ireq->implementationVersion =