#[repr(C)]pub struct SecTask { /* private fields */ }
SecTask
only.Expand description
CFType used for representing a task
See also Apple’s documentation
Implementations§
Source§impl SecTask
impl SecTask
Sourcepub unsafe fn from_self(
allocator: Option<&CFAllocator>,
) -> Option<CFRetained<SecTask>>
pub unsafe fn from_self( allocator: Option<&CFAllocator>, ) -> Option<CFRetained<SecTask>>
Create a SecTask object for the current task.
Returns: The newly created SecTask object or NULL on error. The caller must CFRelease the returned object. #ifndef LEFT
Sourcepub unsafe fn value_for_entitlement(
self: &SecTask,
entitlement: &CFString,
error: *mut *mut CFError,
) -> Option<CFRetained<CFType>>
pub unsafe fn value_for_entitlement( self: &SecTask, entitlement: &CFString, error: *mut *mut CFError, ) -> Option<CFRetained<CFType>>
Returns the value of a single entitlement for the represented task.
Parameter task
: A previously created SecTask object
Parameter entitlement
: The name of the entitlement to be fetched
Parameter error
: On a NULL return, this may be contain a CFError describing
the problem. This argument may be NULL if the caller is not interested in
detailed errors.
Returns: The value of the specified entitlement for the process or NULL if the entitlement value could not be retrieved. The type of the returned value will depend on the entitlement specified. The caller must release the returned object.
A NULL return may indicate an error, or it may indicate that the entitlement is simply not present. In the latter case, no CFError is returned.
Sourcepub unsafe fn values_for_entitlements(
self: &SecTask,
entitlements: &CFArray,
error: *mut *mut CFError,
) -> Option<CFRetained<CFDictionary>>
pub unsafe fn values_for_entitlements( self: &SecTask, entitlements: &CFArray, error: *mut *mut CFError, ) -> Option<CFRetained<CFDictionary>>
Returns the values of multiple entitlements for the represented task.
Parameter task
: A previously created SecTask object
Parameter entitlements
: An array of entitlement names to be fetched
Parameter error
: On a NULL return, this will contain a CFError describing
the problem. This argument may be NULL if the caller is not interested in
detailed errors. If a requested entitlement is not present for the
returned dictionary, the entitlement is not set on the task. The caller
must CFRelease the returned value
Sourcepub unsafe fn signing_identifier(
self: &SecTask,
error: *mut *mut CFError,
) -> Option<CFRetained<CFString>>
pub unsafe fn signing_identifier( self: &SecTask, error: *mut *mut CFError, ) -> Option<CFRetained<CFString>>
Return the value of the codesigning identifier.
Parameter task
: A previously created SecTask object
Parameter error
: On a NULL return, this will contain a CFError describing
the problem. This argument may be NULL if the caller is not interested in
detailed errors. The caller must CFRelease the returned value
Sourcepub unsafe fn code_sign_status(self: &SecTask) -> u32
pub unsafe fn code_sign_status(self: &SecTask) -> u32
Return the code sign status flags
Parameter task
: A previously created SecTask object
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Available on crate feature SecCustomTransform
only.
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
SecCustomTransform
only.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
Available on crate feature SecCustomTransform
only.
pub fn retain_count(&self) -> usize
SecCustomTransform
only.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 SecTask
impl ConcreteType for SecTask
Source§impl RefEncode for SecTask
impl RefEncode for SecTask
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for SecTask
impl Type for SecTask
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