]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
Remove unused/duplicate autoconf/automake definitions.
[meshlink] / src / meshlink.h
index e307128f157327b34cbd008f2a130755c50fee16..be929c29e23680657e14a095064ac652b22ff66e 100644 (file)
@@ -1,6 +1,9 @@
+#ifndef MESHLINK_H
+#define MESHLINK_H
+
 /*
     meshlink.h -- MeshLink API
-    Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
+    Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -17,9 +20,6 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef MESHLINK_H
-#define MESHLINK_H
-
 #include <stdint.h>
 #include <stdbool.h>
 #include <stddef.h>
@@ -166,7 +166,7 @@ extern const char *meshlink_strerror(meshlink_errno_t err);
  *  @return         A pointer to a meshlink_handle_t which represents this instance of MeshLink, or NULL in case of an error.
  *                  The pointer is valid until meshlink_close() is called.
  */
-extern meshlink_handle_t *meshlink_open(const char *confbase, const char *name, const charappname, dev_class_t devclass);
+extern meshlink_handle_t *meshlink_open(const char *confbase, const char *name, const char *appname, dev_class_t devclass);
 
 /// Start MeshLink.
 /** This function causes MeshLink to open network sockets, make outgoing connections, and
@@ -832,8 +832,18 @@ extern void meshlink_hint_address(meshlink_handle_t *mesh, meshlink_node_t *node
  */
 extern meshlink_edge_t **meshlink_get_all_edges_state(meshlink_handle_t *mesh, meshlink_edge_t **edges, size_t *nmemb);
 
+/// Enable or disable zeroconf discovery of local peers
+
+/** This controls whether zeroconf discovery using the Catta library will be
+ *  enabled to search for peers on the local network. By default, it is enabled.
+ *
+ *  @param mesh    A handle which represents an instance of MeshLink.
+ *  @param enable  Set to true to enable discovery, false to disable.
+ */
+extern void meshlink_enable_discovery(meshlink_handle_t *mesh, bool enable);
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif // MESHLINK_H
+#endif