]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink++.h
appname added, which is used by mdns as part of the service type
[meshlink] / src / meshlink++.h
index 2729130cc64872f686a1fe6a4ce9bda60a564c9f..2bc1f8b0d59cdf02b905efa8dbee58cc777a313b 100644 (file)
@@ -185,8 +185,8 @@ namespace meshlink {
                 *  @return             The number of known nodes, or -1 in case of an error.
                 *                      This can be larger than nmemb, in which case not all nodes were stored in the nodes array.
                 */
-               ssize_t get_all_nodes(node **nodes, size_t nmemb) {
-                       return meshlink_get_all_nodes(this, (meshlink_node_t **)nodes, nmemb);
+               node **get_all_nodes(node **nodes, size_t *nmemb) {
+                       return (node **)meshlink_get_all_nodes(this, (meshlink_node_t **)nodes, nmemb);
                }
 
                /// Sign data using the local node's MeshLink key.
@@ -373,11 +373,12 @@ namespace meshlink {
         *
         *  @param confbase The directory in which MeshLink will store its configuration files.
         *  @param name     The name which this instance of the application will use in the mesh.
+        *  @param appname  The application name which will be used in the mesh.
         *
         *  @return         This function will return a pointer to a meshlink::mesh if MeshLink has succesfully set up its configuration files, NULL otherwise.
         */
-       static mesh *open(const char *confbase, const char *name) {
-               return (mesh *)meshlink_open(confbase, name);
+       static mesh *open(const char *confbase, const char *name, const char* appname) {
+               return (mesh *)meshlink_open(confbase, name, appname);
        }
 
        /// Close the MeshLink handle.