for w32 port
[oweals/gnunet.git] / src / include / gnunet_network_lib.h
index 19fd234ee78d61941c272140b4065a62828c58d5..73303689a168dd5a8c2184ad12c0107dce4d0d24 100644 (file)
@@ -271,6 +271,19 @@ void GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
                                const struct GNUNET_NETWORK_Handle *desc);
 
 
+#ifdef __MINGW32__
+/* TODO: maybe #ifdef WINDOWS? -ndurner */
+/**
+ * Add a W32 file handle to the fd set
+ * @param fds fd set
+ * @param h the file handle to add
+ */
+void
+GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct GNUNET_NETWORK_FDSet *fds,
+                                                  HANDLE h);
+#endif
+
+
 /**
  * Check whether a socket is part of the fd set
  * @param fds fd set
@@ -323,6 +336,19 @@ void GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
 void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to,
                                      int nfd);
 
+
+/**
+ * Test native fd in a set
+ *
+ * @param to set to test, NULL for empty set
+ * @param nfd native FD to test, -1 for none
+ * @return GNUNET_YES if to contains nfd
+ */
+int 
+GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to,
+                                 int nfd);
+
+
 /**
  * Add a file handle to the fd set
  * @param fds fd set