Skip to content

Commit b49a789

Browse files
feat: add a few more
1 parent 5c4101c commit b49a789

File tree

2 files changed

+42
-15
lines changed

2 files changed

+42
-15
lines changed

src/frameworks/CoreServices/include/LaunchServices/LSInfoDeprecated.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ LSGetApplicationForInfo(
117117
FSRef * outAppRef,
118118
CFURLRef * outAppURL);
119119

120-
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
121-
// WARN: Deprecated.
122-
extern CFArrayRef
123-
LSCopyAllHandlersForURLScheme(
124-
CFStringRef inURLScheme);
125-
126120
extern OSStatus
127121
LSCopyApplicationForMIMEType(
128122
CFStringRef inMIMEType,
@@ -202,6 +196,21 @@ LSSetHandlerOptionsForContentType(
202196
CFStringRef inContentType,
203197
LSHandlerOptions inOptions);
204198

199+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
200+
extern CFArrayRef
201+
LSCopyAllHandlersForURLScheme(
202+
CFStringRef inURLScheme);
203+
204+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
205+
extern CFArrayRef
206+
LSCopyAllRoleHandlersForContentType(
207+
CFStringRef inContentType,
208+
LSRolesMask inRole);
209+
210+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
211+
extern CFStringRef
212+
LSCopyDefaultHandlerForURLScheme(
213+
CFStringRef inURLScheme);
205214

206215

207216
#pragma pack(pop)

src/frameworks/CoreServices/src/LaunchServices/LSInfo.m

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@
102102
return retval;
103103
}
104104

105-
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
106-
// WARN: Deprecated.
107-
CFArrayRef LSCopyAllHandlersForURLScheme(CFStringRef inURLScheme)
108-
{
109-
puts("LSCopyAllHandlersForURLScheme STUB");
110-
// NULL is a safe assumption to fall back on in the stub, since it means none were found.
111-
return NULL;
112-
}
113-
114105
CFArrayRef LSCopyApplicationURLsForBundleIdentifier(CFStringRef inBundleIdentifier, CFErrorRef _Nullable *outError)
115106
{
116107
if (!inBundleIdentifier)
@@ -318,3 +309,30 @@ OSStatus LSGetApplicationForURL(CFURLRef inURL, LSRolesMask inRoleMask, FSRef *o
318309
NSString* extension = [(NSURL*) inURL pathExtension];
319310
return LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, (CFStringRef) extension, inRoleMask, outAppRef, outAppURL);
320311
}
312+
313+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
314+
// WARN: Deprecated.
315+
CFArrayRef LSCopyAllHandlersForURLScheme(CFStringRef inURLScheme)
316+
{
317+
puts("LSCopyAllHandlersForURLScheme STUB");
318+
// NULL is a safe assumption to fall back on in the stub, since it means none were found.
319+
return NULL;
320+
}
321+
322+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
323+
// WARN: Deprecated.
324+
CFArrayRef LSCopyAllRoleHandlersForContentType(CFStringRef inContentType, LSRolesMask inRole)
325+
{
326+
puts("LSCopyAllRoleHandlersForContentType STUB");
327+
// NULL is a safe assumption to fall back on in the stub, since it means none were found.
328+
return NULL;
329+
}
330+
331+
// Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
332+
// WARN: Deprecated.
333+
CFStringRef LSCopyDefaultHandlerForURLScheme(CFStringRef inURLScheme)
334+
{
335+
puts("LSCopyDefaultHandlerForURLScheme STUB");
336+
// "no string"? (could also return "" I guess)
337+
return NULL;
338+
}

0 commit comments

Comments
 (0)