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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! 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!(
/// A base type that identifies containers and volumes.
///
/// An ``FSEntityIdentifier`` is a UUID to identify a container or volume, optionally with eight bytes of qualifying (differentiating) data.
/// You use the qualifiers in cases in which a file server can receive multiple connections from the same client, which differ by user credentials.
/// In this case, the identifier for each client is the server's base UUID, and a unique qualifier that differs by client.
///
/// > Important: Don't subclass this class.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/fskit/fsentityidentifier?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct FSEntityIdentifier;
);
extern_conformance!(
unsafe impl NSCoding for FSEntityIdentifier {}
);
extern_conformance!(
unsafe impl NSCopying for FSEntityIdentifier {}
);
unsafe impl CopyingHelper for FSEntityIdentifier {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for FSEntityIdentifier {}
);
extern_conformance!(
unsafe impl NSSecureCoding for FSEntityIdentifier {}
);
impl FSEntityIdentifier {
extern_methods!(
/// Creates an entity identifier with a random UUID.
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Creates an entity identifier with the given UUID.
///
/// - Parameter uuid: The UUID to use for this identifier.
#[unsafe(method(initWithUUID:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithUUID(this: Allocated<Self>, uuid: &NSUUID) -> Retained<Self>;
/// Creates an entity identifier with the given UUID and qualifier data as a 64-bit unsigned integer.
/// - Parameters:
/// - uuid: The UUID to use for this identifier.
/// - qualifier: The data to distinguish entities that otherwise share the same UUID.
#[unsafe(method(initWithUUID:qualifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithUUID_qualifier(
this: Allocated<Self>,
uuid: &NSUUID,
qualifier: u64,
) -> Retained<Self>;
/// Creates an entity identifier with the given UUID and qualifier data.
///
/// - Parameters:
/// - uuid: The UUID to use for this identifier.
/// - qualifierData: The data to distinguish entities that otherwise share the same UUID.
#[unsafe(method(initWithUUID:data:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithUUID_data(
this: Allocated<Self>,
uuid: &NSUUID,
qualifier_data: &NSData,
) -> Retained<Self>;
/// A UUID to uniquely identify this entity.
#[unsafe(method(uuid))]
#[unsafe(method_family = none)]
pub unsafe fn uuid(&self) -> Retained<NSUUID>;
/// Setter for [`uuid`][Self::uuid].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setUuid:))]
#[unsafe(method_family = none)]
pub unsafe fn setUuid(&self, uuid: &NSUUID);
/// An optional piece of data to distinguish entities that otherwise share the same UUID.
#[unsafe(method(qualifier))]
#[unsafe(method_family = none)]
pub unsafe fn qualifier(&self) -> Option<Retained<NSData>>;
/// Setter for [`qualifier`][Self::qualifier].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setQualifier:))]
#[unsafe(method_family = none)]
pub unsafe fn setQualifier(&self, qualifier: Option<&NSData>);
);
}
/// Methods declared on superclass `NSObject`.
impl FSEntityIdentifier {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}