#[repr(C)]pub struct ODNodeRef { /* private fields */ }
CFOpenDirectory
only.Expand description
Opaque reference for the ODNode object
See also Apple’s documentation
Implementations§
Source§impl ODNodeRef
impl ODNodeRef
Sourcepub unsafe fn with_node_type(
allocator: Option<&CFAllocator>,
session: Option<&ODSessionRef>,
node_type: ODNodeType,
error: *mut *mut CFError,
) -> Option<CFRetained<ODNodeRef>>
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn with_node_type( allocator: Option<&CFAllocator>, session: Option<&ODSessionRef>, node_type: ODNodeType, error: *mut *mut CFError, ) -> Option<CFRetained<ODNodeRef>>
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Creates an ODNodeRef based on a specific node type
Creates an ODNodeRef based on a specific node type
Parameter allocator
: a memory allocator to use for this object
Parameter session
: an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
Parameter nodeType
: an ODNodeType of the node to open
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for details upon failure.
Sourcepub unsafe fn with_name(
allocator: Option<&CFAllocator>,
session: Option<&ODSessionRef>,
node_name: Option<&CFString>,
error: *mut *mut CFError,
) -> Option<CFRetained<ODNodeRef>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn with_name( allocator: Option<&CFAllocator>, session: Option<&ODSessionRef>, node_name: Option<&CFString>, error: *mut *mut CFError, ) -> Option<CFRetained<ODNodeRef>>
CFODNode
and objc2-core-foundation
only.Creates an ODNodeRef based on a partciular node name
Creates an ODNodeRef based on a particular node name
Parameter allocator
: a memory allocator to use for this object
Parameter session
: an ODSessionRef, either kODSessionDefault or a valid ODSessionRef can be passed
Parameter nodeName
: a CFStringRef of the name of the node to open
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid ODNodeRef if successful, otherwise returns NULL. outError can be checked for specific error
Sourcepub unsafe fn new_copy(
allocator: Option<&CFAllocator>,
node: Option<&ODNodeRef>,
error: *mut *mut CFError,
) -> Option<CFRetained<ODNodeRef>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn new_copy( allocator: Option<&CFAllocator>, node: Option<&ODNodeRef>, error: *mut *mut CFError, ) -> Option<CFRetained<ODNodeRef>>
CFODNode
and objc2-core-foundation
only.Creates a copy, including any remote credentials used for Proxy and/or Node authentication
Creates a copy of the object including all credentials used for the original. Can be used for future references to the same node setup.
Parameter allocator
: a memory allocator to use for this object
Parameter node
: an ODNodeRef to make a copy of
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid ODNodeRef if successful, otherwise returns NULL, with outError set to a CFErrorRef
Sourcepub unsafe fn subnode_names(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn subnode_names( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFArray>>
CFODNode
and objc2-core-foundation
only.Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes
Returns a CFArray of subnode names for this node, which may contain sub-nodes or search policy nodes. Commonly used with Search policy nodes.
Parameter node
: an ODNodeRef to use
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFArrayRef with the list of nodes, otherwise NULL, with outError set to a CFErrorRef
Sourcepub unsafe fn unreachable_subnode_names(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn unreachable_subnode_names( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFArray>>
CFODNode
and objc2-core-foundation
only.Will return names of subnodes that are not currently reachable.
Will return names of subnodes that are not currently reachable. Commonly used with Search policy nodes to determine if any nodes are currently unreachable, but may also return other subnodes if the Open Directory plugin supports.
Parameter node
: an ODNodeRef to use
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFArrayRef with the list of unreachable nodes or NULL if no bad nodes
Sourcepub unsafe fn name(self: &ODNodeRef) -> Option<CFRetained<CFString>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn name(self: &ODNodeRef) -> Option<CFRetained<CFString>>
CFODNode
and objc2-core-foundation
only.Returns the node name of the node that was opened
Returns the node name of the node that was opened
Parameter node
: an ODNodeRef to use
Returns: a CFStringRef of the node name that is current or NULL if no open node
Sourcepub unsafe fn details(
self: &ODNodeRef,
keys: Option<&CFArray>,
error: *mut *mut CFError,
) -> Option<CFRetained<CFDictionary>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn details( self: &ODNodeRef, keys: Option<&CFArray>, error: *mut *mut CFError, ) -> Option<CFRetained<CFDictionary>>
CFODNode
and objc2-core-foundation
only.Returns a dictionary with details about the node in dictionary form
Returns a dictionary with details about the node in dictionary form.
Parameter node
: an ODNodeRef to use
Parameter keys
: a CFArrayRef listing the keys the user wants returned, such as
kODAttributeTypeStreet
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFDictionaryRef containing the requested key and values in form of a CFArray
Sourcepub unsafe fn supported_record_types(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn supported_record_types( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFArray>>
CFODNode
and objc2-core-foundation
only.Returns a CFArrayRef of the record types supported by this node.
Returns a CFArrayRef of the record types supported by this node. If node does not support the check then all possible types will be returned.
Parameter node
: an ODNodeRef to use
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid CFArrayRef of CFStrings listing the supported Record types on this node.
Sourcepub unsafe fn supported_attributes(
self: &ODNodeRef,
record_type: Option<&ODRecordType>,
error: *mut *mut CFError,
) -> Option<CFRetained<CFArray>>
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn supported_attributes( self: &ODNodeRef, record_type: Option<&ODRecordType>, error: *mut *mut CFError, ) -> Option<CFRetained<CFArray>>
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Will return a list of attribute types supported for that attribute if possible
Will return a list of attribute types supported for that attribute if possible. If no specific types are available, then all possible values will be returned instead.
Parameter node
: an ODNodeRef to use
Parameter recordType
: a ODRecordTypeRef with the type of record to check attribute types. If NULL is passed it will
return all possible attributes that are available.
Parameter error
: an optional CFErrorRef reference for error details
Returns: a valid CFArrayRef of CFStrings listing the attributes supported for the requested record type
Sourcepub unsafe fn set_credentials(
self: &ODNodeRef,
record_type: Option<&ODRecordType>,
record_name: Option<&CFString>,
password: Option<&CFString>,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn set_credentials( self: &ODNodeRef, record_type: Option<&ODRecordType>, record_name: Option<&CFString>, password: Option<&CFString>, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Sets the credentials for interaction with the ODNode
Sets the credentials for interaction with the ODNode. Record references, etc. will use these credentials to query or change data. Setting the credentials on a node referenced by other OD object types will change the credentials for all for all references.
Parameter node
: an ODNodeRef to use
Parameter recordType
: a ODRecordTypeRef of the Record Type to use, if NULL is passed, defaults to a
kODRecordTypeUsers
Parameter recordName
: a CFString of the username to be used for this node authentication
Parameter password
: a CFString of the password to be used for this node authentication
Parameter error
: an optional CFErrorRef reference for error details
Returns: returns true on success, otherwise outError can be checked for details. If the authentication failed, the previous credentials are used.
Sourcepub unsafe fn set_credentials_extended(
self: &ODNodeRef,
record_type: Option<&ODRecordType>,
auth_type: Option<&ODAuthenticationType>,
auth_items: Option<&CFArray>,
out_auth_items: *mut *const CFArray,
out_context: *mut *const ODContextRef,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn set_credentials_extended( self: &ODNodeRef, record_type: Option<&ODRecordType>, auth_type: Option<&ODAuthenticationType>, auth_items: Option<&CFArray>, out_auth_items: *mut *const CFArray, out_context: *mut *const ODContextRef, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Allows use of other Open Directory types of authentications to set the credentials for an ODNode
Allows the caller to use other types of authentications that are available in Open Directory, that may require response-request loops, etc. Not all OD plugins will support this call, look for kODErrorCredentialsMethodNotSupported in outError.
Parameter node
: an ODNodeRef to use
Parameter recordType
: a ODRecordType of the type of record to do the authentication with
Parameter authType
: a ODAuthenticationType of the type of authentication to be used (e.g., kDSStdAuthNTLMv2)
Parameter authItems
: a CFArray of CFData or CFString items that will be sent in order to the auth process
Parameter outAuthItems
: will be assigned to a pointer of a CFArray of CFData items if there are returned values
Parameter outContext
: will return a pointer to a context if caller supplies a container, and the call requires a
context. If a non-NULL value is returned, then more calls must be made with the Context to continue
the authorization.
Parameter error
: an optional CFErrorRef reference for error details
Returns: a bool will be returned with the result of the operation and outAuthItems set with response items and outContext set for any needed continuation.
Sourcepub unsafe fn set_credentials_using_kerberos_cache(
self: &ODNodeRef,
cache_name: Option<&CFString>,
error: *mut *mut CFError,
) -> bool
👎DeprecatedAvailable on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn set_credentials_using_kerberos_cache( self: &ODNodeRef, cache_name: Option<&CFString>, error: *mut *mut CFError, ) -> bool
CFODNode
and objc2-core-foundation
only.Unsupported function.
Unsupported function.
Sourcepub unsafe fn create_record(
self: &ODNodeRef,
record_type: Option<&ODRecordType>,
record_name: Option<&CFString>,
attribute_dict: Option<&CFDictionary>,
error: *mut *mut CFError,
) -> Option<CFRetained<ODRecordRef>>
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn create_record( self: &ODNodeRef, record_type: Option<&ODRecordType>, record_name: Option<&CFString>, attribute_dict: Option<&CFDictionary>, error: *mut *mut CFError, ) -> Option<CFRetained<ODRecordRef>>
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Takes a record and all of the provided attributes and creates the record in the node
Takes all the provided attributes and type to create an entire record. The function will assign a UUID to the record automatically. This UUID can be overwritten by the client by passing with the other attributes.
Parameter node
: an ODNodeRef to use
Parameter recordType
: a ODRecordTypeRef of the type of record (e.g., kODRecordTypeUsers, etc.)
Parameter recordName
: a CFStringRef of the name of record
Parameter attributeDict
: a CFDictionaryRef of key-value pairs for attribute values. The key is a CFStringRef of the
attribute name or ODRecordType constant such as kODAttributeTypeRecordName. The value must be a CFArrayRef of
CFDataRef or CFStringRef. If additional kODAttributeTypeRecordName are to be set, they can be passed in the
inAttributes list. This parameter is optional and can be NULL. If any of the attributes passed
fail to be set, the record will be deleted and outError will be set with the appropriate error.
Parameter error
: an optional CFErrorRef reference for error details
Returns: returns a valid ODRecordRef. If the add fails, outError can be checked for details.
Sourcepub unsafe fn copy_record(
self: &ODNodeRef,
record_type: Option<&ODRecordType>,
record_name: Option<&CFString>,
attributes: Option<&CFType>,
error: *mut *mut CFError,
) -> Option<CFRetained<ODRecordRef>>
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn copy_record( self: &ODNodeRef, record_type: Option<&ODRecordType>, record_name: Option<&CFString>, attributes: Option<&CFType>, error: *mut *mut CFError, ) -> Option<CFRetained<ODRecordRef>>
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.Simple API to open / create a references to a particular record on a Node
Simple API to open / create a references to a particular record on a Node
Parameter node
: an ODNodeRef to use
Parameter recordType
: a ODRecordTypeRef of the record type to copy
Parameter recordName
: a CFStringRef of the record name to copy
Parameter attributes
: (optional) a CFArrayRef (or single ODAttributeType) of the attributes to copy from the directory. Can be NULL when no
attributes are needed. Any standard types can be passed, for example
kODAttributeTypeAllAttributes will fetch all attributes up front. If just standard attributes are needed, then
kODAttributeTypeStandardOnly can be passed.
Parameter error
: an optional CFErrorRef reference for error details
Returns: returns a valid ODRecordRef. If the record copy fails, the error can be checked for details. If the record is not found, will return NULL with a NULL error.
Sourcepub unsafe fn custom_call(
self: &ODNodeRef,
custom_code: CFIndex,
data: Option<&CFData>,
error: *mut *mut CFError,
) -> Option<CFRetained<CFData>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn custom_call( self: &ODNodeRef, custom_code: CFIndex, data: Option<&CFData>, error: *mut *mut CFError, ) -> Option<CFRetained<CFData>>
CFODNode
and objc2-core-foundation
only.Sends a custom call to a node.
This will send a custom call to a node along with the specified data, returning the result.
Parameter node
: an ODNodeRef to use
Parameter customCode
: the custom code to be sent to the node
Parameter data
: a data blob expected by the custom code, can be NULL of no send data
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFDataRef with the result of the operation, otherwise outError can be checked for specific details
Sourcepub unsafe fn custom_function(
self: &ODNodeRef,
function: Option<&CFString>,
payload: Option<&CFType>,
error: *mut *mut CFError,
) -> Option<CFRetained<CFType>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn custom_function( self: &ODNodeRef, function: Option<&CFString>, payload: Option<&CFType>, error: *mut *mut CFError, ) -> Option<CFRetained<CFType>>
CFODNode
and objc2-core-foundation
only.Sends a named custom function call to a node.
Sends a named custom function call to a node. Custom functions are defined by the modules that implement them and the parameter is defined by the module.
Parameter node
: An ODNodeRef to use
Parameter function
: A CFStringRef that specifies the name of the function
Parameter payload
: A CFType appropriate for the custom function. The type is dictated by the module implementing the function.
Parameter error
: An optional CFErrorRef reference to receive any errors from the custom function call.
Returns: Returns a CFType appropriate for the function.
Sourcepub unsafe fn policies(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFDictionary>>
👎Deprecated: use ODNodeCopyAccountPoliciesAvailable on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn policies( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFDictionary>>
CFODNode
and objc2-core-foundation
only.This will copy any policies configured for the node.
This will copy any policies configured for the node.
Parameter node
: an ODNodeRef to use
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFDictionaryRef containing all currently set policies
Sourcepub unsafe fn supported_policies(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFDictionary>>
👎DeprecatedAvailable on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn supported_policies( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFDictionary>>
CFODNode
and objc2-core-foundation
only.This will return a dictionary of supported policies.
This will return a dictionary of supported policies, if appropriate, the value will be the maximum value allowed for the policy in question. For example, if password history is available, it will state how much history is supported.
Parameter node
: an ODNodeRef to use
Parameter error
: an optional CFErrorRef reference for error details
Returns: a CFDictionaryRef containing all currently supported policies. The values will be the maximum value allowed.
Sourcepub unsafe fn set_policies(
self: &ODNodeRef,
policies: Option<&CFDictionary>,
error: *mut *mut CFError,
) -> bool
👎Deprecated: use ODNodeSetAccountPoliciesAvailable on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn set_policies( self: &ODNodeRef, policies: Option<&CFDictionary>, error: *mut *mut CFError, ) -> bool
CFODNode
and objc2-core-foundation
only.This will set the policy for the node.
This will set the policy for the node. Policies are evaluated in combination with record-level policies.
Parameter node
: an ODNodeRef to use
Parameter policies
: a CFDictionary of policies to be set
Parameter error
: an optional CFErrorRef reference for error details
Returns: a bool which signifies if the policy set succeeded, otherwise error is set.
Sourcepub unsafe fn set_policy(
self: &ODNodeRef,
policy_type: Option<&ODPolicyType>,
value: Option<&CFType>,
error: *mut *mut CFError,
) -> bool
👎Deprecated: use ODNodeAddAccountPolicyAvailable on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn set_policy( self: &ODNodeRef, policy_type: Option<&ODPolicyType>, value: Option<&CFType>, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.This will set a specific policy setting for the node.
This will set a specific policy setting for the node.
Parameter node
: an ODNodeRef to use
Parameter policy
: a valid ODPolicyType
Parameter value
: a CFTypeRef to be set (should be of appropriate type for the policy)
Parameter error
: an optional CFErrorRef reference for error details
Returns: a bool which signifies if the policy set succeeded, otherwise error is set.
Sourcepub unsafe fn remove_policy(
self: &ODNodeRef,
policy_type: Option<&ODPolicyType>,
error: *mut *mut CFError,
) -> bool
👎Deprecated: use ODNodeRemoveAccountPolicyAvailable on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn remove_policy( self: &ODNodeRef, policy_type: Option<&ODPolicyType>, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.This will remove a specific policy setting from the node.
This will remove a specific policy setting from the node.
Parameter node
: an ODNodeRef to use
Parameter policy
: a valid ODPolicyType
Parameter error
: an optional CFErrorRef reference for error details
Returns: a bool which signifies if the policy removal succeeded, otherwise error is set.
Sourcepub unsafe fn add_account_policy(
self: &ODNodeRef,
policy: Option<&CFDictionary>,
category: Option<&ODPolicyCategoryType>,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn add_account_policy( self: &ODNodeRef, policy: Option<&CFDictionary>, category: Option<&ODPolicyCategoryType>, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.This will add an account policy to the node for the specified category.
This will add an account policy to the node for the specified category. The specified policy will be applied to all users in the specified node when policies are evaluated.
Parameter node
: an ODNodeRef to use.
Parameter policy
: a dictionary containing the specific policy to be added.
The dictionary may contain the following keys:
kODPolicyKeyIdentifier a required key identifying the policy.
kODPolicyKeyParameters an optional key containing a dictionary of
parameters that can be used for informational purposes or in
the policy format string.
kODPolicyKeyContent a required key specifying the policy,
from which a predicate will be created for evaluating
the policy.
Parameter category
: a valid ODPolicyCategoryType to which the specified policy will be added.
Parameter error
: an optional CFErrorRef reference for error details.
Returns: a bool which signifies if the policy addition succeeded, otherwise error is set.
Sourcepub unsafe fn remove_account_policy(
self: &ODNodeRef,
policy: Option<&CFDictionary>,
category: Option<&ODPolicyCategoryType>,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.
pub unsafe fn remove_account_policy( self: &ODNodeRef, policy: Option<&CFDictionary>, category: Option<&ODPolicyCategoryType>, error: *mut *mut CFError, ) -> bool
CFODNode
and CFOpenDirectoryConstants
and objc2-core-foundation
only.This will remove an account policy from the node for the specified category.
This will remove an account policy from the node for the specified category.
Parameter node
: an ODNodeRef to use.
Parameter policy
: a dictionary containing the specific policy to be
removed, with the same format as described in ODNodeAddAccountPolicy.
Parameter category
: a valid ODPolicyCategoryType from which the specified policy will be removed.
Parameter error
: an optional CFErrorRef reference for error details.
Returns: a bool which signifies if the policy removal succeeded, otherwise error is set.
Sourcepub unsafe fn set_account_policies(
self: &ODNodeRef,
policies: Option<&CFDictionary>,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn set_account_policies( self: &ODNodeRef, policies: Option<&CFDictionary>, error: *mut *mut CFError, ) -> bool
CFODNode
and objc2-core-foundation
only.This will set the policies for the node.
This will set the policies for the node, replacing any existing policies.
Parameter node
: an ODNodeRef to use.
Parameter policies
: a dictionary containing all of the policies to be set
for the node. The dictionary may contain the following keys:
kODPolicyCategoryAuthentication an optional key with a value
of an array of policy dictionaries that specify when
authentications should be allowed.
kODPolicyCategoryPasswordContent an optional key with a
value of an array of policy dictionaries the specify the
required content of passwords.
kODPolicyCategoryPasswordChange an optional key with a value
of an array of policy dictionaries that specify when
passwords are required to be changed.
Parameter error
: an optional CFErrorRef reference for error details.
Returns: a bool which signifies if the policy set succeeded, otherwise error is set.
Sourcepub unsafe fn account_policies(
self: &ODNodeRef,
error: *mut *mut CFError,
) -> Option<CFRetained<CFDictionary>>
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn account_policies( self: &ODNodeRef, error: *mut *mut CFError, ) -> Option<CFRetained<CFDictionary>>
CFODNode
and objc2-core-foundation
only.This will copy any policies configured for the node.
This will copy any policies configured for the node.
Parameter node
: an ODNodeRef to use.
Parameter error
: an optional CFErrorRef reference for error details.
Returns: a CFDictionaryRef containing all currently set policies. The format of the dictionary is the same as described in ODNodeSetAccountPolicies().
Sourcepub unsafe fn password_content_check(
self: &ODNodeRef,
password: Option<&CFString>,
record_name: Option<&CFString>,
error: *mut *mut CFError,
) -> bool
Available on crate features CFODNode
and objc2-core-foundation
only.
pub unsafe fn password_content_check( self: &ODNodeRef, password: Option<&CFString>, record_name: Option<&CFString>, error: *mut *mut CFError, ) -> bool
CFODNode
and objc2-core-foundation
only.Validates a password against the node’s password content policies.
Validates a password against the node’s password content policies. The node’s password content policies will be evaluated to determine if the password is acceptable. May be used prior to creating the record.
This check is only definitive at the time it was requested. The policy or the environment could change before the password change is actually requested. Errors from the password change request should be consulted.
Parameter node
: an ODNodeRef to use.
Parameter password
: the password to be evaluated against the content policies.
Parameter recordName
: the name of the record.
Parameter error
: an optional CFErrorRef reference for error details.
Returns: a bool which signifies if the password passes all content policies, otherwise error is set.
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 ConcreteType for ODNodeRef
Available on crate features CFODNode
and objc2-core-foundation
only.
impl ConcreteType for ODNodeRef
CFODNode
and objc2-core-foundation
only.Source§impl RefEncode for ODNodeRef
impl RefEncode for ODNodeRef
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for ODNodeRef
impl Type for ODNodeRef
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