#[repr(C)]pub struct SCDynamicStore { /* private fields */ }
SCDynamicStore
only.Expand description
This is the handle to an open a dynamic store session with the system configuration daemon.
See also Apple’s documentation
Implementations§
Source§impl SCDynamicStore
impl SCDynamicStore
Sourcepub unsafe fn new(
allocator: Option<&CFAllocator>,
name: &CFString,
callout: SCDynamicStoreCallBack,
context: *mut SCDynamicStoreContext,
) -> Option<CFRetained<SCDynamicStore>>
pub unsafe fn new( allocator: Option<&CFAllocator>, name: &CFString, callout: SCDynamicStoreCallBack, context: *mut SCDynamicStoreContext, ) -> Option<CFRetained<SCDynamicStore>>
Creates a new session used to interact with the dynamic store maintained by the System Configuration server.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for the local dynamic store object.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter name
: A string that describes the name of the calling
process or plug-in of the caller.
Parameter callout
: The function to be called when a watched value
in the dynamic store is changed.
A NULL value can be specified if no callouts are
desired.
Parameter context
: The SCDynamicStoreContext associated with the callout.
Returns: Returns a reference to the new SCDynamicStore session. You must release the returned value.
Sourcepub unsafe fn with_options(
allocator: Option<&CFAllocator>,
name: &CFString,
store_options: Option<&CFDictionary>,
callout: SCDynamicStoreCallBack,
context: *mut SCDynamicStoreContext,
) -> Option<CFRetained<SCDynamicStore>>
pub unsafe fn with_options( allocator: Option<&CFAllocator>, name: &CFString, store_options: Option<&CFDictionary>, callout: SCDynamicStoreCallBack, context: *mut SCDynamicStoreContext, ) -> Option<CFRetained<SCDynamicStore>>
Creates a new session used to interact with the dynamic store maintained by the System Configuration server.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for the local dynamic store object.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter name
: A string that describes the name of the calling
process or plug-in of the caller.
Parameter storeOptions
: A CFDictionary containing options for the
dynamic store session (such as whether all keys added or set
into the dynamic store should be per-session keys).
Currently available options include:
key | value |
---|---|
kSCDynamicStoreUseSessionKeys | CFBooleanRef |
A NULL value can be specified if no options are desired.
Parameter callout
: The function to be called when a watched value
in the dynamic store is changed.
A NULL value can be specified if no callouts are
desired.
Parameter context
: The SCDynamicStoreContext associated with the callout.
Returns: Returns a reference to the new SCDynamicStore session. You must release the returned value.
Source§impl SCDynamicStore
impl SCDynamicStore
Sourcepub fn new_run_loop_source(
allocator: Option<&CFAllocator>,
store: &SCDynamicStore,
order: CFIndex,
) -> Option<CFRetained<CFRunLoopSource>>
pub fn new_run_loop_source( allocator: Option<&CFAllocator>, store: &SCDynamicStore, order: CFIndex, ) -> Option<CFRetained<CFRunLoopSource>>
Creates a CFRunLoopSource object that can be added to the application’s run loop. All dynamic store notifications are delivered using this run loop source.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this run loop source.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter store
: A reference to the dynamic store session.
Parameter order
: On platforms which support it, for source versions
which support it, this parameter determines the order in
which the sources which are ready to be processed are
handled. A lower order number causes processing before
higher order number sources. It is inadvisable to depend
on the order number for any architectural or design aspect
of code. In the absence of any reason to do otherwise,
zero should be used.
Returns: A reference to the new CFRunLoopSource. You must release the returned value.
Sourcepub unsafe fn set_dispatch_queue(
self: &SCDynamicStore,
queue: Option<&DispatchQueue>,
) -> bool
Available on crate feature dispatch2
only.
pub unsafe fn set_dispatch_queue( self: &SCDynamicStore, queue: Option<&DispatchQueue>, ) -> bool
dispatch2
only.Initiates notifications for the Notification Keys in store to the callback contained in store.
Parameter store
: A reference to the dynamic store session.
Parameter queue
: The dispatch queue to run the callback function on.
Pass NULL to disable notifications, and release the queue.
Returns: Returns TRUE on success, FALSE on failure.
Sourcepub fn key_list(
store: Option<&SCDynamicStore>,
pattern: &CFString,
) -> Option<CFRetained<CFArray>>
pub fn key_list( store: Option<&SCDynamicStore>, pattern: &CFString, ) -> Option<CFRetained<CFArray>>
Returns an array of CFString keys representing the current dynamic store entries that match a specified pattern.
Parameter store
: The dynamic store session.
Parameter pattern
: A regex(3) regular expression pattern
used to match the dynamic store keys.
Returns: Returns the list of matching keys; NULL if an error was encountered. You must release the returned value.
Sourcepub unsafe fn add_value(
store: Option<&SCDynamicStore>,
key: &CFString,
value: &CFPropertyList,
) -> bool
pub unsafe fn add_value( store: Option<&SCDynamicStore>, key: &CFString, value: &CFPropertyList, ) -> bool
Adds the key-value pair to the dynamic store if no such key already exists.
Parameter store
: The dynamic store session.
Parameter key
: The key of the value to add to the dynamic store.
Parameter value
: The value to add to the dynamic store.
Returns: Returns TRUE if the key was added; FALSE if the key was already present in the dynamic store or if an error was encountered.
Sourcepub unsafe fn add_temporary_value(
self: &SCDynamicStore,
key: &CFString,
value: &CFPropertyList,
) -> bool
pub unsafe fn add_temporary_value( self: &SCDynamicStore, key: &CFString, value: &CFPropertyList, ) -> bool
Temporarily adds the key-value pair to the dynamic store if no such key already exists. Unless the key is updated by another session, the key-value pair will be removed automatically when the session is closed.
Parameter store
: The dynamic store session.
Parameter key
: The key of the value to add to the dynamic store.
Parameter value
: The value to add to the dynamic store.
Returns: Returns TRUE if the key was added; FALSE if the key was already present in the dynamic store or if an error was encountered.
Sourcepub fn value(
store: Option<&SCDynamicStore>,
key: &CFString,
) -> Option<CFRetained<CFPropertyList>>
pub fn value( store: Option<&SCDynamicStore>, key: &CFString, ) -> Option<CFRetained<CFPropertyList>>
Gets the value of the specified key from the dynamic store.
Parameter store
: The dynamic store session.
Parameter key
: The key associated with the value you want to get.
Returns: Returns the value from the dynamic store that is associated with the given key; NULL if no value was located or an error was encountered. You must release the returned value.
Sourcepub unsafe fn multiple(
store: Option<&SCDynamicStore>,
keys: Option<&CFArray>,
patterns: Option<&CFArray>,
) -> Option<CFRetained<CFDictionary>>
pub unsafe fn multiple( store: Option<&SCDynamicStore>, keys: Option<&CFArray>, patterns: Option<&CFArray>, ) -> Option<CFRetained<CFDictionary>>
Gets the values of multiple keys in the dynamic store.
Parameter store
: The dynamic store session.
Parameter keys
: The keys associated with the values you want to get; NULL if no specific
keys are requested.
Parameter patterns
: An array of regex(3) pattern strings used to match the keys; NULL
if no key patterns are requested.
Returns: Returns a dictionary containing the key-value pairs of specific keys and the key-value pairs of keys that matched the specified patterns; NULL if an error was encountered. You must release the returned value.
Sourcepub unsafe fn set_value(
store: Option<&SCDynamicStore>,
key: &CFString,
value: &CFPropertyList,
) -> bool
pub unsafe fn set_value( store: Option<&SCDynamicStore>, key: &CFString, value: &CFPropertyList, ) -> bool
Adds or replaces a value in the dynamic store for the specified key.
Parameter store
: The dynamic store session.
Parameter key
: The key you want to set.
Parameter value
: The value to add to or replace in the dynamic store.
Returns: Returns TRUE if the key was updated; FALSE if an error was encountered.
Sourcepub unsafe fn set_multiple(
store: Option<&SCDynamicStore>,
keys_to_set: Option<&CFDictionary>,
keys_to_remove: Option<&CFArray>,
keys_to_notify: Option<&CFArray>,
) -> bool
pub unsafe fn set_multiple( store: Option<&SCDynamicStore>, keys_to_set: Option<&CFDictionary>, keys_to_remove: Option<&CFArray>, keys_to_notify: Option<&CFArray>, ) -> bool
Updates multiple values in the dynamic store.
Parameter store
: The dynamic store session.
Parameter keysToSet
: A dictionary of key-value pairs you want to set into the dynamic store.
Parameter keysToRemove
: An array of keys you want to remove from the dynamic store.
Parameter keysToNotify
: An array of keys to flag as changed (without changing their values).
Returns: Returns TRUE if the dynamic store updates were successful; FALSE if an error was encountered.
Sourcepub fn remove_value(store: Option<&SCDynamicStore>, key: &CFString) -> bool
pub fn remove_value(store: Option<&SCDynamicStore>, key: &CFString) -> bool
Removes the value of the specified key from the dynamic store.
Parameter store
: The dynamic store session.
Parameter key
: The key of the value you want to remove.
Returns: Returns TRUE if the key was removed; FALSE if no value was located or an error was encountered.
Sourcepub fn notify_value(store: Option<&SCDynamicStore>, key: &CFString) -> bool
pub fn notify_value(store: Option<&SCDynamicStore>, key: &CFString) -> bool
Triggers a notification to be delivered for the specified key in the dynamic store.
Parameter store
: The dynamic store session.
Parameter key
: The key that should be flagged as changed. Any dynamic store sessions
that are monitoring this key will received a notification. Note that the
key’s value is not updated.
Returns: Returns TRUE if the notification was processed; FALSE if an error was encountered.
Sourcepub unsafe fn set_notification_keys(
self: &SCDynamicStore,
keys: Option<&CFArray>,
patterns: Option<&CFArray>,
) -> bool
pub unsafe fn set_notification_keys( self: &SCDynamicStore, keys: Option<&CFArray>, patterns: Option<&CFArray>, ) -> bool
Specifies a set of specific keys and key patterns that should be monitored for changes.
Parameter store
: The dynamic store session being watched.
Parameter keys
: An array of keys to be monitored; NULL if no specific keys
are to be monitored.
Parameter patterns
: An array of regex(3) pattern strings used to match keys to be monitored;
NULL if no key patterns are to be monitored.
Returns: Returns TRUE if the set of notification keys and patterns was successfully updated; FALSE if an error was encountered.
Sourcepub fn notified_keys(self: &SCDynamicStore) -> Option<CFRetained<CFArray>>
pub fn notified_keys(self: &SCDynamicStore) -> Option<CFRetained<CFArray>>
Returns an array of CFString keys representing the dynamic store entries that have changed since this function was last called. If possible, your application should use the notification functions instead of polling for the list of changed keys returned by this function.
Parameter store
: The dynamic store session.
Returns: Returns the list of changed keys; NULL if an error was encountered. You must release the returned value.
Source§impl SCDynamicStore
impl SCDynamicStore
Sourcepub fn dhcp_info(
store: Option<&SCDynamicStore>,
service_id: Option<&CFString>,
) -> Option<CFRetained<CFDictionary>>
Available on crate feature SCDynamicStoreCopyDHCPInfo
only.
pub fn dhcp_info( store: Option<&SCDynamicStore>, service_id: Option<&CFString>, ) -> Option<CFRetained<CFDictionary>>
SCDynamicStoreCopyDHCPInfo
only.Copies the DHCP information for the requested serviceID, or the primary service if serviceID == NULL.
Parameter store
: An SCDynamicStoreRef representing the dynamic store session
that should be used for communication with the server.
If NULL, a temporary session will be used.
Parameter serviceID
: A CFStringRef containing the requested service.
If NULL, returns information for the primary service.
Returns: Returns a dictionary containing DHCP information if successful; NULL otherwise. Use the DHCPInfoGetOption function to retrieve individual options from the returned dictionary.
A non-NULL return value must be released using CFRelease().
Source§impl SCDynamicStore
impl SCDynamicStore
Sourcepub unsafe fn computer_name(
store: Option<&SCDynamicStore>,
name_encoding: *mut CFStringEncoding,
) -> Option<CFRetained<CFString>>
Available on crate feature SCDynamicStoreCopySpecific
only.
pub unsafe fn computer_name( store: Option<&SCDynamicStore>, name_encoding: *mut CFStringEncoding, ) -> Option<CFRetained<CFString>>
SCDynamicStoreCopySpecific
only.Gets the current computer name.
Parameter store
: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Parameter nameEncoding
: A pointer to memory that, if non-NULL, will be
filled with the encoding associated with the computer or
host name.
Returns: Returns the current computer name; NULL if the name has not been set or if an error was encountered. You must release the returned value.
Sourcepub unsafe fn console_user(
store: Option<&SCDynamicStore>,
uid: *mut uid_t,
gid: *mut gid_t,
) -> Option<CFRetained<CFString>>
Available on crate features SCDynamicStoreCopySpecific
and libc
only.
pub unsafe fn console_user( store: Option<&SCDynamicStore>, uid: *mut uid_t, gid: *mut gid_t, ) -> Option<CFRetained<CFString>>
SCDynamicStoreCopySpecific
and libc
only.Gets the name, user ID, and group ID of the currently logged-in user.
Note: this function only provides information about the primary console. It does not provide any details about console sessions that have fast user switched out or about other consoles.
Parameter store
: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Parameter uid
: A pointer to memory that will be filled with the user ID
of the current console user. If NULL, this value will not
be returned.
Parameter gid
: A pointer to memory that will be filled with the group ID
of the current console user. If NULL, this value will not be
returned.
Returns: Returns the user currently logged into the system; NULL if no user is logged in or if an error was encountered. You must release the returned value.
Sourcepub fn local_host_name(
store: Option<&SCDynamicStore>,
) -> Option<CFRetained<CFString>>
Available on crate feature SCDynamicStoreCopySpecific
only.
pub fn local_host_name( store: Option<&SCDynamicStore>, ) -> Option<CFRetained<CFString>>
SCDynamicStoreCopySpecific
only.Gets the current local host name.
Parameter store
: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Returns: Returns the current local host name; NULL if the name has not been set or if an error was encountered. You must release the returned value.
Sourcepub fn location(store: Option<&SCDynamicStore>) -> Option<CFRetained<CFString>>
Available on crate feature SCDynamicStoreCopySpecific
only.
pub fn location(store: Option<&SCDynamicStore>) -> Option<CFRetained<CFString>>
SCDynamicStoreCopySpecific
only.Gets the current location identifier.
Parameter store
: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Returns: Returns a string representing the current location identifier; NULL if no location identifier has been defined or if an error was encountered. You must release the returned value.
Sourcepub fn proxies(
store: Option<&SCDynamicStore>,
) -> Option<CFRetained<CFDictionary>>
Available on crate feature SCDynamicStoreCopySpecific
only.
pub fn proxies( store: Option<&SCDynamicStore>, ) -> Option<CFRetained<CFDictionary>>
SCDynamicStoreCopySpecific
only.Gets the current internet proxy settings. The returned proxy settings dictionary includes:
key | type | description |
---|---|---|
kSCPropNetProxiesExceptionsList | CFArray[CFString] | Host name patterns which should bypass the proxy |
kSCPropNetProxiesHTTPEnable | CFNumber (0 or 1) | Enables/disables the use of an HTTP proxy |
kSCPropNetProxiesHTTPProxy | CFString | The proxy host |
kSCPropNetProxiesHTTPPort | CFNumber | The proxy port number |
kSCPropNetProxiesHTTPSEnable | CFNumber (0 or 1) | Enables/disables the use of an HTTPS proxy |
kSCPropNetProxiesHTTPSProxy | CFString | The proxy host |
kSCPropNetProxiesHTTPSPort | CFNumber | The proxy port number |
kSCPropNetProxiesFTPEnable | CFNumber (0 or 1) | Enables/disables the use of an FTP proxy |
kSCPropNetProxiesFTPProxy | CFString | The proxy host |
kSCPropNetProxiesFTPPort | CFNumber | The proxy port number |
kSCPropNetProxiesFTPPassive | CFNumber (0 or 1) | Enable passive mode operation for use behind connection filter-ing firewalls. |
Other key-value pairs are defined in the SCSchemaDefinitions.h header file.
Parameter store
: An SCDynamicStoreRef representing the dynamic store
session that should be used for communication with the server.
If NULL, a temporary session will be used.
Returns: Returns a dictionary containing key-value pairs that represent the current internet proxy settings; NULL if no proxy settings have been defined or if an error was encountered. You must release the returned value.
Source§impl SCDynamicStore
impl SCDynamicStore
Sourcepub fn key_create_network_global_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
entity: &CFString,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_network_global_entity( allocator: Option<&CFAllocator>, domain: &CFString, entity: &CFString, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a dynamic store key that can be used to access a specific global (as opposed to a per-service or per-interface) network configuration entity.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter domain
: A string specifying the desired domain, such as the
requested configuration (kSCDynamicStoreDomainSetup) or the
actual state (kSCDynamicStoreDomainState).
Parameter entity
: A string containing the specific global entity, such
as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Returns: Returns a string containing the formatted key.
Sourcepub fn key_create_network_interface(
allocator: Option<&CFAllocator>,
domain: &CFString,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_network_interface( allocator: Option<&CFAllocator>, domain: &CFString, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a dynamic store key that can be used to access the network interface configuration information stored in the dynamic store.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter domain
: A string specifying the desired domain, such as the
requested configuration (kSCDynamicStoreDomainSetup) or the
actual state (kSCDynamicStoreDomainState).
Returns: Returns a string containing the formatted key.
Sourcepub fn key_create_network_interface_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
ifname: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_network_interface_entity( allocator: Option<&CFAllocator>, domain: &CFString, ifname: &CFString, entity: Option<&CFString>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a dynamic store key that can be used to access the per-interface network configuration information stored in the dynamic store.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter domain
: A string specifying the desired domain, such as the
requested configuration (kSCDynamicStoreDomainSetup) or the
actual state (kSCDynamicStoreDomainState).
Parameter ifname
: A string containing the interface name or a regular
expression pattern.
Parameter entity
: A string containing the specific global entity, such
as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Returns: Returns a string containing the formatted key.
Sourcepub fn key_create_network_service_entity(
allocator: Option<&CFAllocator>,
domain: &CFString,
service_id: &CFString,
entity: Option<&CFString>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_network_service_entity( allocator: Option<&CFAllocator>, domain: &CFString, service_id: &CFString, entity: Option<&CFString>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a dynamic store key that can be used to access the per-service network configuration information stored in the dynamic store.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Parameter domain
: A string specifying the desired domain, such as the
requested configuration (kSCDynamicStoreDomainSetup) or the
actual state (kSCDynamicStoreDomainState).
Parameter serviceID
: A string containing the service ID or a regular
expression pattern.
Parameter entity
: A string containing the specific global entity, such
as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
Returns: Returns a string containing the formatted key.
Sourcepub fn key_create_computer_name(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_computer_name( allocator: Option<&CFAllocator>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a key that can be used in conjuntion with SCDynamicStoreSetNotificationKeys function to receive notifications when the current computer name changes.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Returns: Returns a notification string for the current computer or host name.
Sourcepub fn key_create_console_user(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_console_user( allocator: Option<&CFAllocator>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a key that can be used in conjunction with SCDynamicStoreSetNotificationKeys function to receive notifications when the current console user changes.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Returns: Returns a notification string for the current console user.
Sourcepub fn key_create_host_names(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_host_names( allocator: Option<&CFAllocator>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the HostNames entity changes. The HostNames entity includes the local host name.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Returns: Returns a notification string for the HostNames entity.
Sourcepub fn key_create_location(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_location( allocator: Option<&CFAllocator>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the location identifier changes.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Returns: Returns a notification string for the current location identifier.
Sourcepub fn key_create_proxies(
allocator: Option<&CFAllocator>,
) -> CFRetained<CFString>
Available on crate feature SCDynamicStoreKey
only.
pub fn key_create_proxies( allocator: Option<&CFAllocator>, ) -> CFRetained<CFString>
SCDynamicStoreKey
only.Creates a key that can be used in conjunction with the SCDynamicStoreSetNotificationKeys function to receive notifications when the current network proxy settings (such as HTTP or FTP) are changed.
Parameter allocator
: The CFAllocator that should be used to allocate
memory for this key.
This parameter may be NULL in which case the current
default CFAllocator is used. If this reference is not
a valid CFAllocator, the behavior is undefined.
Returns: Returns a notification string for the current proxy settings.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for SCDynamicStore
impl AsRef<AnyObject> for SCDynamicStore
Source§impl AsRef<CFType> for SCDynamicStore
impl AsRef<CFType> for SCDynamicStore
Source§impl AsRef<SCDynamicStore> for SCDynamicStore
impl AsRef<SCDynamicStore> for SCDynamicStore
Source§impl Borrow<AnyObject> for SCDynamicStore
impl Borrow<AnyObject> for SCDynamicStore
Source§impl Borrow<CFType> for SCDynamicStore
impl Borrow<CFType> for SCDynamicStore
Source§impl ConcreteType for SCDynamicStore
impl ConcreteType for SCDynamicStore
Source§impl Debug for SCDynamicStore
impl Debug for SCDynamicStore
Source§impl Deref for SCDynamicStore
impl Deref for SCDynamicStore
Source§impl Hash for SCDynamicStore
impl Hash for SCDynamicStore
Source§impl Message for SCDynamicStore
impl Message for SCDynamicStore
Source§impl PartialEq for SCDynamicStore
impl PartialEq for SCDynamicStore
Source§impl RefEncode for SCDynamicStore
impl RefEncode for SCDynamicStore
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SCDynamicStore
impl Type for SCDynamicStore
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation
crate. Read more