peachsim 0.1.1728 → 0.1.1744

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +68 -16
  6. package/cli/commands/coverage-swift.ts +112 -4
  7. package/cli/commands/device.ts +3 -1
  8. package/cli/commands/doctor.ts +1 -4
  9. package/cli/commands/inspect/settling.ts +6 -1
  10. package/cli/commands/inspect/wait-ready.ts +22 -2
  11. package/cli/commands/package.ts +33 -21
  12. package/cli/commands/push.ts +56 -0
  13. package/cli/commands/serve.ts +9 -0
  14. package/cli/commands/shell-url.ts +41 -9
  15. package/cli/commands/swift.ts +1 -1
  16. package/cli/current-sim.ts +27 -0
  17. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  18. package/cli/drivers/linux-browser-libs.ts +8 -6
  19. package/cli/drivers/playwright.ts +5 -1
  20. package/cli/internal-child.ts +11 -1
  21. package/cli/main.ts +6 -0
  22. package/cli/native-input.ts +1 -7
  23. package/cli/outbound-endpoints.ts +9 -1
  24. package/cli/packaged-app-launcher.ts +3 -1
  25. package/cli/scene-video.ts +28 -7
  26. package/cli/ws-bridge.ts +3 -1
  27. package/detox/index.ts +18 -5
  28. package/dist-lib/agent-daemon-client.cjs +1 -1
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +5 -2
  31. package/dist-lib/auth/shared-session.cjs +5 -2
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +1 -1
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +1 -1
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +1 -1
  40. package/dist-lib/bundle-channel.cjs +9932 -4561
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +1 -1
  43. package/dist-lib/cloud-contract.cjs +1 -1
  44. package/dist-lib/cloud-contract.mjs +1 -1
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +1 -1
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +1 -1
  49. package/dist-lib/config.cjs +1 -1
  50. package/dist-lib/config.mjs +1 -1
  51. package/dist-lib/detox/index.cjs +30 -8
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/expo-swift-bundle.cjs +6886 -3303
  54. package/dist-lib/expo-swift-metadata.cjs +14 -2
  55. package/dist-lib/expo-swift-metadata.mjs +14 -2
  56. package/dist-lib/home-paths.cjs +7 -2
  57. package/dist-lib/host/bridge-host.cjs +8513 -3085
  58. package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +6 -3
  63. package/dist-lib/index.cjs +175 -80
  64. package/dist-lib/jump-to-source-babel.cjs +1 -1
  65. package/dist-lib/jump-to-source-native.cjs +1 -1
  66. package/dist-lib/kotlin-host.cjs +209 -32
  67. package/dist-lib/menu.cjs +7 -1
  68. package/dist-lib/menu.mjs +7 -1
  69. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  70. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  71. package/dist-lib/metro-production-bundle.cjs +1 -1
  72. package/dist-lib/metro-production-bundle.mjs +1 -1
  73. package/dist-lib/metro.cjs +146 -76
  74. package/dist-lib/native-app-identity-project.cjs +76 -39
  75. package/dist-lib/native-app-identity-project.mjs +76 -39
  76. package/dist-lib/native-app-identity.cjs +10 -3
  77. package/dist-lib/native-app-identity.mjs +10 -3
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +1 -1
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +1 -1
  82. package/dist-lib/profiles.cjs +5 -2
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +25 -23
  85. package/dist-lib/public-origins-lib.json +138 -80
  86. package/dist-lib/react-native-host-modules.cjs +5 -2
  87. package/dist-lib/react-native-host-modules.mjs +5 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +4 -1
  91. package/dist-lib/sdk.mjs +4 -1
  92. package/dist-lib/skills.cjs +41126 -36493
  93. package/dist-lib/swift-compile.cjs +2103 -444
  94. package/dist-lib/swift-compile.mjs +2025 -369
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +1 -1
  97. package/dist-lib/swift-submit.cjs +2 -2
  98. package/dist-lib/swift-submit.mjs +2 -2
  99. package/dist-lib/swift-toolchain.cjs +84 -24
  100. package/dist-lib/swift.cjs +1 -1
  101. package/dist-lib/vite-swift.cjs +6094 -2687
  102. package/dist-lib/vite.cjs +32 -10
  103. package/dist-lib/worklet-executable.cjs +1 -1
  104. package/dist-lib/worklet-executable.mjs +1 -1
  105. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  107. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  108. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  109. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
  110. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  111. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
  112. package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
  113. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  116. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  117. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  118. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
  119. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  121. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  122. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  123. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  124. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
  132. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  135. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  137. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
  138. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  139. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  140. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  141. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  142. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  143. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  144. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  145. package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
  146. package/kotlin/README.md +3 -0
  147. package/kotlin/sdk.tar.gz +0 -0
  148. package/package.json +2 -1
  149. package/runtime-companion.json +1 -1
  150. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  151. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  152. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  153. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  154. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  155. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  156. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  157. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  158. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  159. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  198. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  199. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  200. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
  201. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  218. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  219. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  220. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  221. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  222. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  223. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  224. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  225. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  226. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  227. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  228. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  229. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  230. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  231. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  232. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  233. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  234. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  239. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  240. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  241. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  242. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  243. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  244. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  245. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  246. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  247. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  248. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  249. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  250. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  251. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  252. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  253. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  254. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  255. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  258. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  259. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  260. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  261. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  262. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  263. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  264. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  265. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  266. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  267. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  268. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  269. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  270. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  271. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  272. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  273. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  274. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  275. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  276. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  277. package/sdk/ios/usr/include/module.modulemap +1 -0
  278. package/sdk/ios/usr/include/os/signpost.h +414 -0
  279. package/sdk/ios/usr/include/os.modulemap +5 -0
  280. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  281. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  282. package/sdk/ios/wasm/include/errno.h +4 -20
  283. package/sdk/ios/wasm/include/pthread.h +3 -0
  284. package/sdk/ios/wasm/include/setjmp.h +57 -0
  285. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  286. package/sdk/native-hashes.json +3 -3
  287. package/skills/contrast/SKILL.md +6 -5
  288. package/skills/peach-debug/SKILL.md +68 -265
  289. package/skills/peach-debug/references/accessibility.md +37 -73
  290. package/skills/peach-debug/references/commands.md +2 -2
  291. package/skills/peach-debug/references/events.md +74 -0
  292. package/skills/peach-perf/SKILL.md +64 -402
  293. package/skills/peach-perf/references/presentation.md +46 -0
  294. package/skills/peach-perf/references/profiling.md +93 -0
  295. package/skills/peach-perf/references/render-counters.md +57 -0
  296. package/skills/peach-setup/SKILL.md +66 -217
  297. package/skills/peach-setup/references/native-config.md +35 -0
  298. package/skills/peach-setup/references/reporting.md +28 -0
  299. package/skills/peach-test/SKILL.md +68 -285
  300. package/skills/peach-test/references/detox.md +69 -0
  301. package/skills/peach-test/references/maestro.md +95 -0
  302. package/skills/peach-visual/SKILL.md +53 -106
  303. package/src/android-autolinking.ts +1 -0
  304. package/src/android-bridge-packages.ts +279 -0
  305. package/src/appPackageContract.ts +14 -1
  306. package/src/assetCatalogContract.ts +8 -1
  307. package/src/bridge-contract.ts +6 -0
  308. package/src/bundle-channel.mjs +152 -60
  309. package/src/cli-runtime.ts +3 -0
  310. package/src/configured-bundle-producer.ts +10 -0
  311. package/src/device-catalog.ts +68 -4
  312. package/src/expo-discovery-cache.ts +10 -3
  313. package/src/expo-kotlin-host.ts +97 -26
  314. package/src/expo-native-workspace.ts +211 -52
  315. package/src/expo-swift-host.ts +149 -123
  316. package/src/expo-swift-ready.ts +5 -1
  317. package/src/expo-widget-assets.ts +76 -0
  318. package/src/expoKotlinContract.ts +12 -2
  319. package/src/expoSwiftContract.ts +21 -2
  320. package/src/generated/swift-c-predefines.json +1 -1
  321. package/src/home-paths.ts +6 -1
  322. package/src/host/bridge-host.ts +5 -0
  323. package/src/host/fetch-proxy-handler.ts +10 -0
  324. package/src/host/websocket-proxy.ts +7 -2
  325. package/src/kotlin-host.ts +204 -30
  326. package/src/kotlinSdkContract.ts +2 -1
  327. package/src/menu.ts +7 -0
  328. package/src/native-prebuilt.ts +154 -0
  329. package/src/nitro-adapter.lock.json +261 -261
  330. package/src/nitro-adapter.ts +118 -50
  331. package/src/nitro-bundle.ts +134 -96
  332. package/src/nitro-compile.ts +16 -6
  333. package/src/nitro-dependencies.ts +43 -28
  334. package/src/nitro-source.ts +142 -30
  335. package/src/nitro-superset.lock.json +103 -0
  336. package/src/nitro-superset.ts +137 -0
  337. package/src/nitroAdapterContract.ts +146 -98
  338. package/src/nitroContract.ts +68 -21
  339. package/src/react-bridge-importers.ts +1 -0
  340. package/src/react-native-bridge-modules.ts +2 -0
  341. package/src/react-native-host-modules.ts +4 -1
  342. package/src/settingsContract.ts +37 -1
  343. package/src/storageSnapshotContract.ts +29 -81
  344. package/src/swift-compile.ts +315 -117
  345. package/src/swift-compiler-digest.ts +2 -0
  346. package/src/swift-coverage/indexdump.ts +22 -6
  347. package/src/swift-coverage/indexing.ts +4 -4
  348. package/src/swift-coverage/sdk.ts +104 -20
  349. package/src/swift-coverage/types.ts +34 -0
  350. package/src/swift-coverage/xcode-packages.ts +61 -1
  351. package/src/swift-coverage/xcode.ts +19 -13
  352. package/src/swift-cxx-reachable.ts +1 -1
  353. package/src/swift-distribution.lock.json +18 -13
  354. package/src/swift-distribution.ts +57 -26
  355. package/src/swift-host.ts +51 -35
  356. package/src/swift-link-roots.ts +45 -18
  357. package/src/swift-objc-compile.ts +78 -2
  358. package/src/swift-objc-standin.ts +3 -0
  359. package/src/swift-shared-sdk.ts +85 -1
  360. package/src/swift-standin-emit.ts +6 -1
  361. package/src/swift-standins.ts +403 -19
  362. package/src/swift-submit.ts +17 -1
  363. package/src/swift-toolchain.ts +98 -23
  364. package/src/swift-wasm-prune.ts +1629 -0
  365. package/src/turbo-bundle.ts +82 -0
  366. package/src/turbo-compile.ts +120 -0
  367. package/src/turbo-runtime.lock.json +69 -0
  368. package/src/turbo-source.ts +754 -0
  369. package/src/vite-plugin-one.ts +15 -3
  370. package/src/vite-plugin.ts +82 -23
  371. package/src/wasm-optimize.ts +34 -0
  372. package/src/worker-system-chunks.ts +3 -3
  373. package/src/xcode-project.ts +52 -0
  374. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,1187 @@
1
+ //
2
+ // framer_options.h
3
+ // Network
4
+ //
5
+ // Copyright (c) 2018-2019 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef __NW_FRAMER_OPTIONS_H__
9
+ #define __NW_FRAMER_OPTIONS_H__
10
+
11
+ #ifndef __NW_INDIRECT__
12
+ #error "Please include <Network/Network.h> instead of this file directly."
13
+ #endif // __NW_INDIRECT__
14
+
15
+ #include <Network/protocol_options.h>
16
+ #include <Network/endpoint.h>
17
+ #include <Network/parameters.h>
18
+
19
+ #include <dispatch/dispatch.h>
20
+
21
+
22
+ __BEGIN_DECLS
23
+
24
+ /*!
25
+ * @typedef nw_framer_t
26
+ * @abstract
27
+ * A Network Framer is an instance of a protocol in a connection's protocol
28
+ * stack that parses and writes messages on top of a transport protocol, such
29
+ * as a TCP stream. A framer can add and parse headers or delimiters around
30
+ * application data to provide a message-oriented abstraction.
31
+ *
32
+ * In order to create a framer protocol, first define it using
33
+ * nw_framer_create_definition(). This can be used to create options with
34
+ * nw_framer_create_options(), which can be added to an nw_protocol_stack_t.
35
+ * The callbacks and actions for the framer's protocol instance can be
36
+ * set once an instance of the framer is delivered with the start_handler.
37
+ *
38
+ * In order to send and receive framer messages on an nw_connection_t, use
39
+ * nw_framer_message_t as part of a nw_content_context_t.
40
+ *
41
+ * This type supports ARC and the -[description] method. In non-ARC files, use
42
+ * nw_retain() and nw_release() to retain and release the object.
43
+ */
44
+ #ifndef NW_FRAMER_IMPL
45
+ NW_OBJECT_DECL(nw_framer);
46
+ #endif // NW_FRAMER_IMPL
47
+
48
+ NW_ASSUME_NONNULL_BEGIN
49
+
50
+ #pragma mark - Messages
51
+
52
+ /*!
53
+ * @typedef nw_framer_message_t
54
+ * @abstract
55
+ * A framer message is an instance of protocol metadata associated
56
+ * with the definition of a framer, created by nw_framer_create_definition().
57
+ */
58
+ typedef nw_protocol_metadata_t nw_framer_message_t;
59
+
60
+ /*!
61
+ * @function nw_framer_protocol_create_message
62
+ *
63
+ * @abstract
64
+ * Create an instance of a framer message on which per-
65
+ * message options can be configured when sending data
66
+ * on a connection. This is intended to be used by the
67
+ * application above the connection to send message data
68
+ * down to the framer protocol instance.
69
+ *
70
+ * @param definition
71
+ * The framer protocol definition, as retrieved from
72
+ * nw_protocol_options_copy_definition() on the framer options.
73
+ *
74
+ * @result
75
+ * Returns a retained protocol metadata object.
76
+ */
77
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
78
+ NW_RETURNS_RETAINED nw_framer_message_t
79
+ nw_framer_protocol_create_message(nw_protocol_definition_t definition);
80
+
81
+ /*!
82
+ * @function nw_protocol_metadata_is_framer_message
83
+ *
84
+ * @abstract
85
+ * Checks if a protocol metadata object is a framer protocol
86
+ * message. This indicates whether or not it is compatible
87
+ * with the framer message setters and accessors.
88
+ *
89
+ * @param metadata
90
+ * The protocol metadata to check.
91
+ *
92
+ * @result
93
+ * Returns true if the metadata is associated with a framer
94
+ * protocol definition, false otherwise.
95
+ */
96
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
97
+ bool
98
+ nw_protocol_metadata_is_framer_message(nw_protocol_metadata_t metadata);
99
+
100
+ /*!
101
+ * @function nw_framer_message_create
102
+ *
103
+ * @abstract
104
+ * Create a framer message, given a framer instance. This
105
+ * is intended to be used within the implementation of
106
+ * the framer protocol to create messages that are delivered
107
+ * as input to the application.
108
+ *
109
+ * @param framer
110
+ * The framer instance object.
111
+ *
112
+ * @result
113
+ * Returns a retained framer message object.
114
+ */
115
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
116
+ NW_RETURNS_RETAINED nw_framer_message_t
117
+ nw_framer_message_create(nw_framer_t framer);
118
+
119
+ #ifdef __BLOCKS__
120
+
121
+ /*!
122
+ * @typedef nw_framer_message_dispose_value_t
123
+ *
124
+ * @abstract
125
+ * A block to be invoked when a value stored in a framer message is disposed.
126
+ * If the value was created using malloc(), for example, it should be freed here.
127
+ *
128
+ * @param value
129
+ * A pointer to the stored message value.
130
+ */
131
+ typedef void (^nw_framer_message_dispose_value_t)(void *value);
132
+
133
+ /*!
134
+ * @function nw_framer_message_set_value
135
+ *
136
+ * @abstract
137
+ * Set a key-value pair on a framer message, with a custom
138
+ * dispose function for the value.
139
+ *
140
+ * @param message
141
+ * The framer message object.
142
+ *
143
+ * @param key
144
+ * The string key to identify the value.
145
+ *
146
+ * @param value
147
+ * A pointer to the value to store.
148
+ *
149
+ * @param dispose_value
150
+ * A block to invoke to dispose the stored value.
151
+ */
152
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
153
+ void
154
+ nw_framer_message_set_value(nw_framer_message_t message,
155
+ const char *key,
156
+ void * _Nullable value,
157
+ _Nullable nw_framer_message_dispose_value_t dispose_value);
158
+
159
+ /*!
160
+ * @function nw_framer_message_access_value
161
+ *
162
+ * @abstract
163
+ * Access the value with a key on a framer message.
164
+ *
165
+ * @param message
166
+ * The framer message object.
167
+ *
168
+ * @param key
169
+ * The string key to identify the value.
170
+ *
171
+ * @param access_value
172
+ * A block to invoke inline with the pointer to the stored value.
173
+ * This pointer may be NULL if no value is stored for the key.
174
+ *
175
+ * @return
176
+ * Returns the boolean value returned by the access_value block,
177
+ * or else false if the parameters were invalid.
178
+ */
179
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
180
+ bool
181
+ nw_framer_message_access_value(nw_framer_message_t message,
182
+ const char *key,
183
+ NW_NOESCAPE bool (^access_value)(const void * _Nullable value));
184
+
185
+ #endif // __BLOCKS__
186
+
187
+ #ifdef __OBJC__
188
+
189
+ /*!
190
+ * @function nw_framer_message_set_object_value
191
+ *
192
+ * @abstract
193
+ * Set a key-value pair on a framer message, where the
194
+ * value is a reference-counted object.
195
+ *
196
+ * @param message
197
+ * The framer message object.
198
+ *
199
+ * @param key
200
+ * The string key to identify the value.
201
+ *
202
+ * @param value
203
+ * A reference counted object to store.
204
+ */
205
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
206
+ void
207
+ nw_framer_message_set_object_value(nw_framer_message_t message,
208
+ const char *key,
209
+ _Nullable id value);
210
+
211
+ /*!
212
+ * @function nw_framer_message_copy_object_value
213
+ *
214
+ * @abstract
215
+ * Copy the stored object value using a key on a framer message.
216
+ *
217
+ * @param message
218
+ * The framer message object.
219
+ *
220
+ * @param key
221
+ * The string key to identify the value.
222
+ *
223
+ * @return
224
+ * Returns a reference counted object with a +1 reference count,
225
+ * or NULL if no value was found for the specified key.
226
+ */
227
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
228
+ NW_RETURNS_RETAINED _Nullable id
229
+ nw_framer_message_copy_object_value(nw_framer_message_t message,
230
+ const char *key);
231
+
232
+ #endif // __OBJC__
233
+
234
+ #pragma mark - Framer Options
235
+
236
+ #ifdef __BLOCKS__
237
+
238
+ typedef enum {
239
+ nw_framer_start_result_ready = 1,
240
+ nw_framer_start_result_will_mark_ready = 2,
241
+ } nw_framer_start_result_t;
242
+
243
+ /*!
244
+ * @typedef nw_framer_start_result_t
245
+ *
246
+ * @abstract
247
+ * A block to be invoked when starting a new instance of the framer
248
+ * protocol. This may occur more than once for a single nw_connection.
249
+ *
250
+ * @param framer
251
+ * A new instance of the framer protocol. This handle should be used
252
+ * to set callbacks, such as with nw_framer_set_input_handler()
253
+ * and nw_framer_set_output_handler(); and to perform actions, such
254
+ * as nw_framer_deliver_input() and nw_framer_write_output().
255
+ *
256
+ * @result
257
+ * Return whether or not the start should implicitly mark the protocol
258
+ * as "ready" using nw_framer_start_result_ready, or that the protocol
259
+ * will call nw_framer_mark_ready() later using
260
+ * nw_framer_start_result_will_mark_ready.
261
+ */
262
+ typedef nw_framer_start_result_t (^nw_framer_start_handler_t)(nw_framer_t framer);
263
+
264
+ /*!
265
+ * @define NW_FRAMER_CREATE_FLAGS_DEFAULT
266
+ * @discussion Empty flags to define default options on a framer protocol.
267
+ */
268
+ #define NW_FRAMER_CREATE_FLAGS_DEFAULT 0x00
269
+
270
+ /*!
271
+ * @function nw_framer_create_definition
272
+ *
273
+ * @abstract
274
+ * Create a protocol definition for a custom framer protocol.
275
+ *
276
+ * @param identifier
277
+ * A string identifier used to name this framer protocol. This does not
278
+ * define uniqueness, and is primarily used for logging and debugging.
279
+ *
280
+ * @param flags
281
+ * Flags to describe extended options on framer protocol behavior,
282
+ * all prefixed with "NW_FRAMER_CREATE_FLAGS_".
283
+ *
284
+ * @param start_handler
285
+ * A block to be invoked when starting a new instance of the framer
286
+ * protocol. This may occur more than once for a single nw_connection.
287
+ *
288
+ * @result
289
+ * Returns a retained protocol definition that can be used with protocol
290
+ * options and metadata.
291
+ */
292
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
293
+ NW_RETURNS_RETAINED nw_protocol_definition_t
294
+ nw_framer_create_definition(const char *identifier,
295
+ uint32_t flags,
296
+ nw_framer_start_handler_t start_handler);
297
+
298
+ /*!
299
+ * @function nw_framer_create_options
300
+ *
301
+ * @abstract
302
+ * Create protocol options from a framer definition. This object can
303
+ * be added to an nw_protocol_stack_t to be used in an nw_connection_t
304
+ * or an nw_listener_t.
305
+ *
306
+ * @param framer_definition
307
+ * A protocol definition created with nw_framer_create_definition().
308
+ *
309
+ * @result
310
+ * Returns a retained protocol options object to add into a protocol
311
+ * stack.
312
+ */
313
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
314
+ NW_RETURNS_RETAINED nw_protocol_options_t
315
+ nw_framer_create_options(nw_protocol_definition_t framer_definition);
316
+
317
+ #ifdef __OBJC__
318
+
319
+ /*!
320
+ * @function nw_framer_options_set_object_value
321
+ *
322
+ * @abstract
323
+ * Set a key-value pair on framer options, where the
324
+ * value is a reference-counted object.
325
+ *
326
+ * @param options
327
+ * The framer options object.
328
+ *
329
+ * @param key
330
+ * The string key to identify the value.
331
+ *
332
+ * @param value
333
+ * A reference counted object to store.
334
+ */
335
+ API_AVAILABLE(macos(12.3), ios(15.4), watchos(8.4), tvos(15.4))
336
+ void
337
+ nw_framer_options_set_object_value(nw_protocol_options_t options,
338
+ const char *key,
339
+ _Nullable id value);
340
+
341
+ /*!
342
+ * @function nw_framer_options_copy_object_value
343
+ *
344
+ * @abstract
345
+ * Copy the stored object value using a key on framer options.
346
+ *
347
+ * @param options
348
+ * The framer options object.
349
+ *
350
+ * @param key
351
+ * The string key to identify the value.
352
+ *
353
+ * @return
354
+ * Returns a reference counted object with a +1 reference count,
355
+ * or NULL if no value was found for the specified key.
356
+ */
357
+ API_AVAILABLE(macos(12.3), ios(15.4), watchos(8.4), tvos(15.4))
358
+ NW_RETURNS_RETAINED _Nullable id
359
+ nw_framer_options_copy_object_value(nw_protocol_options_t options,
360
+ const char *key);
361
+
362
+ #endif // __OBJC__
363
+
364
+ #pragma mark - Framer Implementation Callbacks
365
+
366
+ /*!
367
+ * @typedef nw_framer_input_handler_t
368
+ *
369
+ * @abstract
370
+ * A handler block to be invoked whenever new input
371
+ * data is available to be parsed. When this block is
372
+ * run, the implementation should call functions like
373
+ * nw_framer_parse_input() and nw_framer_deliver_input().
374
+ *
375
+ * Each invocation represents new data being available
376
+ * to read from the network. This data may be insufficient
377
+ * to complete a message, or may contain multiple messages.
378
+ * Implementations are expected to try to parse messages
379
+ * in a loop until parsing fails to read enough to continue.
380
+ *
381
+ * @param framer
382
+ * The instance of the framer protocol.
383
+ *
384
+ * @result
385
+ * Return a hint of the number of bytes that should be present
386
+ * before invoking this handler again. Returning 0 indicates
387
+ * that the handler should be invoked once any data is available.
388
+ */
389
+ typedef size_t (^nw_framer_input_handler_t)(nw_framer_t framer);
390
+
391
+ /*!
392
+ * @function nw_framer_set_input_handler
393
+ *
394
+ * @abstract
395
+ * Set a handler block to be invoked whenever new input
396
+ * data is available to be parsed. When this block is
397
+ * run, the implementation should call functions like
398
+ * nw_framer_parse_input() and nw_framer_deliver_input().
399
+ *
400
+ * Input events are edge triggered. The input_handler block
401
+ * should continue to call nw_framer_parse_input()
402
+ * until nw_framer_parse_input() can no longer produce
403
+ * enough bytes to satisfy the request, or the protocol
404
+ * needs to wait for some other event to continue processing
405
+ * later.
406
+ *
407
+ * This setter is required, and must only be set from within
408
+ * the invocation of a nw_framer_start_handler_t.
409
+ *
410
+ * @param framer
411
+ * The framer instance object, passed via the
412
+ * nw_framer_start_handler_t block.
413
+ *
414
+ * @param input_handler
415
+ * The block to invoke whenever new input data is available.
416
+ */
417
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
418
+ void
419
+ nw_framer_set_input_handler(nw_framer_t framer,
420
+ nw_framer_input_handler_t input_handler);
421
+
422
+ /*!
423
+ * @typedef nw_framer_output_handler_t
424
+ *
425
+ * @abstract
426
+ * A handler block to be invoked whenever an output
427
+ * message is ready to be sent. When this block is
428
+ * run, the implementation should call functions like
429
+ * nw_framer_parse_output() and nw_framer_write_output().
430
+ *
431
+ * Each invocation represents a single complete or partial
432
+ * message that is being sent. The implementation is
433
+ * expected to write this message or let it be dropped
434
+ * in this handler.
435
+ *
436
+ * @param framer
437
+ * The instance of the framer protocol.
438
+ *
439
+ * @param message
440
+ * The framer message being sent.
441
+ *
442
+ * @param message_length
443
+ * The length of the data associated with this message send.
444
+ * If the message is not complete, the length represents the
445
+ * partial message length being sent, which may be smaller
446
+ * than the complete message length.
447
+ *
448
+ * @param is_complete
449
+ * A boolean indicating whether or not the message is now complete.
450
+ */
451
+ typedef void (^nw_framer_output_handler_t)(nw_framer_t framer,
452
+ nw_framer_message_t message,
453
+ size_t message_length,
454
+ bool is_complete);
455
+
456
+ /*!
457
+ * @function nw_framer_set_output_handler
458
+ *
459
+ * @abstract
460
+ * Set a handler block to be invoked whenever an output
461
+ * message is ready to be sent. When this block is
462
+ * run, the implementation should call functions like
463
+ * nw_framer_parse_output() and nw_framer_write_output().
464
+ *
465
+ * This setter is required, and must only be set from within
466
+ * the invocation of a nw_framer_start_handler_t.
467
+ *
468
+ * @param framer
469
+ * The framer instance object, passed via the
470
+ * nw_framer_start_handler_t block.
471
+ *
472
+ * @param output_handler
473
+ * The block to invoke whenever a new output message is ready
474
+ * to be sent.
475
+ */
476
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
477
+ void
478
+ nw_framer_set_output_handler(nw_framer_t framer,
479
+ nw_framer_output_handler_t output_handler);
480
+
481
+ /*!
482
+ * @typedef nw_framer_wakeup_handler_t
483
+ *
484
+ * @abstract
485
+ * A handler block to be invoked whenever the wakeup timer
486
+ * set via nw_framer_schedule_wakeup() fires. This is intended to
487
+ * be used for sending keepalives or other control traffic.
488
+ *
489
+ * @param framer
490
+ * The instance of the framer protocol.
491
+ */
492
+ typedef void (^nw_framer_wakeup_handler_t)(nw_framer_t framer);
493
+
494
+ /*!
495
+ * @function nw_framer_set_wakeup_handler
496
+ *
497
+ * @abstract
498
+ * Set a handler block to be invoked whenever the wakeup timer
499
+ * set via nw_framer_schedule_wakeup() fires. This is intended to
500
+ * be used for sending keepalives or other control traffic.
501
+ *
502
+ * This setter is optional, and must only be set from within
503
+ * the invocation of a nw_framer_start_handler_t.
504
+ *
505
+ * @param framer
506
+ * The framer instance object, passed via the
507
+ * nw_framer_start_handler_t block.
508
+ *
509
+ * @param wakeup_handler
510
+ * The block to invoke whenever the timeout set by
511
+ * nw_framer_schedule_wakeup() is reached.
512
+ */
513
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
514
+ void
515
+ nw_framer_set_wakeup_handler(nw_framer_t framer,
516
+ nw_framer_wakeup_handler_t wakeup_handler);
517
+
518
+ /*!
519
+ * @typedef nw_framer_stop_handler_t
520
+ *
521
+ * @abstract
522
+ * A handler block to be invoked when the connection
523
+ * is being disconnected, to allow the framer implementation
524
+ * a chance to send any final data.
525
+ *
526
+ * @param framer
527
+ * The instance of the framer protocol.
528
+ *
529
+ * @result
530
+ * Return true if the framer is done and the connection
531
+ * can be fully disconnected, or false the stop should
532
+ * be delayed. If false, the implementation must later
533
+ * call nw_framer_mark_failed_with_error().
534
+ */
535
+ typedef bool (^nw_framer_stop_handler_t)(nw_framer_t framer);
536
+
537
+ /*!
538
+ * @function nw_framer_set_stop_handler
539
+ *
540
+ * @abstract
541
+ * Set a handler block to be invoked when the connection
542
+ * is being disconnected, to allow the framer implementation
543
+ * a chance to send any final data.
544
+ *
545
+ * This setter is optional, and must only be set from within
546
+ * the invocation of a nw_framer_start_handler_t.
547
+ *
548
+ * @param framer
549
+ * The framer instance object, passed via the
550
+ * nw_framer_start_handler_t block.
551
+ *
552
+ * @param stop_handler
553
+ * The block to invoke when the connection is disconnected.
554
+ */
555
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
556
+ void
557
+ nw_framer_set_stop_handler(nw_framer_t framer,
558
+ nw_framer_stop_handler_t stop_handler);
559
+
560
+ /*!
561
+ * @typedef nw_framer_cleanup_handler_t
562
+ *
563
+ * @abstract
564
+ * A handler block to be invoked when the protocol stack
565
+ * is being torn down and deallocated. This is the opportunity
566
+ * for the framer implementation to release any state it may
567
+ * have saved.
568
+ *
569
+ * @param framer
570
+ * The instance of the framer protocol.
571
+ */
572
+ typedef void (^nw_framer_cleanup_handler_t)(nw_framer_t framer);
573
+
574
+ /*!
575
+ * @function nw_framer_set_cleanup_handler
576
+ *
577
+ * @abstract
578
+ * Set a handler block to be invoked when the protocol stack
579
+ * is being torn down and deallocated. This is the opportunity
580
+ * for the framer implementation to release any state it may
581
+ * have saved.
582
+ *
583
+ * This setter is optional, and must only be set from within
584
+ * the invocation of a nw_framer_start_handler_t.
585
+ *
586
+ * @param framer
587
+ * The framer instance object, passed via the
588
+ * nw_framer_start_handler_t block.
589
+ *
590
+ * @param cleanup_handler
591
+ * The block to invoke when the protocol stack is being deallocated.
592
+ */
593
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
594
+ void
595
+ nw_framer_set_cleanup_handler(nw_framer_t framer,
596
+ nw_framer_cleanup_handler_t cleanup_handler);
597
+
598
+ #pragma mark - Framer Implementation Actions
599
+
600
+ /*!
601
+ * @function nw_framer_mark_ready
602
+ *
603
+ * @abstract
604
+ * Mark the connection associated with the framer instance
605
+ * as ready (see nw_connection_state_ready). This is intended
606
+ * to be used by protocols that require a handshake before being
607
+ * able to send application data. This should only be called
608
+ * if the return value to the nw_framer_start_handler_t block
609
+ * was nw_framer_start_result_will_call_ready.
610
+ *
611
+ * To ensure thread safety, this function can only be called
612
+ * in one of the callback blocks invoked on the framer, or
613
+ * in a block passed to nw_framer_async().
614
+ *
615
+ * @param framer
616
+ * The framer instance object.
617
+ */
618
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
619
+ void
620
+ nw_framer_mark_ready(nw_framer_t framer);
621
+
622
+ /*!
623
+ * @function nw_framer_prepend_application_protocol
624
+ *
625
+ * @abstract
626
+ * Dynamically add a protocol to a connection establishment
627
+ * attempt "above" the framer protocol. This means that the
628
+ * protocol above will start running once the framer becomes
629
+ * ready by calling nw_framer_mark_ready(). This can only
630
+ * be used with framers that return a value of
631
+ * nw_framer_start_result_will_call_ready to their start
632
+ * handlers. An example of using this functionality is
633
+ * adding a security protocol, like TLS, above a framer
634
+ * once that framer completes its initial handshake.
635
+ *
636
+ * To ensure thread safety, this function can only be called
637
+ * in one of the callback blocks invoked on the framer, or
638
+ * in a block passed to nw_framer_async().
639
+ *
640
+ * @param framer
641
+ * The framer instance object.
642
+ *
643
+ * @param protocol_options
644
+ * Protocol options for an application protocol to dynamically
645
+ * add "above" the framer.
646
+ *
647
+ * @result Returns true if the protocol was successfully added,
648
+ * or false it it could not be added. This will fail if
649
+ * the framer is already marked ready.
650
+ */
651
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
652
+ bool
653
+ nw_framer_prepend_application_protocol(nw_framer_t framer,
654
+ nw_protocol_options_t protocol_options);
655
+
656
+ /*!
657
+ * @function nw_framer_mark_failed_with_error
658
+ *
659
+ * @abstract
660
+ * Mark the connection associated with the framer instance
661
+ * as failed (see nw_connection_state_failed).
662
+ *
663
+ * To ensure thread safety, this function can only be called
664
+ * in one of the callback blocks invoked on the framer, or
665
+ * in a block passed to nw_framer_async().
666
+ *
667
+ * @param framer
668
+ * The framer instance object.
669
+ *
670
+ * @param error_code
671
+ * An error code to describe why the connection failed.
672
+ */
673
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
674
+ void
675
+ nw_framer_mark_failed_with_error(nw_framer_t framer, int error_code);
676
+
677
+ /*!
678
+ * @typedef nw_framer_parse_completion_t
679
+ *
680
+ * @abstract
681
+ * A completion block that is invoked inline to parse available
682
+ * bytes, either input or output. This is the way a framer can
683
+ * access the underlying buffer for data being sent or received.
684
+ * The block has a side effect of advancing the parsing cursor
685
+ * by the number of bytes specified in the return value.
686
+ *
687
+ * @param buffer
688
+ * The buffer of bytes being sent or received.
689
+ *
690
+ * @param buffer_length
691
+ * The number of valid bytes in buffer.
692
+ *
693
+ * @param is_complete
694
+ * The boolean indicating if this section of the buffer indicates
695
+ * the end of a message or stream.
696
+ *
697
+ * @result
698
+ * Return the number of bytes by which to advance the input or
699
+ * output cursor. For example, if nw_framer_parse_input() is called
700
+ * and the completion returns 0, calling nw_framer_parse_input() again
701
+ * will allow the implementation to start parsing again at the same
702
+ * start location. However, if the completion returns 10, the next
703
+ * call to nw_framer_parse_input() will return bytes starting from 10
704
+ * bytes beyond the previous call.
705
+ *
706
+ * The cursors also define the offsets at which data being delivered
707
+ * or written using nw_framer_deliver_input_no_copy() and
708
+ * nw_framer_write_output_no_copy() will start.
709
+ *
710
+ * The returned value for incrementing the cursor may be larger than
711
+ * the length of the buffer just parsed. This allows an implementation
712
+ * to "skip" ahead by a number of bytes if it knows it does not
713
+ * need to parse more.
714
+ */
715
+ typedef size_t (^nw_framer_parse_completion_t)(uint8_t * _Nullable buffer,
716
+ size_t buffer_length,
717
+ bool is_complete);
718
+
719
+ /*!
720
+ * @function nw_framer_parse_input
721
+ *
722
+ * @abstract
723
+ * Parse currently available input from the location of the input
724
+ * cursor in the stream or message being parsed.
725
+ *
726
+ * The parse completion block will always be invoked inline exactly once.
727
+ *
728
+ * To ensure thread safety, this function can only be called
729
+ * in one of the callback blocks invoked on the framer, or
730
+ * in a block passed to nw_framer_async().
731
+ *
732
+ * @param framer
733
+ * The framer instance object.
734
+ *
735
+ * @param minimum_incomplete_length
736
+ * The minimum number of bytes to parse. If this amount is
737
+ * not available, the parse completion block will be invoked
738
+ * with 0 bytes.
739
+ *
740
+ * @param maximum_length
741
+ * The maximum number of bytes to parse as a contiguous buffer.
742
+ * If temp_buffer is not NULL, then this represents the length
743
+ * of valid bytes in temp_buffer.
744
+ *
745
+ * @param temp_buffer
746
+ * A buffer provided by the caller to copy parse bytes into.
747
+ * If it is not NULL, it must have at least maximum_length bytes
748
+ * available, and any parsed bytes will be copied into the buffer.
749
+ * Any data stored in temp_buffer will be overwritten.
750
+ * If it is NULL, the buffer provided in the completion will not
751
+ * copy unless a copy is required to provide the minimum bytes
752
+ * as a contiguous buffer. The temp_buffer allows the caller to
753
+ * guarantee alignment properties of the buffer it parses.
754
+ *
755
+ * @param parse
756
+ * The completion that provides the bytes to parse, which will
757
+ * be called exactly once.
758
+ *
759
+ * @result
760
+ * Returns true if the parse succeeded, or false if not enough
761
+ * bytes were available.
762
+ */
763
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
764
+ bool
765
+ nw_framer_parse_input(nw_framer_t framer,
766
+ size_t minimum_incomplete_length,
767
+ size_t maximum_length,
768
+ uint8_t * _Nullable temp_buffer,
769
+ NW_NOESCAPE nw_framer_parse_completion_t parse);
770
+
771
+ /*!
772
+ * @function nw_framer_deliver_input
773
+ *
774
+ * @abstract
775
+ * Deliver arbitrary data to the application. This is intended to
776
+ * deliver any data that is generated or transformed by the
777
+ * protocol instance. It will incur a copy of bytes.
778
+ *
779
+ * To ensure thread safety, this function can only be called
780
+ * in one of the callback blocks invoked on the framer, or
781
+ * in a block passed to nw_framer_async().
782
+ *
783
+ * @param framer
784
+ * The framer instance object.
785
+ *
786
+ * @param input_buffer
787
+ * The bytes to deliver to the application. This must be non-NULL.
788
+ * If an empty message needs to be delivered, use
789
+ * nw_framer_deliver_input_no_copy().
790
+ *
791
+ * @param input_length
792
+ * The length of input_buffer. This must be non-zero.
793
+ *
794
+ * @param message
795
+ * The message to associate with the received data.
796
+ *
797
+ * @param is_complete
798
+ * A boolean indicating whether or not this data represents
799
+ * the end of the message.
800
+ */
801
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
802
+ void
803
+ nw_framer_deliver_input(nw_framer_t framer,
804
+ const uint8_t *input_buffer,
805
+ size_t input_length,
806
+ nw_framer_message_t message,
807
+ bool is_complete);
808
+
809
+ /*!
810
+ * @function nw_framer_deliver_input_no_copy
811
+ *
812
+ * @abstract
813
+ * Deliver bytes directly to the application without any
814
+ * transformation or copy. The bytes will start at the current
815
+ * input cursor used for parsing, and will implicitly advance
816
+ * the cursor by the length being delivered.
817
+ *
818
+ * To ensure thread safety, this function can only be called
819
+ * in one of the callback blocks invoked on the framer, or
820
+ * in a block passed to nw_framer_async().
821
+ *
822
+ * @param framer
823
+ * The framer instance object.
824
+ *
825
+ * @param input_length
826
+ * The number of input bytes to deliver. This will advance
827
+ * the parsing cursor by the specified number of bytes.
828
+ *
829
+ * The length may be 0, which can be used to indicate the
830
+ * end of the message if is_complete is set.
831
+ *
832
+ * @param message
833
+ * The message to associate with the received data.
834
+ *
835
+ * @param is_complete
836
+ * A boolean indicating whether or not this data represents
837
+ * the end of the message.
838
+ *
839
+ * @result
840
+ * Returns true if the input was delivered immediately, or
841
+ * false if it will be delivered once more bytes become available.
842
+ */
843
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
844
+ bool
845
+ nw_framer_deliver_input_no_copy(nw_framer_t framer,
846
+ size_t input_length,
847
+ nw_framer_message_t message,
848
+ bool is_complete);
849
+
850
+ /*!
851
+ * @function nw_framer_pass_through_input
852
+ *
853
+ * @abstract
854
+ * Mark the input side of the framer as a pass-through, which
855
+ * means the framer will not be notified of any further input
856
+ * data.
857
+ *
858
+ * To ensure thread safety, this function can only be called
859
+ * in one of the callback blocks invoked on the framer, or
860
+ * in a block passed to nw_framer_async().
861
+ *
862
+ * @param framer
863
+ * The framer instance object.
864
+ */
865
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
866
+ void
867
+ nw_framer_pass_through_input(nw_framer_t framer);
868
+
869
+ /*!
870
+ * @function nw_framer_parse_output
871
+ *
872
+ * @abstract
873
+ * Parse currently available output from a message from the location
874
+ * of the output cursor in the message being parsed.
875
+ *
876
+ * The parse completion block will always be invoked inline exactly once.
877
+ *
878
+ * This function must only be called from within the output handler
879
+ * set with nw_framer_set_output_handler().
880
+ *
881
+ * @param framer
882
+ * The framer instance object.
883
+ *
884
+ * @param minimum_incomplete_length
885
+ * The minimum number of bytes to parse. If this amount is
886
+ * not available, the parse completion block will be invoked
887
+ * with 0 bytes.
888
+ *
889
+ * @param maximum_length
890
+ * The maximum number of bytes to parse as a contiguous buffer.
891
+ * If temp_buffer is not NULL, then this represents the length
892
+ * of valid bytes in temp_buffer.
893
+ *
894
+ * @param temp_buffer
895
+ * A buffer provided by the caller to copy parse bytes into.
896
+ * If it is not NULL, it must have at least maximum_length bytes
897
+ * available, and any parsed bytes will be copied into the buffer.
898
+ * Any data stored in temp_buffer will be overwritten.
899
+ * If it is NULL, the buffer provided in the completion will not
900
+ * copy unless a copy is required to provide the minimum bytes
901
+ * as a contiguous buffer. The temp_buffer allows the caller to
902
+ * guarantee alignment properties of the buffer it parses.
903
+ *
904
+ * @param parse
905
+ * The completion that provides the bytes to parse, which will
906
+ * be called exactly once.
907
+ *
908
+ * @result
909
+ * Returns true if the parse succeeded, or false if not enough
910
+ * bytes were available.
911
+ */
912
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
913
+ bool
914
+ nw_framer_parse_output(nw_framer_t framer,
915
+ size_t minimum_incomplete_length,
916
+ size_t maximum_length,
917
+ uint8_t * _Nullable temp_buffer,
918
+ NW_NOESCAPE nw_framer_parse_completion_t parse);
919
+
920
+ /*!
921
+ * @function nw_framer_write_output
922
+ *
923
+ * @abstract
924
+ * Write arbitrary bytes as part of an outbound message. This
925
+ * is intended to be used for adding headers around application
926
+ * data, or writing any other data that is generated or transformed
927
+ * by the protocol instance. It does not pass along data directly
928
+ * from the application.
929
+ *
930
+ * This variant will copy bytes.
931
+ *
932
+ * This function may be called as part of any framer callback,
933
+ * not just the output handler.
934
+ *
935
+ * To ensure thread safety, this function can only be called
936
+ * in one of the callback blocks invoked on the framer, or
937
+ * in a block passed to nw_framer_async().
938
+ *
939
+ * @param framer
940
+ * The framer instance object.
941
+ *
942
+ * @param output_buffer
943
+ * The bytes to write.
944
+ *
945
+ * @param output_length
946
+ * The length of output_buffer.
947
+ */
948
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
949
+ void
950
+ nw_framer_write_output(nw_framer_t framer,
951
+ const uint8_t *output_buffer,
952
+ size_t output_length);
953
+
954
+ /*!
955
+ * @function nw_framer_write_output_data
956
+ *
957
+ * @abstract
958
+ * Write arbitrary bytes as part of an outbound message. This
959
+ * is intended to be used for adding headers around application
960
+ * data, or writing any other data that is generated or transformed
961
+ * by the protocol instance. It does not pass along data directly
962
+ * from the application.
963
+ *
964
+ * This variant is the same as nw_framer_write_output(), but allows
965
+ * the implementation to pass its buffer as a dispatch_data_t to
966
+ * avoid a copy.
967
+ *
968
+ * This function may be called as part of any framer callback,
969
+ * not just the output handler.
970
+ *
971
+ * To ensure thread safety, this function can only be called
972
+ * in one of the callback blocks invoked on the framer, or
973
+ * in a block passed to nw_framer_async().
974
+ *
975
+ * @param framer
976
+ * The framer instance object.
977
+ *
978
+ * @param output_data
979
+ * A dispatch_data_t to write.
980
+ */
981
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
982
+ void
983
+ nw_framer_write_output_data(nw_framer_t framer,
984
+ dispatch_data_t output_data);
985
+
986
+ /*!
987
+ * @function nw_framer_write_output_no_copy
988
+ *
989
+ * @abstract
990
+ * Write bytes directly from the application without any
991
+ * transformation or copy. The bytes will start at the current
992
+ * output cursor used for parsing, and will implicitly advance
993
+ * the cursor by the length being written.
994
+ *
995
+ * This function must only be called from within the output handler
996
+ * set with nw_framer_set_output_handler().
997
+ *
998
+ * To ensure thread safety, this function can only be called
999
+ * in one of the callback blocks invoked on the framer, or
1000
+ * in a block passed to nw_framer_async().
1001
+ *
1002
+ * @param framer
1003
+ * The framer instance object.
1004
+ *
1005
+ * @param output_length
1006
+ * The number of application bytes to write. This will advance
1007
+ * the parsing cursor by the specified number of bytes.
1008
+ *
1009
+ * @return
1010
+ * Returns true if the write could be completed, otherwise
1011
+ * false if the call was made from an invalid context
1012
+ * or with an invalid number of bytes.
1013
+ */
1014
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1015
+ bool
1016
+ nw_framer_write_output_no_copy(nw_framer_t framer,
1017
+ size_t output_length);
1018
+
1019
+ /*!
1020
+ * @function nw_framer_pass_through_output
1021
+ *
1022
+ * @abstract
1023
+ * Mark the output side of the framer as a pass-through, which
1024
+ * means the framer will not be notified of any further output
1025
+ * data.
1026
+ *
1027
+ * To ensure thread safety, this function can only be called
1028
+ * in one of the callback blocks invoked on the framer, or
1029
+ * in a block passed to nw_framer_async().
1030
+ *
1031
+ * @param framer
1032
+ * The framer instance object.
1033
+ */
1034
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1035
+ void
1036
+ nw_framer_pass_through_output(nw_framer_t framer);
1037
+
1038
+ #define NW_FRAMER_WAKEUP_TIME_FOREVER (~0ull)
1039
+
1040
+ /*!
1041
+ * @function nw_framer_schedule_wakeup
1042
+ *
1043
+ * @abstract
1044
+ * Schedule a wakeup on the framer instance for a number of
1045
+ * milliseconds into the future. If this is called multiple
1046
+ * times before the timeout is reached, the new value replaces
1047
+ * the previous value.
1048
+ *
1049
+ * To ensure thread safety, this function can only be called
1050
+ * in one of the callback blocks invoked on the framer, or
1051
+ * in a block passed to nw_framer_async().
1052
+ *
1053
+ * @param framer
1054
+ * The framer instance object.
1055
+ *
1056
+ * @param milliseconds
1057
+ * The number of milliseconds into the future at which to
1058
+ * invoke the wakeup handler. Pass the reserved value
1059
+ * NW_FRAMER_WAKEUP_TIME_FOREVER to push the wakeup timer
1060
+ * out to "forever", effectively unscheduling the timer.
1061
+ */
1062
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1063
+ void
1064
+ nw_framer_schedule_wakeup(nw_framer_t framer,
1065
+ uint64_t milliseconds);
1066
+
1067
+ /*!
1068
+ * @typedef nw_framer_block_t
1069
+ *
1070
+ * @abstract
1071
+ * A block to perform actions on a framer's scheduling context.
1072
+ */
1073
+ typedef void (^nw_framer_block_t)(void);
1074
+
1075
+ /*!
1076
+ * @function nw_framer_async
1077
+ *
1078
+ * @abstract
1079
+ * Schedule a block asynchronously on the framer instance. This
1080
+ * must be used anytime the caller wants to perform any other
1081
+ * action on the framer instance while not directly in the call stack
1082
+ * of a callback from the framer.
1083
+ *
1084
+ * @param framer
1085
+ * The framer instance object.
1086
+ *
1087
+ * @param async_block
1088
+ * A block to execute on the correct scheduling context for the
1089
+ * framer instance.
1090
+ */
1091
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1092
+ void
1093
+ nw_framer_async(nw_framer_t framer,
1094
+ nw_framer_block_t async_block);
1095
+
1096
+ #endif // __BLOCKS__
1097
+
1098
+ #pragma mark - Framer Implementation Accessors
1099
+
1100
+ /*!
1101
+ * @function nw_framer_copy_remote_endpoint
1102
+ *
1103
+ * @abstract
1104
+ * Access the remote endpoint being used for a given
1105
+ * instance of a framer.
1106
+ *
1107
+ * To ensure thread safety, this function can only be called
1108
+ * in one of the callback blocks invoked on the framer, or
1109
+ * in a block passed to nw_framer_async().
1110
+ *
1111
+ * @param framer
1112
+ * The framer instance.
1113
+ *
1114
+ * @return
1115
+ * Returns a retained endpoint object representing
1116
+ * the remote side of a connection.
1117
+ */
1118
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1119
+ NW_RETURNS_RETAINED nw_endpoint_t
1120
+ nw_framer_copy_remote_endpoint(nw_framer_t framer);
1121
+
1122
+ /*!
1123
+ * @function nw_framer_copy_local_endpoint
1124
+ *
1125
+ * @abstract
1126
+ * Access the local endpoint being used for a given
1127
+ * instance of a framer.
1128
+ *
1129
+ * To ensure thread safety, this function can only be called
1130
+ * in one of the callback blocks invoked on the framer, or
1131
+ * in a block passed to nw_framer_async().
1132
+ *
1133
+ * @param framer
1134
+ * The framer instance.
1135
+ *
1136
+ * @return
1137
+ * Returns a retained endpoint object representing
1138
+ * the local side of a connection.
1139
+ */
1140
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1141
+ NW_RETURNS_RETAINED nw_endpoint_t
1142
+ nw_framer_copy_local_endpoint(nw_framer_t framer);
1143
+
1144
+ /*!
1145
+ * @function nw_framer_copy_parameters
1146
+ *
1147
+ * @abstract
1148
+ * Access the parameters being used for a given
1149
+ * instance of a framer.
1150
+ *
1151
+ * To ensure thread safety, this function can only be called
1152
+ * in one of the callback blocks invoked on the framer, or
1153
+ * in a block passed to nw_framer_async().
1154
+ *
1155
+ * @param framer
1156
+ * The framer instance.
1157
+ *
1158
+ * @return
1159
+ * Returns a retained parameters object.
1160
+ */
1161
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1162
+ NW_RETURNS_RETAINED nw_parameters_t
1163
+ nw_framer_copy_parameters(nw_framer_t framer);
1164
+
1165
+
1166
+ /*!
1167
+ * @function nw_framer_copy_options
1168
+ *
1169
+ * @abstract
1170
+ * Access the protocol options being used for a given
1171
+ * instance of a framer.
1172
+ *
1173
+ * @param framer
1174
+ * The framer instance.
1175
+ *
1176
+ * @return
1177
+ * Returns a retained protocol options object.
1178
+ */
1179
+ API_AVAILABLE(macos(12.3), ios(15.4), watchos(8.4), tvos(15.4))
1180
+ NW_RETURNS_RETAINED nw_protocol_options_t
1181
+ nw_framer_copy_options(nw_framer_t framer);
1182
+
1183
+ NW_ASSUME_NONNULL_END
1184
+
1185
+ __END_DECLS
1186
+
1187
+ #endif // __NW_FRAMER_OPTIONS_H__