this repo has no description
1#ifndef LAUNCH_SERVICES_PRIV_H_
2#define LAUNCH_SERVICES_PRIV_H_
3#include <LaunchServices/LaunchServices.h>
4#include <CoreFoundation/CFDictionary.h>
5#include <CoreFoundation/CFString.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef CFTypeRef LSASNRef;
12typedef int LSSessionID;
13typedef int LSNotificationCode;
14typedef int LSNotificationID;
15typedef OptionBits LSInitializeFlags;
16
17enum
18{
19 kLSDefaultSessionID = -2,
20};
21
22// Used in Security
23enum
24{
25 kLSNotificationInvalidID = -1,
26 kLSNotifyApplicationDeath = 1,
27};
28
29enum
30{
31 /***** MASTER SERVICE COMMANDS *****/
32 // IN:
33 // clientversion, session
34 // OUT:
35 // serverversion, endpoint
36 _kLSXPCHello = 0x64,
37
38 /***** ENDPOINT COMMANDS *****/
39 // OUT:
40 // bool success
41 // dictionary result
42 _kLSXPCWeirdCheckIn = 0x1F9,
43 // IN:
44 // dictionary info
45 // mach_port_name_t deathport
46 // OUT:
47 // bool success
48 // dictionary result (appInfo)
49 _kLSXPCCheckIn = 0x1F4,
50};
51
52extern const CFStringRef _kLSArchitecturePowerPCValue;
53extern const CFStringRef _kLSArchitecturePowerPC64Value;
54extern const CFStringRef _kLSArchitecturei386Value;
55extern const CFStringRef _kLSArchitecturex86_64Value;
56extern const CFStringRef _kLSArchitectureUnknownValue;
57
58extern const CFStringRef _kLSArchitectureKey;
59
60extern const CFStringRef _kLSPIDKey;
61extern const CFStringRef _kLSExecutablePathKey;
62extern const CFStringRef _kLSCheckInTimeKey;
63extern const CFStringRef _kLSDisplayNameKey;
64extern const CFStringRef _kLSArchitectureKey;
65extern const CFStringRef _kLSBundlePathKey;
66extern const CFStringRef _kLSApplicationTypeKey;
67
68extern const CFStringRef _kLSASNKey;
69
70extern const CFStringRef _kLSApplicationForegroundTypeKey;
71extern const CFStringRef _kLSApplicationBackgroundOnlyTypeKey;
72
73extern const CFStringRef _kLSExecutableFormatKey;
74extern const CFStringRef _kLSExecutableFormatMachOKey;
75extern const CFStringRef _kLSExecutableFormatCFMKey;
76
77// Example call:
78// _LSApplicationCheckIn(kLSDefaultSessionID, CFBundleGetInfoDictionary(CFBundleGetMainBundle()))
79// Normally to be called from -[NSApplication init]
80CFDictionaryRef _LSApplicationCheckIn(LSSessionID sessionID, CFDictionaryRef applicationInfo);
81
82CFTypeRef _LSGetCurrentApplicationASN(void);
83OSStatus _LSSetApplicationInformationItem(LSSessionID sessionID, LSASNRef asn, CFStringRef key, CFStringRef value, CFDictionaryRef *info);
84
85typedef bool (^LSServerConnectionAllowedBlock) ( CFDictionaryRef optionsRef );
86void _LSSetApplicationLaunchServicesServerConnectionStatus(uint64_t flags, LSServerConnectionAllowedBlock block);
87
88CFTypeRef _LSCopyApplicationInformationItem(LSSessionID sessionID, CFTypeRef asn, CFStringRef what);
89
90CFDictionaryRef _LSCopyApplicationInformation(LSSessionID sessionID, CFTypeRef asn, int);
91
92LSASNRef _LSASNCreateWithPid(CFAllocatorRef allocator, pid_t pid);
93
94OSStatus _LSLaunchApplication(CFURLRef appPath);
95
96// Assumed
97#define kLSDownloadRiskCategoryKey CFSTR("LSDownloadRiskCategory")
98
99#define kLSRiskCategorySafe "LSRiskCategorySafe"
100#define kLSRiskCategoryNeutral "LSRiskCategoryNeutral"
101#define kLSRiskCategoryUnknown "LSRiskCategoryUnknown"
102#define kLSRiskCategoryMayContainUnsafeExecutable "LSRiskCategoryMayContainUnsafeExecutable"
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif