launch.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. #ifndef __XPC_LAUNCH_H__
  2. #define __XPC_LAUNCH_H__
  3. /*!
  4. * @header
  5. * These interfaces were only ever documented for the purpose of allowing a
  6. * launchd job to obtain file descriptors associated with the sockets it
  7. * advertised in its launchd.plist(5). That functionality is now available in a
  8. * much more straightforward fashion through the {@link launch_activate_socket}
  9. * API.
  10. *
  11. * There are currently no replacements for other uses of the {@link launch_msg}
  12. * API, including submitting, removing, starting, stopping and listing jobs.
  13. */
  14. #include <os/base.h>
  15. #include <Availability.h>
  16. #include <mach/mach.h>
  17. #include <stddef.h>
  18. #include <stdbool.h>
  19. #include <sys/cdefs.h>
  20. #if __has_feature(assume_nonnull)
  21. _Pragma("clang assume_nonnull begin")
  22. #endif
  23. __BEGIN_DECLS
  24. #define LAUNCH_KEY_SUBMITJOB "SubmitJob"
  25. #define LAUNCH_KEY_REMOVEJOB "RemoveJob"
  26. #define LAUNCH_KEY_STARTJOB "StartJob"
  27. #define LAUNCH_KEY_STOPJOB "StopJob"
  28. #define LAUNCH_KEY_GETJOB "GetJob"
  29. #define LAUNCH_KEY_GETJOBS "GetJobs"
  30. #define LAUNCH_KEY_CHECKIN "CheckIn"
  31. #define LAUNCH_JOBKEY_LABEL "Label"
  32. #define LAUNCH_JOBKEY_DISABLED "Disabled"
  33. #define LAUNCH_JOBKEY_USERNAME "UserName"
  34. #define LAUNCH_JOBKEY_GROUPNAME "GroupName"
  35. #define LAUNCH_JOBKEY_TIMEOUT "TimeOut"
  36. #define LAUNCH_JOBKEY_EXITTIMEOUT "ExitTimeOut"
  37. #define LAUNCH_JOBKEY_INITGROUPS "InitGroups"
  38. #define LAUNCH_JOBKEY_SOCKETS "Sockets"
  39. #define LAUNCH_JOBKEY_MACHSERVICES "MachServices"
  40. #define LAUNCH_JOBKEY_MACHSERVICELOOKUPPOLICIES "MachServiceLookupPolicies"
  41. #define LAUNCH_JOBKEY_INETDCOMPATIBILITY "inetdCompatibility"
  42. #define LAUNCH_JOBKEY_ENABLEGLOBBING "EnableGlobbing"
  43. #define LAUNCH_JOBKEY_PROGRAMARGUMENTS "ProgramArguments"
  44. #define LAUNCH_JOBKEY_PROGRAM "Program"
  45. #define LAUNCH_JOBKEY_ONDEMAND "OnDemand"
  46. #define LAUNCH_JOBKEY_KEEPALIVE "KeepAlive"
  47. #define LAUNCH_JOBKEY_LIMITLOADTOHOSTS "LimitLoadToHosts"
  48. #define LAUNCH_JOBKEY_LIMITLOADFROMHOSTS "LimitLoadFromHosts"
  49. #define LAUNCH_JOBKEY_LIMITLOADTOSESSIONTYPE "LimitLoadToSessionType"
  50. #define LAUNCH_JOBKEY_LIMITLOADTOHARDWARE "LimitLoadToHardware"
  51. #define LAUNCH_JOBKEY_LIMITLOADFROMHARDWARE "LimitLoadFromHardware"
  52. #define LAUNCH_JOBKEY_RUNATLOAD "RunAtLoad"
  53. #define LAUNCH_JOBKEY_ROOTDIRECTORY "RootDirectory"
  54. #define LAUNCH_JOBKEY_WORKINGDIRECTORY "WorkingDirectory"
  55. #define LAUNCH_JOBKEY_ENVIRONMENTVARIABLES "EnvironmentVariables"
  56. #define LAUNCH_JOBKEY_USERENVIRONMENTVARIABLES "UserEnvironmentVariables"
  57. #define LAUNCH_JOBKEY_UMASK "Umask"
  58. #define LAUNCH_JOBKEY_NICE "Nice"
  59. #define LAUNCH_JOBKEY_HOPEFULLYEXITSFIRST "HopefullyExitsFirst"
  60. #define LAUNCH_JOBKEY_HOPEFULLYEXITSLAST "HopefullyExitsLast"
  61. #define LAUNCH_JOBKEY_LOWPRIORITYIO "LowPriorityIO"
  62. #define LAUNCH_JOBKEY_LOWPRIORITYBACKGROUNDIO "LowPriorityBackgroundIO"
  63. #define LAUNCH_JOBKEY_SESSIONCREATE "SessionCreate"
  64. #define LAUNCH_JOBKEY_STARTONMOUNT "StartOnMount"
  65. #define LAUNCH_JOBKEY_SOFTRESOURCELIMITS "SoftResourceLimits"
  66. #define LAUNCH_JOBKEY_HARDRESOURCELIMITS "HardResourceLimits"
  67. #define LAUNCH_JOBKEY_STANDARDINPATH "StandardInPath"
  68. #define LAUNCH_JOBKEY_STANDARDOUTPATH "StandardOutPath"
  69. #define LAUNCH_JOBKEY_STANDARDERRORPATH "StandardErrorPath"
  70. #define LAUNCH_JOBKEY_DEBUG "Debug"
  71. #define LAUNCH_JOBKEY_WAITFORDEBUGGER "WaitForDebugger"
  72. #define LAUNCH_JOBKEY_QUEUEDIRECTORIES "QueueDirectories"
  73. #define LAUNCH_JOBKEY_WATCHPATHS "WatchPaths"
  74. #define LAUNCH_JOBKEY_STARTINTERVAL "StartInterval"
  75. #define LAUNCH_JOBKEY_STARTCALENDARINTERVAL "StartCalendarInterval"
  76. #define LAUNCH_JOBKEY_BONJOURFDS "BonjourFDs"
  77. #define LAUNCH_JOBKEY_LASTEXITSTATUS "LastExitStatus"
  78. #define LAUNCH_JOBKEY_PID "PID"
  79. #define LAUNCH_JOBKEY_THROTTLEINTERVAL "ThrottleInterval"
  80. #define LAUNCH_JOBKEY_LAUNCHONLYONCE "LaunchOnlyOnce"
  81. #define LAUNCH_JOBKEY_ABANDONPROCESSGROUP "AbandonProcessGroup"
  82. #define LAUNCH_JOBKEY_IGNOREPROCESSGROUPATSHUTDOWN \
  83. "IgnoreProcessGroupAtShutdown"
  84. #define LAUNCH_JOBKEY_LEGACYTIMERS "LegacyTimers"
  85. #define LAUNCH_JOBKEY_ENABLEPRESSUREDEXIT "EnablePressuredExit"
  86. #define LAUNCH_JOBKEY_DRAINMESSAGESONFAILEDINIT "DrainMessagesOnFailedInit"
  87. #define LAUNCH_JOBKEY_POLICIES "Policies"
  88. #define LAUNCH_JOBKEY_ENABLETRANSACTIONS "EnableTransactions"
  89. #define LAUNCH_JOBPOLICY_DENYCREATINGOTHERJOBS "DenyCreatingOtherJobs"
  90. #define LAUNCH_JOBINETDCOMPATIBILITY_WAIT "Wait"
  91. #define LAUNCH_JOBINETDCOMPATIBILITY_INSTANCES "Instances"
  92. #define LAUNCH_JOBKEY_MACH_RESETATCLOSE "ResetAtClose"
  93. #define LAUNCH_JOBKEY_MACH_HIDEUNTILCHECKIN "HideUntilCheckIn"
  94. #define LAUNCH_JOBKEY_MACH_DRAINMESSAGESONCRASH "DrainMessagesOnCrash"
  95. #define LAUNCH_JOBKEY_MACH_PINGEVENTUPDATES "PingEventUpdates"
  96. #define LAUNCH_JOBKEY_KEEPALIVE_SUCCESSFULEXIT "SuccessfulExit"
  97. #define LAUNCH_JOBKEY_KEEPALIVE_NETWORKSTATE "NetworkState"
  98. #define LAUNCH_JOBKEY_KEEPALIVE_PATHSTATE "PathState"
  99. #define LAUNCH_JOBKEY_KEEPALIVE_OTHERJOBACTIVE "OtherJobActive"
  100. #define LAUNCH_JOBKEY_KEEPALIVE_OTHERJOBENABLED "OtherJobEnabled"
  101. #define LAUNCH_JOBKEY_KEEPALIVE_AFTERINITIALDEMAND "AfterInitialDemand"
  102. #define LAUNCH_JOBKEY_KEEPALIVE_CRASHED "Crashed"
  103. #define LAUNCH_JOBKEY_LAUNCHEVENTS "LaunchEvents"
  104. #define LAUNCH_JOBKEY_CAL_MINUTE "Minute"
  105. #define LAUNCH_JOBKEY_CAL_HOUR "Hour"
  106. #define LAUNCH_JOBKEY_CAL_DAY "Day"
  107. #define LAUNCH_JOBKEY_CAL_WEEKDAY "Weekday"
  108. #define LAUNCH_JOBKEY_CAL_MONTH "Month"
  109. #define LAUNCH_JOBKEY_RESOURCELIMIT_CORE "Core"
  110. #define LAUNCH_JOBKEY_RESOURCELIMIT_CPU "CPU"
  111. #define LAUNCH_JOBKEY_RESOURCELIMIT_DATA "Data"
  112. #define LAUNCH_JOBKEY_RESOURCELIMIT_FSIZE "FileSize"
  113. #define LAUNCH_JOBKEY_RESOURCELIMIT_MEMLOCK "MemoryLock"
  114. #define LAUNCH_JOBKEY_RESOURCELIMIT_NOFILE "NumberOfFiles"
  115. #define LAUNCH_JOBKEY_RESOURCELIMIT_NPROC "NumberOfProcesses"
  116. #define LAUNCH_JOBKEY_RESOURCELIMIT_RSS "ResidentSetSize"
  117. #define LAUNCH_JOBKEY_RESOURCELIMIT_STACK "Stack"
  118. #define LAUNCH_JOBKEY_DISABLED_MACHINETYPE "MachineType"
  119. #define LAUNCH_JOBKEY_DISABLED_MODELNAME "ModelName"
  120. #define LAUNCH_JOBSOCKETKEY_TYPE "SockType"
  121. #define LAUNCH_JOBSOCKETKEY_PASSIVE "SockPassive"
  122. #define LAUNCH_JOBSOCKETKEY_BONJOUR "Bonjour"
  123. #define LAUNCH_JOBSOCKETKEY_SECUREWITHKEY "SecureSocketWithKey"
  124. #define LAUNCH_JOBSOCKETKEY_PATHNAME "SockPathName"
  125. #define LAUNCH_JOBSOCKETKEY_PATHMODE "SockPathMode"
  126. #define LAUNCH_JOBSOCKETKEY_PATHOWNER "SockPathOwner"
  127. #define LAUNCH_JOBSOCKETKEY_PATHGROUP "SockPathGroup"
  128. #define LAUNCH_JOBSOCKETKEY_NODENAME "SockNodeName"
  129. #define LAUNCH_JOBSOCKETKEY_SERVICENAME "SockServiceName"
  130. #define LAUNCH_JOBSOCKETKEY_FAMILY "SockFamily"
  131. #define LAUNCH_JOBSOCKETKEY_PROTOCOL "SockProtocol"
  132. #define LAUNCH_JOBSOCKETKEY_MULTICASTGROUP "MulticastGroup"
  133. #define LAUNCH_JOBKEY_PROCESSTYPE "ProcessType"
  134. #define LAUNCH_KEY_PROCESSTYPE_APP "App"
  135. #define LAUNCH_KEY_PROCESSTYPE_STANDARD "Standard"
  136. #define LAUNCH_KEY_PROCESSTYPE_BACKGROUND "Background"
  137. #define LAUNCH_KEY_PROCESSTYPE_INTERACTIVE "Interactive"
  138. #define LAUNCH_KEY_PROCESSTYPE_ADAPTIVE "Adaptive"
  139. /*!
  140. * @function launch_activate_socket
  141. *
  142. * @abstract
  143. * Retrieves the file descriptors for sockets specified in the process'
  144. * launchd.plist(5).
  145. *
  146. * @param name
  147. * The name of the socket entry in the service's Sockets dictionary.
  148. *
  149. * @param fds
  150. * On return, this parameter will be populated with an array of file
  151. * descriptors. One socket can have many descriptors associated with it
  152. * depending on the characteristics of the network interfaces on the system.
  153. * The descriptors in this array are the results of calling getaddrinfo(3) with
  154. * the parameters described in launchd.plist(5).
  155. *
  156. * The caller is responsible for calling free(3) on the returned pointer.
  157. *
  158. * @param cnt
  159. * The number of file descriptor entries in the returned array.
  160. *
  161. * @result
  162. * On success, zero is returned. Otherwise, an appropriate POSIX-domain is
  163. * returned. Possible error codes are:
  164. *
  165. * ENOENT -> There was no socket of the specified name owned by the caller.
  166. * ESRCH -> The caller is not a process managed by launchd.
  167. * EALREADY -> The socket has already been activated by the caller.
  168. */
  169. __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
  170. OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL2 OS_NONNULL3
  171. int
  172. launch_activate_socket(const char *name,
  173. int * _Nonnull * _Nullable fds, size_t *cnt);
  174. typedef struct _launch_data *launch_data_t;
  175. typedef void (*launch_data_dict_iterator_t)(const launch_data_t lval,
  176. const char *key, void * _Nullable ctx);
  177. typedef enum {
  178. LAUNCH_DATA_DICTIONARY = 1,
  179. LAUNCH_DATA_ARRAY,
  180. LAUNCH_DATA_FD,
  181. LAUNCH_DATA_INTEGER,
  182. LAUNCH_DATA_REAL,
  183. LAUNCH_DATA_BOOL,
  184. LAUNCH_DATA_STRING,
  185. LAUNCH_DATA_OPAQUE,
  186. LAUNCH_DATA_ERRNO,
  187. LAUNCH_DATA_MACHPORT,
  188. } launch_data_type_t;
  189. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  190. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  191. launch_data_t
  192. launch_data_alloc(launch_data_type_t type);
  193. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  194. OS_EXPORT OS_MALLOC OS_WARN_RESULT OS_NONNULL1
  195. launch_data_t
  196. launch_data_copy(launch_data_t ld);
  197. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  198. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  199. launch_data_type_t
  200. launch_data_get_type(const launch_data_t ld);
  201. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  202. OS_EXPORT OS_NONNULL1
  203. void
  204. launch_data_free(launch_data_t ld);
  205. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  206. OS_EXPORT OS_NONNULL1 OS_NONNULL2 OS_NONNULL3
  207. bool
  208. launch_data_dict_insert(launch_data_t ldict, const launch_data_t lval,
  209. const char *key);
  210. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  211. OS_EXPORT OS_WARN_RESULT OS_NONNULL1 OS_NONNULL2
  212. launch_data_t _Nullable
  213. launch_data_dict_lookup(const launch_data_t ldict, const char *key);
  214. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  215. OS_EXPORT OS_NONNULL1 OS_NONNULL2
  216. bool
  217. launch_data_dict_remove(launch_data_t ldict, const char *key);
  218. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  219. OS_EXPORT OS_NONNULL1 OS_NONNULL2
  220. void
  221. launch_data_dict_iterate(const launch_data_t ldict,
  222. launch_data_dict_iterator_t iterator, void * _Nullable ctx);
  223. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  224. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  225. size_t
  226. launch_data_dict_get_count(const launch_data_t ldict);
  227. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  228. OS_EXPORT OS_NONNULL1 OS_NONNULL2
  229. bool
  230. launch_data_array_set_index(launch_data_t larray, const launch_data_t lval,
  231. size_t idx);
  232. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  233. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  234. launch_data_t
  235. launch_data_array_get_index(const launch_data_t larray, size_t idx);
  236. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  237. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  238. size_t
  239. launch_data_array_get_count(const launch_data_t larray);
  240. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  241. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  242. launch_data_t
  243. launch_data_new_fd(int fd);
  244. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  245. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  246. launch_data_t
  247. launch_data_new_machport(mach_port_t val);
  248. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  249. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  250. launch_data_t
  251. launch_data_new_integer(long long val);
  252. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  253. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  254. launch_data_t
  255. launch_data_new_bool(bool val);
  256. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  257. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  258. launch_data_t
  259. launch_data_new_real(double val);
  260. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  261. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  262. launch_data_t
  263. launch_data_new_string(const char *val);
  264. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  265. OS_EXPORT OS_MALLOC OS_WARN_RESULT
  266. launch_data_t
  267. launch_data_new_opaque(const void *bytes, size_t sz);
  268. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  269. OS_EXPORT OS_NONNULL1
  270. bool
  271. launch_data_set_fd(launch_data_t ld, int fd);
  272. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  273. OS_EXPORT OS_NONNULL1
  274. bool
  275. launch_data_set_machport(launch_data_t ld, mach_port_t mp);
  276. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  277. OS_EXPORT OS_NONNULL1
  278. bool
  279. launch_data_set_integer(launch_data_t ld, long long val);
  280. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  281. OS_EXPORT OS_NONNULL1
  282. bool
  283. launch_data_set_bool(launch_data_t ld, bool val);
  284. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  285. OS_EXPORT OS_NONNULL1
  286. bool
  287. launch_data_set_real(launch_data_t ld, double val);
  288. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  289. OS_EXPORT OS_NONNULL1
  290. bool
  291. launch_data_set_string(launch_data_t ld, const char *val);
  292. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  293. OS_EXPORT OS_NONNULL1
  294. bool
  295. launch_data_set_opaque(launch_data_t ld, const void *bytes, size_t sz);
  296. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  297. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  298. int
  299. launch_data_get_fd(const launch_data_t ld);
  300. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  301. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  302. mach_port_t
  303. launch_data_get_machport(const launch_data_t ld);
  304. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  305. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  306. long long
  307. launch_data_get_integer(const launch_data_t ld);
  308. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  309. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  310. bool
  311. launch_data_get_bool(const launch_data_t ld);
  312. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  313. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  314. double
  315. launch_data_get_real(const launch_data_t ld);
  316. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  317. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  318. const char *
  319. launch_data_get_string(const launch_data_t ld);
  320. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  321. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  322. void *
  323. launch_data_get_opaque(const launch_data_t ld);
  324. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  325. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  326. size_t
  327. launch_data_get_opaque_size(const launch_data_t ld);
  328. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  329. OS_EXPORT OS_WARN_RESULT OS_NONNULL1
  330. int
  331. launch_data_get_errno(const launch_data_t ld);
  332. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  333. OS_EXPORT OS_WARN_RESULT
  334. int
  335. launch_get_fd(void);
  336. __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_2_0, __IPHONE_8_0)
  337. OS_EXPORT OS_MALLOC OS_WARN_RESULT OS_NONNULL1
  338. launch_data_t
  339. launch_msg(const launch_data_t request);
  340. __END_DECLS
  341. #if __has_feature(assume_nonnull)
  342. _Pragma("clang assume_nonnull end")
  343. #endif
  344. #endif // __XPC_LAUNCH_H__