Skip to content

Commit 4c80c17

Browse files
committed
Add SCDynamicStore::remove method
1 parent b396f6d commit 4c80c17

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

system-configuration/src/dynamic_store.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,14 @@ impl SCDynamicStore {
208208
success != 0
209209
}
210210

211+
pub fn remove<S: Into<CFString>>(&self, key: S) -> bool {
212+
let cf_key = key.into();
213+
let success = unsafe {
214+
SCDynamicStoreRemoveValue(self.as_concrete_TypeRef(), cf_key.as_concrete_TypeRef())
215+
};
216+
success != 0
217+
}
218+
211219
/// Specifies a set of keys and key patterns that should be monitored for changes.
212220
pub fn set_notification_keys<T1, T2>(
213221
&self,

0 commit comments

Comments
 (0)