objc2_system_configuration/generated/DHCPClientPreferences.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2_core_foundation::*;
5
6use crate::*;
7
8/// Updates the DHCP client preferences to include the
9/// given list of options for the given application ID.
10///
11/// Parameter `applicationID`: The application's preference ID, for example:
12/// "com.apple.SystemPreferences".
13///
14/// Parameter `options`: An array of 8-bit values containing the
15/// DHCP option codes (see RFC 2132) for this application ID.
16/// A NULL value will clear the list of options for this
17/// application ID.
18///
19/// Parameter `count`: The number of elements in the options parameter.
20///
21/// Returns: Returns TRUE if the operation succeeded, FALSE otherwise.
22#[inline]
23pub unsafe extern "C-unwind" fn DHCPClientPreferencesSetApplicationOptions(
24 application_id: &CFString,
25 options: *const u8,
26 count: CFIndex,
27) -> bool {
28 extern "C-unwind" {
29 fn DHCPClientPreferencesSetApplicationOptions(
30 application_id: &CFString,
31 options: *const u8,
32 count: CFIndex,
33 ) -> Boolean;
34 }
35 let ret = unsafe { DHCPClientPreferencesSetApplicationOptions(application_id, options, count) };
36 ret != 0
37}
38
39extern "C-unwind" {
40 /// Copies the requested DHCP options for the
41 /// given application ID.
42 ///
43 /// Parameter `applicationID`: The application's preference ID, for example
44 /// "com.apple.SystemPreferences".
45 ///
46 /// Parameter `count`: The number of elements in the returned array.
47 ///
48 /// Returns: Returns the list of options for the given application ID, or
49 /// NULL if no options are defined or an error occurred.
50 ///
51 /// When you are finished, use free() to release a non-NULL return value.
52 pub fn DHCPClientPreferencesCopyApplicationOptions(
53 application_id: &CFString,
54 count: NonNull<CFIndex>,
55 ) -> *mut u8;
56}