objc2_security/generated/
SecTrustedApplication.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2_core_foundation::*;
6
7use crate::*;
8
9#[cfg(feature = "SecBase")]
10unsafe impl ConcreteType for SecTrustedApplication {
11 #[doc(alias = "SecTrustedApplicationGetTypeID")]
15 #[inline]
16 fn type_id() -> CFTypeID {
17 extern "C-unwind" {
18 fn SecTrustedApplicationGetTypeID() -> CFTypeID;
19 }
20 unsafe { SecTrustedApplicationGetTypeID() }
21 }
22}
23
24#[cfg(feature = "SecBase")]
25impl SecTrustedApplication {
26 #[doc(alias = "SecTrustedApplicationCreateFromPath")]
41 #[cfg(feature = "SecBase")]
42 #[deprecated = "SecKeychain is deprecated"]
43 #[inline]
44 pub unsafe fn create_from_path(
45 path: *const c_char,
46 app: NonNull<*mut SecTrustedApplication>,
47 ) -> OSStatus {
48 extern "C-unwind" {
49 fn SecTrustedApplicationCreateFromPath(
50 path: *const c_char,
51 app: NonNull<*mut SecTrustedApplication>,
52 ) -> OSStatus;
53 }
54 unsafe { SecTrustedApplicationCreateFromPath(path, app) }
55 }
56
57 #[doc(alias = "SecTrustedApplicationCopyData")]
69 #[cfg(feature = "SecBase")]
70 #[deprecated = "SecKeychain is deprecated"]
71 #[inline]
72 pub unsafe fn copy_data(&self, data: NonNull<*const CFData>) -> OSStatus {
73 extern "C-unwind" {
74 fn SecTrustedApplicationCopyData(
75 app_ref: &SecTrustedApplication,
76 data: NonNull<*const CFData>,
77 ) -> OSStatus;
78 }
79 unsafe { SecTrustedApplicationCopyData(self, data) }
80 }
81
82 #[doc(alias = "SecTrustedApplicationSetData")]
90 #[cfg(feature = "SecBase")]
91 #[deprecated = "SecKeychain is deprecated"]
92 #[inline]
93 pub unsafe fn set_data(&self, data: &CFData) -> OSStatus {
94 extern "C-unwind" {
95 fn SecTrustedApplicationSetData(
96 app_ref: &SecTrustedApplication,
97 data: &CFData,
98 ) -> OSStatus;
99 }
100 unsafe { SecTrustedApplicationSetData(self, data) }
101 }
102}
103
104extern "C-unwind" {
105 #[cfg(feature = "SecBase")]
106 #[deprecated = "renamed to `SecTrustedApplication::create_from_path`"]
107 pub fn SecTrustedApplicationCreateFromPath(
108 path: *const c_char,
109 app: NonNull<*mut SecTrustedApplication>,
110 ) -> OSStatus;
111}
112
113extern "C-unwind" {
114 #[cfg(feature = "SecBase")]
115 #[deprecated = "renamed to `SecTrustedApplication::copy_data`"]
116 pub fn SecTrustedApplicationCopyData(
117 app_ref: &SecTrustedApplication,
118 data: NonNull<*const CFData>,
119 ) -> OSStatus;
120}
121
122extern "C-unwind" {
123 #[cfg(feature = "SecBase")]
124 #[deprecated = "renamed to `SecTrustedApplication::set_data`"]
125 pub fn SecTrustedApplicationSetData(app_ref: &SecTrustedApplication, data: &CFData)
126 -> OSStatus;
127}