objc2_core_services/generated/LaunchServices/LSConstants.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3#[cfg(feature = "objc2")]
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// i386 is no longer supported
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsno32bitenvironmenterr?language=objc)
11pub const kLSNo32BitEnvironmentErr: OSStatus = -10386;
12/// malformed internet locator file
13///
14/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsmalformedlocerr?language=objc)
15pub const kLSMalformedLocErr: OSStatus = -10400;
16/// The app cannot be run when inside a Trash folder
17///
18/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsappintrasherr?language=objc)
19pub const kLSAppInTrashErr: OSStatus = -10660;
20/// No compatible executable was found
21///
22/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsexecutableincorrectformat?language=objc)
23pub const kLSExecutableIncorrectFormat: OSStatus = -10661;
24/// An item attribute value could not be found with the specified name
25///
26/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsattributenotfounderr?language=objc)
27pub const kLSAttributeNotFoundErr: OSStatus = -10662;
28/// The attribute is not settable
29///
30/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsattributenotsettableerr?language=objc)
31pub const kLSAttributeNotSettableErr: OSStatus = -10663;
32/// The app is incompatible with the current OS
33///
34/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsincompatibleapplicationversionerr?language=objc)
35pub const kLSIncompatibleApplicationVersionErr: OSStatus = -10664;
36/// PowerPC apps are no longer supported
37///
38/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnorosettaenvironmenterr?language=objc)
39pub const kLSNoRosettaEnvironmentErr: OSStatus = -10665;
40/// Objective-C garbage collection is no longer supported
41///
42/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsgarbagecollectionunsupportederr?language=objc)
43pub const kLSGarbageCollectionUnsupportedErr: OSStatus = -10666;
44/// Unexpected internal error
45///
46/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsunknownerr?language=objc)
47pub const kLSUnknownErr: OSStatus = -10810;
48/// Item needs to be an application, but is not
49///
50/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnotanapplicationerr?language=objc)
51pub const kLSNotAnApplicationErr: OSStatus = -10811;
52/// Not used in 10.2 and later
53///
54/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnotinitializederr?language=objc)
55pub const kLSNotInitializedErr: OSStatus = -10812;
56/// E.g. no kind string
57///
58/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsdataunavailableerr?language=objc)
59pub const kLSDataUnavailableErr: OSStatus = -10813;
60/// E.g. no application claims the file
61///
62/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsapplicationnotfounderr?language=objc)
63pub const kLSApplicationNotFoundErr: OSStatus = -10814;
64/// Don't know anything about the type of the item
65///
66/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsunknowntypeerr?language=objc)
67pub const kLSUnknownTypeErr: OSStatus = -10815;
68/// Not used in 10.3 and later
69///
70/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsdatatooolderr?language=objc)
71pub const kLSDataTooOldErr: OSStatus = -10816;
72/// Not used in 10.4 and later
73///
74/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsdataerr?language=objc)
75pub const kLSDataErr: OSStatus = -10817;
76/// E.g. launching an already launching application
77///
78/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klslaunchinprogresserr?language=objc)
79pub const kLSLaunchInProgressErr: OSStatus = -10818;
80/// Not used in 10.3 and later
81///
82/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnotregisterederr?language=objc)
83pub const kLSNotRegisteredErr: OSStatus = -10819;
84/// One or more documents are of types (and/or one or more URLs are of schemes) not supported by the target application (sandboxed callers only)
85///
86/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsappdoesnotclaimtypeerr?language=objc)
87pub const kLSAppDoesNotClaimTypeErr: OSStatus = -10820;
88/// Not used in 10.2 and later
89///
90/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsappdoesnotsupportschemewarning?language=objc)
91pub const kLSAppDoesNotSupportSchemeWarning: OSStatus = -10821;
92/// The server process (registration and recent items) is not available
93///
94/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsservercommunicationerr?language=objc)
95pub const kLSServerCommunicationErr: OSStatus = -10822;
96/// The extension visibility on this item cannot be changed
97///
98/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klscannotsetinfoerr?language=objc)
99pub const kLSCannotSetInfoErr: OSStatus = -10823;
100/// The item contains no registration info
101///
102/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnoregistrationinfoerr?language=objc)
103pub const kLSNoRegistrationInfoErr: OSStatus = -10824;
104/// The app cannot run on the current OS version
105///
106/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsincompatiblesystemversionerr?language=objc)
107pub const kLSIncompatibleSystemVersionErr: OSStatus = -10825;
108/// User doesn't have permission to launch the app (managed networks)
109///
110/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnolaunchpermissionerr?language=objc)
111pub const kLSNoLaunchPermissionErr: OSStatus = -10826;
112/// The executable is missing
113///
114/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnoexecutableerr?language=objc)
115pub const kLSNoExecutableErr: OSStatus = -10827;
116/// The Classic environment was required but is not available
117///
118/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsnoclassicenvironmenterr?language=objc)
119pub const kLSNoClassicEnvironmentErr: OSStatus = -10828;
120/// The app cannot run simultaneously in two different sessions
121///
122/// See also [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsmultiplesessionsnotsupportederr?language=objc)
123pub const kLSMultipleSessionsNotSupportedErr: OSStatus = -10829;
124
125/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/lsrolesmask?language=objc)
126// NS_OPTIONS
127#[repr(transparent)]
128#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
129pub struct LSRolesMask(pub OptionBits);
130bitflags::bitflags! {
131 impl LSRolesMask: OptionBits {
132/// no claim is made about support for this type/scheme
133 #[doc(alias = "kLSRolesNone")]
134 const None = 0x00000001;
135/// claim to view items of this type
136 #[doc(alias = "kLSRolesViewer")]
137 const Viewer = 0x00000002;
138/// claim to edit items of this type/scheme
139 #[doc(alias = "kLSRolesEditor")]
140 const Editor = 0x00000004;
141/// claim to execute items of this type
142 #[doc(alias = "kLSRolesShell")]
143 const Shell = 0x00000008;
144/// claim to do it all
145 #[doc(alias = "kLSRolesAll")]
146 const All = 0xFFFFFFFF;
147 }
148}
149
150#[cfg(feature = "objc2")]
151unsafe impl Encode for LSRolesMask {
152 const ENCODING: Encoding = OptionBits::ENCODING;
153}
154
155#[cfg(feature = "objc2")]
156unsafe impl RefEncode for LSRolesMask {
157 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
158}
159
160/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsunknowntype?language=objc)
161pub const kLSUnknownType: OSType = 0;
162/// [Apple's documentation](https://developer.apple.com/documentation/coreservices/klsunknowncreator?language=objc)
163pub const kLSUnknownCreator: OSType = 0;