]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink++.h
Fix a compiler warning.
[meshlink] / src / meshlink++.h
index 51bc5e37a91792523bfeb8633b951886f7e4a1b9..baf08ae1ef15405aa238360bfbb69a1f2309c5a0 100644 (file)
@@ -705,6 +705,19 @@ public:
                meshlink_set_scheduling_granularity(handle, granularity);
        }
 
+       /// Sets the storage policy used by MeshLink
+       /** This sets the policy MeshLink uses when it has new information about nodes.
+        *  By default, all udpates will be stored to disk (unless an ephemeral instance has been opened).
+        *  Setting the policy to MESHLINK_STORAGE_KEYS_ONLY, only updates that contain new keys for nodes
+        *  are stored, as well as blacklist/whitelist settings.
+        *  By setting the policy to MESHLINK_STORAGE_DISABLED, no updates will be stored.
+        *
+        *  @param policy  The storage policy to use.
+        */
+       void set_storage_policy(meshlink_storage_policy_t policy) {
+               meshlink_set_storage_policy(handle, policy);
+       }
+
        /// Invite another node into the mesh.
        /** This function generates an invitation that can be used by another node to join the same mesh as the local node.
         *  The generated invitation is a string containing a URL.
@@ -1137,6 +1150,15 @@ public:
                meshlink_enable_discovery(handle, enable);
        }
 
+       /// Inform MeshLink that the local network configuration might have changed
+       /** This is intended to be used when there is no way for MeshLink to get notifications of local network changes.
+        *  It forces MeshLink to scan all network interfaces for changes in up/down status and new/removed addresses,
+        *  and will immediately check if all connections to other nodes are still alive.
+        */
+       void hint_network_change() {
+               meshlink_hint_network_change(handle);
+       }
+
        /// Set device class timeouts
        /** This sets the ping interval and timeout for a given device class.
         *