#[cfg(target_os = "macos")]
use crate::base::{SecKeychainAttributeList, SecKeychainItemRef};
#[cfg(target_os = "macos")]
use core_foundation_sys::base::CFTypeID;
use core_foundation_sys::base::{CFTypeRef, OSStatus};
use core_foundation_sys::dictionary::CFDictionaryRef;
#[cfg(target_os = "macos")]
use std::os::raw::c_void;
extern "C" {
#[cfg(target_os = "macos")]
pub fn SecKeychainItemGetTypeID() -> CFTypeID;
pub fn SecItemAdd(attributes: CFDictionaryRef, result: *mut CFTypeRef) -> OSStatus;
pub fn SecItemCopyMatching(query: CFDictionaryRef, result: *mut CFTypeRef) -> OSStatus;
pub fn SecItemUpdate(query: CFDictionaryRef, attributesToUpdate: CFDictionaryRef) -> OSStatus;
pub fn SecItemDelete(query: CFDictionaryRef) -> OSStatus;
#[cfg(target_os = "macos")]
pub fn SecKeychainItemModifyAttributesAndData(
itemRef: SecKeychainItemRef,
attrList: *const SecKeychainAttributeList,
length: u32,
data: *const c_void,
) -> OSStatus;
#[cfg(target_os = "macos")]
pub fn SecKeychainItemFreeContent(
attrList: *mut SecKeychainAttributeList,
data: *mut c_void,
) -> OSStatus;
#[cfg(target_os = "macos")]
pub fn SecKeychainItemDelete(itemRef: SecKeychainItemRef) -> OSStatus;
}