1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// An interface for apps and daemons to interact with FSKit.
///
/// FSClient is the primary management interface for FSKit.
/// Use this class to discover FSKit extensions installed on the system, including your own.
///
/// > Important: Don't subclass `FSClient`.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/fskit/fsclient?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct FSClient;
);
extern_conformance!(
unsafe impl NSObjectProtocol for FSClient {}
);
impl FSClient {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// The shared instance of the FSKit client class.
#[unsafe(method(sharedInstance))]
#[unsafe(method_family = none)]
pub unsafe fn sharedInstance() -> Retained<FSClient>;
#[cfg(all(feature = "FSModuleIdentity", feature = "block2"))]
/// Asynchronously retrieves an list of installed file system modules.
///
/// In Swift, you can either call this method and pass a completion handler closure, or get the value of the `installedExtensions` property with the `async` keyword.
///
/// - Parameter completionHandler: A block or closure that executes when FSKit finishes its fetch process. If the fetch succeeds, the first parameter contains an array of ``FSModuleIdentity`` instances that identify installed modules. If the fetch fails, the second parameter contains an error detailing the failure.
#[unsafe(method(fetchInstalledExtensionsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchInstalledExtensionsWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<
dyn Fn(*mut NSArray<FSModuleIdentity>, *mut NSError),
>,
);
);
}
/// Methods declared on superclass `NSObject`.
impl FSClient {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}