peachsim 0.1.1716 → 0.1.1728
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.
- package/README.md +21 -3
- package/cli/app-bundle-resources.ts +2 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/app-splash.ts +4 -4
- package/cli/app-stubs.ts +17 -0
- package/cli/command-registry.ts +1 -0
- package/cli/commands/control.ts +82 -822
- package/cli/commands/daemon.ts +8 -0
- package/cli/commands/detox.ts +3 -0
- package/cli/commands/doctor.ts +19 -2
- package/cli/commands/inspect/actions.ts +74 -14
- package/cli/commands/inspect/core.ts +5 -1
- package/cli/commands/inspect/settling.ts +5 -2
- package/cli/commands/inspect/wait-ready.ts +6 -0
- package/cli/commands/inspect.ts +48 -45
- package/cli/commands/kotlin.ts +12 -2
- package/cli/commands/package.ts +750 -0
- package/cli/commands/serve.ts +6 -0
- package/cli/commands/shell-url.ts +834 -0
- package/cli/commands/swift.ts +42 -102
- package/cli/commands/test.ts +20 -0
- package/cli/commands/upload.ts +1 -1
- package/cli/device-option.ts +1 -1
- package/cli/main.ts +13 -1
- package/cli/native-input.ts +199 -0
- package/cli/outbound-endpoints.ts +26 -1
- package/cli/packaged-app-launcher.ts +95 -0
- package/cli/scene-video.ts +13 -6
- package/detox/index.ts +187 -23
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +38000 -31658
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +184 -60
- package/dist-lib/dev-bundle-resolution.cjs +14 -13
- package/dist-lib/expo-swift-bundle.cjs +18199 -11834
- package/dist-lib/expo-swift-metadata.cjs +4 -1
- package/dist-lib/expo-swift-metadata.mjs +3 -1
- package/dist-lib/home-paths.cjs +21 -2
- package/dist-lib/host/bridge-host.cjs +26509 -23850
- package/dist-lib/host/fetch-proxy-handler.cjs +221 -222
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +876 -389
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +127 -16
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +883 -404
- package/dist-lib/native-app-identity-project.cjs +694 -280
- package/dist-lib/native-app-identity-project.mjs +490 -83
- package/dist-lib/native-app-identity.cjs +13 -2
- package/dist-lib/native-app-identity.mjs +13 -2
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +28 -23
- package/dist-lib/public-origins-lib.json +392 -224
- package/dist-lib/react-native-host-modules.cjs +32 -2
- package/dist-lib/react-native-host-modules.mjs +32 -2
- package/dist-lib/reap-browser.cjs +12 -4
- package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
- package/dist-lib/sdk.cjs +17 -7
- package/dist-lib/sdk.mjs +16 -7
- package/dist-lib/skills.cjs +61838 -47851
- package/dist-lib/swift-compile.cjs +583 -360
- package/dist-lib/swift-compile.mjs +496 -275
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +105 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +4453 -2231
- package/dist-lib/vite.cjs +230 -228
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +7 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -11
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +23 -1
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +12 -25
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +75 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
- package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/ioccom.h +99 -0
- package/sdk/ios/usr/include/sys/syslog.h +236 -0
- package/sdk/ios/usr/include/syslog.h +24 -0
- package/sdk/ios/wasm/include/fcntl.h +4 -2
- package/sdk/ios/wasm/include/stdio.h +24 -0
- package/sdk/ios/wasm/include/stdlib.h +32 -7
- package/sdk/ios/wasm/include/sys/file.h +7 -0
- package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
- package/sdk/ios/wasm/include/sys/syscall.h +9 -0
- package/sdk/ios/wasm/include/sys/time.h +10 -0
- package/sdk/ios/wasm/include/unistd.h +12 -3
- package/sdk/native-hashes.json +1 -0
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-test/SKILL.md +7 -3
- package/src/admitted-mac-build.ts +3 -0
- package/src/android-app-identity.ts +18 -0
- package/src/android-root-module.ts +9 -9
- package/src/appPackageContract.ts +81 -0
- package/src/bridge-contract.ts +50 -0
- package/src/bundle-channel.mjs +21 -4
- package/src/dev-bundle-resolution.ts +7 -27
- package/src/dom-source-reference.ts +15 -0
- package/src/expo-discovery-cache.ts +127 -23
- package/src/expo-manifest-body.ts +33 -0
- package/src/expo-native-workspace.ts +38 -13
- package/src/expo-swift-host.ts +264 -62
- package/src/expoSwiftContract.ts +3 -0
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +35 -1
- package/src/host/app-package-handler.ts +47 -0
- package/src/host/bridge-host.ts +3 -0
- package/src/host/staged-host-files.ts +18 -0
- package/src/index.ts +3 -0
- package/src/kotlin-host.ts +21 -18
- package/src/kotlin-instance-source.ts +126 -0
- package/src/menu.ts +7 -0
- package/src/native-app-identity-project.ts +7 -2
- package/src/native-app-identity.ts +11 -0
- package/src/native-firebase-config.ts +24 -1
- package/src/nitro-adapter.lock.json +268 -268
- package/src/nitro-bundle.ts +8 -0
- package/src/nitro-compile.ts +35 -9
- package/src/nitro-dependencies.ts +21 -19
- package/src/nitro-source.ts +4 -0
- package/src/nitroContract.ts +7 -0
- package/src/react-native-bridge-modules.ts +68 -42
- package/src/react-native-host-modules.ts +31 -1
- package/src/reactNativeConfigurationContract.ts +14 -0
- package/src/reap-browser.ts +15 -3
- package/src/sdk.ts +5 -0
- package/src/settingsContract.ts +27 -1
- package/src/sim-client.ts +4 -1
- package/src/storageSnapshotContract.ts +3 -0
- package/src/swift-compile.ts +221 -41
- package/src/swift-coverage/provenance.ts +1 -0
- package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
- package/src/swift-coverage/xcode-assets.ts +89 -131
- package/src/swift-coverage/xcode.ts +1 -1
- package/src/swift-cxx-reachable.ts +2 -1
- package/src/swift-distribution.lock.json +14 -13
- package/src/swift-host.ts +95 -22
- package/src/swift-icu.ts +1 -1
- package/src/swift-link-roots.ts +118 -0
- package/src/swift-objc-compile.ts +144 -22
- package/src/swift-objc-import.ts +6 -0
- package/src/swift-objc-standin.ts +2 -14
- package/src/swift-package-manifest.ts +14 -6
- package/src/swift-packages.ts +75 -11
- package/src/swift-pdf-raster.ts +1 -0
- package/src/swift-root-lock.ts +17 -1
- package/src/swift-source-pods.ts +2 -10
- package/src/swift-standin-emit.ts +592 -57
- package/src/swift-standins.ts +430 -49
- package/src/swift-submit.ts +3 -1
- package/src/swift-toolchain.ts +140 -17
- package/src/turbo-codegen-intake.ts +91 -0
- package/src/vite-plugin-one.ts +13 -9
- package/src/vite-plugin.ts +28 -15
- package/src/xcode-project.ts +223 -22
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
/*
|
|
2
|
+
File: CFNetwork/CFHTTPMessage.h
|
|
3
|
+
|
|
4
|
+
Contains: CoreFoundation Network socket streams header
|
|
5
|
+
|
|
6
|
+
Copyright: Copyright (c) 2001-2013 Apple Inc. All rights reserved.
|
|
7
|
+
|
|
8
|
+
Bugs?: For bug reports, consult the following page on
|
|
9
|
+
the World Wide Web:
|
|
10
|
+
|
|
11
|
+
http://developer.apple.com/bugreporter/
|
|
12
|
+
|
|
13
|
+
*/
|
|
14
|
+
#ifndef __CFHTTPMESSAGE__
|
|
15
|
+
#define __CFHTTPMESSAGE__
|
|
16
|
+
|
|
17
|
+
#ifndef __CFNETWORKDEFS__
|
|
18
|
+
#include <CFNetwork/CFNetworkDefs.h>
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#ifndef __CFSTRING__
|
|
22
|
+
#include <CoreFoundation/CFString.h>
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
#ifndef __CFURL__
|
|
26
|
+
#include <CoreFoundation/CFURL.h>
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
#if PRAGMA_ONCE
|
|
32
|
+
#pragma once
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
CF_EXTERN_C_BEGIN
|
|
36
|
+
CF_ASSUME_NONNULL_BEGIN
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* kCFHTTPVersion1_0
|
|
40
|
+
*
|
|
41
|
+
* Discussion:
|
|
42
|
+
* Version string for HTTP 1.0.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
CFN_EXPORT const CFStringRef kCFHTTPVersion1_0 CF_AVAILABLE(10_1, 2_0);
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* kCFHTTPVersion1_1
|
|
49
|
+
*
|
|
50
|
+
* Discussion:
|
|
51
|
+
* Version string for HTTP 1.1.
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
CFN_EXPORT const CFStringRef kCFHTTPVersion1_1 CF_AVAILABLE(10_1, 2_0);
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* kCFHTTPVersion2_0
|
|
58
|
+
*
|
|
59
|
+
* Discussion:
|
|
60
|
+
* Version string for HTTP 2.0.
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
CFN_EXPORT const CFStringRef kCFHTTPVersion2_0 CF_AVAILABLE(10_10, 8_0);
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* kCFHTTPVersion3_0
|
|
67
|
+
*
|
|
68
|
+
* Discussion:
|
|
69
|
+
* Version string for HTTP 3.0.
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
CFN_EXPORT const CFStringRef kCFHTTPVersion3_0 CF_AVAILABLE(10_15, 13_0);
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* kCFHTTPAuthenticationSchemeBasic
|
|
76
|
+
*
|
|
77
|
+
* Discussion:
|
|
78
|
+
* HTTP Basic authentication scheme.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeBasic CF_AVAILABLE(10_2, 2_0);
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* kCFHTTPAuthenticationSchemeDigest
|
|
85
|
+
*
|
|
86
|
+
* Discussion:
|
|
87
|
+
* HTTP Digest Access authentication scheme.
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeDigest CF_AVAILABLE(10_2, 2_0);
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
* kCFHTTPAuthenticationSchemeNTLM
|
|
94
|
+
*
|
|
95
|
+
* Discussion:
|
|
96
|
+
* HTTP NTLM authentication scheme.
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeNTLM CF_AVAILABLE(10_5, 2_0);
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* kCFHTTPAuthenticationSchemeKerberos
|
|
103
|
+
*
|
|
104
|
+
* Discussion:
|
|
105
|
+
* HTTP Negotiate authentication scheme.
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeKerberos CF_AVAILABLE(10_5, 2_0);
|
|
109
|
+
|
|
110
|
+
/*
|
|
111
|
+
* kCFHTTPAuthenticationSchemeNegotiate
|
|
112
|
+
*
|
|
113
|
+
* Discussion:
|
|
114
|
+
* HTTP Negotiate authentication scheme.
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeNegotiate CF_AVAILABLE(10_5, 2_0);
|
|
118
|
+
|
|
119
|
+
/*
|
|
120
|
+
* kCFHTTPAuthenticationSchemeNegotiate2
|
|
121
|
+
*
|
|
122
|
+
* Discussion:
|
|
123
|
+
* HTTP Negotiate v2 authentication scheme.
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeNegotiate2 CF_AVAILABLE(10_6, 3_0);
|
|
127
|
+
|
|
128
|
+
/*
|
|
129
|
+
* kCFHTTPAuthenticationSchemeXMobileMeAuthToken
|
|
130
|
+
*
|
|
131
|
+
* Discussion:
|
|
132
|
+
* HTTP XMobileMeAuthToken authentication scheme.
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
CFN_EXPORT const CFStringRef kCFHTTPAuthenticationSchemeXMobileMeAuthToken CF_AVAILABLE(10_6, 4_3);
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
* CFHTTPMessageRef
|
|
139
|
+
*
|
|
140
|
+
* Discussion:
|
|
141
|
+
* This is the type of a reference to an HTTP message. An HTTP
|
|
142
|
+
* message can be a request or a response.
|
|
143
|
+
*/
|
|
144
|
+
typedef struct __CFHTTPMessage* CFHTTPMessageRef;
|
|
145
|
+
|
|
146
|
+
/*
|
|
147
|
+
* CFHTTPMessageGetTypeID()
|
|
148
|
+
*
|
|
149
|
+
* Discussion:
|
|
150
|
+
* Return the unique type for this class.
|
|
151
|
+
*
|
|
152
|
+
* Mac OS X threading:
|
|
153
|
+
* Thread safe
|
|
154
|
+
*
|
|
155
|
+
* Result:
|
|
156
|
+
* A unique CFType for CFHTTPMessage.
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
CFN_EXPORT CFTypeID
|
|
160
|
+
CFHTTPMessageGetTypeID(void) CF_AVAILABLE(10_1, 2_0);
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
* CFHTTPMessageCreateRequest()
|
|
165
|
+
*
|
|
166
|
+
* Discussion:
|
|
167
|
+
* Create an HTTPMessage from an HTTP method, url and version.
|
|
168
|
+
*
|
|
169
|
+
* Mac OS X threading:
|
|
170
|
+
* Thread safe
|
|
171
|
+
*
|
|
172
|
+
* Parameters:
|
|
173
|
+
*
|
|
174
|
+
* alloc:
|
|
175
|
+
* A pointer to the CFAllocator which should be used to allocate
|
|
176
|
+
* memory for the CF read stream and its storage for values. If
|
|
177
|
+
* this reference is not a valid CFAllocator, the behavior is
|
|
178
|
+
* undefined.
|
|
179
|
+
*
|
|
180
|
+
* requestMethod:
|
|
181
|
+
* A pointer to a CFString indicating the method of request. For a
|
|
182
|
+
* "GET" request, for example, the value would be CFSTR("GET").
|
|
183
|
+
*
|
|
184
|
+
* url:
|
|
185
|
+
* A pointer to a CFURL structure created any of the several
|
|
186
|
+
* CFURLCreate... functions. If this parameter is not a pointer
|
|
187
|
+
* to a valid CFURL structure, the behavior is undefined.
|
|
188
|
+
*
|
|
189
|
+
* httpVersion:
|
|
190
|
+
* A pointer to a CFString indicating the version of request.
|
|
191
|
+
*
|
|
192
|
+
* Result:
|
|
193
|
+
* A pointer to the CFHTTPMessage created, or NULL if failed. It is
|
|
194
|
+
* caller's responsibility to release the memory allocated for the
|
|
195
|
+
* message.
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
CFN_EXPORT CFHTTPMessageRef
|
|
199
|
+
CFHTTPMessageCreateRequest(CFAllocatorRef __nullable alloc, CFStringRef requestMethod, CFURLRef url, CFStringRef httpVersion) CF_AVAILABLE(10_1, 2_0);
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/*
|
|
203
|
+
* CFHTTPMessageCreateResponse()
|
|
204
|
+
*
|
|
205
|
+
* Discussion:
|
|
206
|
+
* Create an HTTPMessage from an HTTP status code, description and
|
|
207
|
+
* version.
|
|
208
|
+
*
|
|
209
|
+
* Mac OS X threading:
|
|
210
|
+
* Thread safe
|
|
211
|
+
*
|
|
212
|
+
* Parameters:
|
|
213
|
+
*
|
|
214
|
+
* alloc:
|
|
215
|
+
* A pointer to the CFAllocator which should be used to allocate
|
|
216
|
+
* memory for the CF read stream and its storage for values. If
|
|
217
|
+
* this reference is not a valid CFAllocator, the behavior is
|
|
218
|
+
* undefined.
|
|
219
|
+
*
|
|
220
|
+
* statusCode:
|
|
221
|
+
* An integer status code for the response.
|
|
222
|
+
*
|
|
223
|
+
* statusDescription:
|
|
224
|
+
* A pointer to a CFString for the status. Pass NULL to use the
|
|
225
|
+
* standard description for the given status code, as found in RFC
|
|
226
|
+
* 2616.
|
|
227
|
+
*
|
|
228
|
+
* httpVersion:
|
|
229
|
+
* A pointer to a CFString for the HTTP version.
|
|
230
|
+
*
|
|
231
|
+
* Result:
|
|
232
|
+
* A pointer to the CFHTTPMessage created, or NULL if failed. It is
|
|
233
|
+
* caller's responsibility to release the memory allocated for the
|
|
234
|
+
* message.
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
CFN_EXPORT CFHTTPMessageRef
|
|
238
|
+
CFHTTPMessageCreateResponse(
|
|
239
|
+
CFAllocatorRef __nullable alloc,
|
|
240
|
+
CFIndex statusCode,
|
|
241
|
+
CFStringRef __nullable statusDescription,
|
|
242
|
+
CFStringRef httpVersion) CF_AVAILABLE(10_1, 2_0);
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
/*
|
|
246
|
+
* CFHTTPMessageCreateEmpty()
|
|
247
|
+
*
|
|
248
|
+
* Discussion:
|
|
249
|
+
* Creates an empty request or response, which you can then append
|
|
250
|
+
* bytes to via CFHTTPMessageAppendBytes().
|
|
251
|
+
*
|
|
252
|
+
* Mac OS X threading:
|
|
253
|
+
* Thread safe
|
|
254
|
+
*
|
|
255
|
+
* Parameters:
|
|
256
|
+
*
|
|
257
|
+
* alloc:
|
|
258
|
+
* A pointer to the CFAllocator which should be used to allocate
|
|
259
|
+
* memory for the CF read stream and its storage for values. If
|
|
260
|
+
* this reference is not a valid CFAllocator, the behavior is
|
|
261
|
+
* undefined.
|
|
262
|
+
*
|
|
263
|
+
* isRequest:
|
|
264
|
+
* A boolean. Pass kCFBooleanTrue if the message should be a
|
|
265
|
+
* request.
|
|
266
|
+
*
|
|
267
|
+
* Result:
|
|
268
|
+
* A pointer to the CFHTTPMessage created, or NULL if failed. It is
|
|
269
|
+
* caller's responsibility to release the memory allocated for the
|
|
270
|
+
* message.
|
|
271
|
+
*
|
|
272
|
+
*/
|
|
273
|
+
CFN_EXPORT CFHTTPMessageRef
|
|
274
|
+
CFHTTPMessageCreateEmpty(CFAllocatorRef __nullable alloc, Boolean isRequest) CF_AVAILABLE(10_1, 2_0);
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
/*
|
|
278
|
+
* CFHTTPMessageCreateCopy()
|
|
279
|
+
*
|
|
280
|
+
* Discussion:
|
|
281
|
+
* Creates a copy of a CFHTTPMessage.
|
|
282
|
+
*
|
|
283
|
+
* Mac OS X threading:
|
|
284
|
+
* Not thread safe
|
|
285
|
+
*
|
|
286
|
+
* Parameters:
|
|
287
|
+
*
|
|
288
|
+
* alloc:
|
|
289
|
+
* A pointer to the CFAllocator which should be used to allocate
|
|
290
|
+
* memory for the CF read stream and its storage for values. If
|
|
291
|
+
* this reference is not a valid CFAllocator, the behavior is
|
|
292
|
+
* undefined.
|
|
293
|
+
*
|
|
294
|
+
* message:
|
|
295
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
296
|
+
* NULL, the behavior is undefined.
|
|
297
|
+
*
|
|
298
|
+
* Result:
|
|
299
|
+
* A pointer to the CFHTTPMessage created, or NULL if failed. It is
|
|
300
|
+
* caller's responsibility to release the memory allocated for the
|
|
301
|
+
* message.
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
CFN_EXPORT CFHTTPMessageRef
|
|
305
|
+
CFHTTPMessageCreateCopy(CFAllocatorRef __nullable alloc, CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* CFHTTPMessageIsRequest()
|
|
310
|
+
*
|
|
311
|
+
* Discussion:
|
|
312
|
+
* Returns whether the CFHTTPMessage is a request or a response.
|
|
313
|
+
*
|
|
314
|
+
* Mac OS X threading:
|
|
315
|
+
* Not thread safe
|
|
316
|
+
*
|
|
317
|
+
* Parameters:
|
|
318
|
+
*
|
|
319
|
+
* message:
|
|
320
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
321
|
+
* NULL, the behavior is undefined.
|
|
322
|
+
*
|
|
323
|
+
* Result:
|
|
324
|
+
* A Boolean. A value of kCFBooleanTrue indicates the message is a
|
|
325
|
+
* request. A value of kCFBooleanFalse indicates the message is a
|
|
326
|
+
* response.
|
|
327
|
+
*
|
|
328
|
+
*/
|
|
329
|
+
CFN_EXPORT Boolean
|
|
330
|
+
CFHTTPMessageIsRequest(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/*
|
|
334
|
+
* CFHTTPMessageCopyVersion()
|
|
335
|
+
*
|
|
336
|
+
* Discussion:
|
|
337
|
+
* Returns the HTTP version.
|
|
338
|
+
*
|
|
339
|
+
* Mac OS X threading:
|
|
340
|
+
* Not thread safe
|
|
341
|
+
*
|
|
342
|
+
* Parameters:
|
|
343
|
+
*
|
|
344
|
+
* message:
|
|
345
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
346
|
+
* NULL, the behavior is undefined.
|
|
347
|
+
*
|
|
348
|
+
* Result:
|
|
349
|
+
* A pointer to a CFString, or NULL if failed. It is caller's
|
|
350
|
+
* responsibility to release the memory allocated for the string.
|
|
351
|
+
*
|
|
352
|
+
*/
|
|
353
|
+
CFN_EXPORT CFStringRef
|
|
354
|
+
CFHTTPMessageCopyVersion(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
/*
|
|
358
|
+
* CFHTTPMessageCopyBody()
|
|
359
|
+
*
|
|
360
|
+
* Discussion:
|
|
361
|
+
* Returns the body of the message.
|
|
362
|
+
*
|
|
363
|
+
* Mac OS X threading:
|
|
364
|
+
* Not thread safe
|
|
365
|
+
*
|
|
366
|
+
* Parameters:
|
|
367
|
+
*
|
|
368
|
+
* message:
|
|
369
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
370
|
+
* NULL, the behavior is undefined.
|
|
371
|
+
*
|
|
372
|
+
* Result:
|
|
373
|
+
* A pointer to a CFData, or NULL if failed. It is caller's
|
|
374
|
+
* responsibility to release the memory allocated for the data.
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
377
|
+
CFN_EXPORT __nullable CFDataRef
|
|
378
|
+
CFHTTPMessageCopyBody(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
/*
|
|
382
|
+
* CFHTTPMessageSetBody()
|
|
383
|
+
*
|
|
384
|
+
* Discussion:
|
|
385
|
+
* Sets the body of the message from a CFData.
|
|
386
|
+
*
|
|
387
|
+
* Mac OS X threading:
|
|
388
|
+
* Not thread safe
|
|
389
|
+
*
|
|
390
|
+
* Parameters:
|
|
391
|
+
*
|
|
392
|
+
* message:
|
|
393
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
394
|
+
* NULL, the behavior is undefined.
|
|
395
|
+
*
|
|
396
|
+
* bodyData:
|
|
397
|
+
* A pointer to a CFData containing the body to be set. If the
|
|
398
|
+
* bodyData is NULL, the behavior is undefined.
|
|
399
|
+
*
|
|
400
|
+
*/
|
|
401
|
+
CFN_EXPORT void
|
|
402
|
+
CFHTTPMessageSetBody(CFHTTPMessageRef message, CFDataRef bodyData) CF_AVAILABLE(10_1, 2_0);
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
/*
|
|
406
|
+
* CFHTTPMessageCopyHeaderFieldValue()
|
|
407
|
+
*
|
|
408
|
+
* Discussion:
|
|
409
|
+
* Returns the specified header field.
|
|
410
|
+
*
|
|
411
|
+
* Mac OS X threading:
|
|
412
|
+
* Not thread safe
|
|
413
|
+
*
|
|
414
|
+
* Parameters:
|
|
415
|
+
*
|
|
416
|
+
* message:
|
|
417
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
418
|
+
* NULL, the behavior is undefined.
|
|
419
|
+
*
|
|
420
|
+
* headerField:
|
|
421
|
+
* A pointer to the CFString. If the headerField is NULL, the
|
|
422
|
+
* behavior is undefined.
|
|
423
|
+
*
|
|
424
|
+
* Result:
|
|
425
|
+
* A pointer to a CFString, or NULL if failed. It is caller's
|
|
426
|
+
* responsibility to release the memory allocated for the string.
|
|
427
|
+
*
|
|
428
|
+
*/
|
|
429
|
+
CFN_EXPORT __nullable CFStringRef
|
|
430
|
+
CFHTTPMessageCopyHeaderFieldValue(CFHTTPMessageRef message, CFStringRef headerField) CF_AVAILABLE(10_1, 2_0);
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
/*
|
|
434
|
+
* CFHTTPMessageCopyAllHeaderFields()
|
|
435
|
+
*
|
|
436
|
+
* Discussion:
|
|
437
|
+
* Returns a CFDictionary containing all of the header fields.
|
|
438
|
+
*
|
|
439
|
+
* Mac OS X threading:
|
|
440
|
+
* Not thread safe
|
|
441
|
+
*
|
|
442
|
+
* Parameters:
|
|
443
|
+
*
|
|
444
|
+
* message:
|
|
445
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
446
|
+
* NULL, the behavior is undefined.
|
|
447
|
+
*
|
|
448
|
+
* Result:
|
|
449
|
+
* A pointer to a CFDictionary, or NULL if failed. It is caller's
|
|
450
|
+
* responsibility to release the memory allocated for the dictionary.
|
|
451
|
+
*
|
|
452
|
+
*/
|
|
453
|
+
CFN_EXPORT __nullable CFDictionaryRef
|
|
454
|
+
CFHTTPMessageCopyAllHeaderFields(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
/*
|
|
458
|
+
* CFHTTPMessageSetHeaderFieldValue()
|
|
459
|
+
*
|
|
460
|
+
* Discussion:
|
|
461
|
+
* Sets the value of the specified header field.
|
|
462
|
+
*
|
|
463
|
+
* Mac OS X threading:
|
|
464
|
+
* Not thread safe
|
|
465
|
+
*
|
|
466
|
+
* Parameters:
|
|
467
|
+
*
|
|
468
|
+
* message:
|
|
469
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
470
|
+
* NULL, the behavior is undefined.
|
|
471
|
+
*
|
|
472
|
+
* headerField:
|
|
473
|
+
* A pointer to the CFString. If headerField is NULL, the behavior
|
|
474
|
+
* is undefined.
|
|
475
|
+
*
|
|
476
|
+
* value:
|
|
477
|
+
* A pointer to the CFString containing the value to set. Set the
|
|
478
|
+
* value to NULL to remove the header field.
|
|
479
|
+
*
|
|
480
|
+
*/
|
|
481
|
+
CFN_EXPORT void
|
|
482
|
+
CFHTTPMessageSetHeaderFieldValue(CFHTTPMessageRef message, CFStringRef headerField, CFStringRef __nullable value) CF_AVAILABLE(10_1, 2_0);
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
/*
|
|
486
|
+
* CFHTTPMessageAppendBytes()
|
|
487
|
+
*
|
|
488
|
+
* Discussion:
|
|
489
|
+
* Appends the given bytes to the message given (parsing out any
|
|
490
|
+
* control information if appropriate). Returns kCFBooleanFalse if
|
|
491
|
+
* a parsing error occurs while processing the new data.
|
|
492
|
+
*
|
|
493
|
+
* Mac OS X threading:
|
|
494
|
+
* Not thread safe
|
|
495
|
+
*
|
|
496
|
+
* Parameters:
|
|
497
|
+
*
|
|
498
|
+
* message:
|
|
499
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
500
|
+
* NULL, the behavior is undefined.
|
|
501
|
+
*
|
|
502
|
+
* newBytes:
|
|
503
|
+
* A pointer to the bytes. If newBytes is NULL, the behavior is
|
|
504
|
+
* undefined.
|
|
505
|
+
*
|
|
506
|
+
* numBytes:
|
|
507
|
+
* A CFIndex of the number of bytes to append.
|
|
508
|
+
*
|
|
509
|
+
* Result:
|
|
510
|
+
* A Boolean indicating success or failure.
|
|
511
|
+
*
|
|
512
|
+
*/
|
|
513
|
+
CFN_EXPORT Boolean
|
|
514
|
+
CFHTTPMessageAppendBytes(CFHTTPMessageRef message, const UInt8 *newBytes, CFIndex numBytes) CF_AVAILABLE(10_1, 2_0);
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
/*
|
|
518
|
+
* CFHTTPMessageIsHeaderComplete()
|
|
519
|
+
*
|
|
520
|
+
* Discussion:
|
|
521
|
+
* Returns whether further header data is expected by the message.
|
|
522
|
+
*
|
|
523
|
+
* Mac OS X threading:
|
|
524
|
+
* Not thread safe
|
|
525
|
+
*
|
|
526
|
+
* Parameters:
|
|
527
|
+
*
|
|
528
|
+
* message:
|
|
529
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
530
|
+
* NULL, the behavior is undefined.
|
|
531
|
+
*
|
|
532
|
+
* Result:
|
|
533
|
+
* A Boolean. A value of kCFBooleanTrue indicates the header is
|
|
534
|
+
* complete and no further data is expected.
|
|
535
|
+
*
|
|
536
|
+
*/
|
|
537
|
+
CFN_EXPORT Boolean
|
|
538
|
+
CFHTTPMessageIsHeaderComplete(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
/*
|
|
542
|
+
* CFHTTPMessageCopySerializedMessage()
|
|
543
|
+
*
|
|
544
|
+
* Discussion:
|
|
545
|
+
* Creates a self-contained copy of a CFHTTPMessage. This would be
|
|
546
|
+
* suitable for persistent storage or for transmitting over the
|
|
547
|
+
* network independently.
|
|
548
|
+
*
|
|
549
|
+
* Mac OS X threading:
|
|
550
|
+
* Not thread safe
|
|
551
|
+
*
|
|
552
|
+
* Parameters:
|
|
553
|
+
*
|
|
554
|
+
* request:
|
|
555
|
+
* A pointer to the CFHTTPMessage to be serialized.
|
|
556
|
+
*
|
|
557
|
+
* Result:
|
|
558
|
+
* A pointer to a CFData, or NULL if failed. It is caller's
|
|
559
|
+
* responsibility to release the memory allocated for the data.
|
|
560
|
+
*
|
|
561
|
+
*/
|
|
562
|
+
CFN_EXPORT __nullable CFDataRef
|
|
563
|
+
CFHTTPMessageCopySerializedMessage(CFHTTPMessageRef message) CF_AVAILABLE(10_1, 2_0);
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
/*********************/
|
|
567
|
+
/* Request functions */
|
|
568
|
+
/*********************/
|
|
569
|
+
|
|
570
|
+
/*
|
|
571
|
+
* CFHTTPMessageCopyRequestURL()
|
|
572
|
+
*
|
|
573
|
+
* Discussion:
|
|
574
|
+
* Creates a copy of the request URL.
|
|
575
|
+
*
|
|
576
|
+
* Mac OS X threading:
|
|
577
|
+
* Not thread safe
|
|
578
|
+
*
|
|
579
|
+
* Parameters:
|
|
580
|
+
*
|
|
581
|
+
* request:
|
|
582
|
+
* A pointer to the CFHTTPMessage.
|
|
583
|
+
*
|
|
584
|
+
* Result:
|
|
585
|
+
* A pointer to a CFURL, or NULL if failed. It is caller's
|
|
586
|
+
* responsibility to release the memory allocated for the url.
|
|
587
|
+
*
|
|
588
|
+
*/
|
|
589
|
+
CFN_EXPORT __nullable CFURLRef
|
|
590
|
+
CFHTTPMessageCopyRequestURL(CFHTTPMessageRef request) CF_AVAILABLE(10_1, 2_0);
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
/*
|
|
594
|
+
* CFHTTPMessageCopyRequestMethod()
|
|
595
|
+
*
|
|
596
|
+
* Discussion:
|
|
597
|
+
* Creates a copy of the request method.
|
|
598
|
+
*
|
|
599
|
+
* Mac OS X threading:
|
|
600
|
+
* Not thread safe
|
|
601
|
+
*
|
|
602
|
+
* Parameters:
|
|
603
|
+
*
|
|
604
|
+
* request:
|
|
605
|
+
* A pointer to the CFHTTPMessage.
|
|
606
|
+
*
|
|
607
|
+
* Result:
|
|
608
|
+
* A pointer to a CFString, or NULL if failed. It is caller's
|
|
609
|
+
* responsibility to release the memory allocated for the string.
|
|
610
|
+
*
|
|
611
|
+
*/
|
|
612
|
+
CFN_EXPORT __nullable CFStringRef
|
|
613
|
+
CFHTTPMessageCopyRequestMethod(CFHTTPMessageRef request) CF_AVAILABLE(10_1, 2_0);
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
/*
|
|
617
|
+
* CFHTTPMessageAddAuthentication()
|
|
618
|
+
*
|
|
619
|
+
* Discussion:
|
|
620
|
+
* Adds authentication to the request. Tries to modify request to
|
|
621
|
+
* contain the authentication information requested by the failed
|
|
622
|
+
* response (which presumably is a 401 or 407 response).
|
|
623
|
+
*
|
|
624
|
+
* Mac OS X threading:
|
|
625
|
+
* Not thread safe
|
|
626
|
+
*
|
|
627
|
+
* Parameters:
|
|
628
|
+
*
|
|
629
|
+
* request:
|
|
630
|
+
* A pointer to a CFHTTPMessage request.
|
|
631
|
+
*
|
|
632
|
+
* authenticationFailureResponse:
|
|
633
|
+
* A pointer to a CFHTTPMessage of the failed response.
|
|
634
|
+
*
|
|
635
|
+
* username:
|
|
636
|
+
* A pointer to a CFString containing the user name to
|
|
637
|
+
* authenticate.
|
|
638
|
+
*
|
|
639
|
+
* password:
|
|
640
|
+
* A pointer to a CFString containing the password of the user.
|
|
641
|
+
*
|
|
642
|
+
* authenticationScheme:
|
|
643
|
+
* A pointer to a CFString containing the authentication scheme to
|
|
644
|
+
* use to authenticate. If authenticationScheme is NULL, strongest
|
|
645
|
+
* supported scheme listed authenticationFailureResponse will be
|
|
646
|
+
* used.
|
|
647
|
+
*
|
|
648
|
+
* forProxy:
|
|
649
|
+
* A boolean indicating whether the authentication applies to a
|
|
650
|
+
* proxy or not.
|
|
651
|
+
*
|
|
652
|
+
* Result:
|
|
653
|
+
* A pointer to a CFString, or NULL if failed. It is caller's
|
|
654
|
+
* responsibility to release the memory allocated for the string.
|
|
655
|
+
*
|
|
656
|
+
*/
|
|
657
|
+
CFN_EXPORT Boolean
|
|
658
|
+
CFHTTPMessageAddAuthentication(
|
|
659
|
+
CFHTTPMessageRef request,
|
|
660
|
+
CFHTTPMessageRef __nullable authenticationFailureResponse,
|
|
661
|
+
CFStringRef username,
|
|
662
|
+
CFStringRef password,
|
|
663
|
+
CFStringRef __nullable authenticationScheme,
|
|
664
|
+
Boolean forProxy) CF_AVAILABLE(10_1, 2_0);
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
/**********************/
|
|
668
|
+
/* Response functions */
|
|
669
|
+
/**********************/
|
|
670
|
+
|
|
671
|
+
/*
|
|
672
|
+
* CFHTTPMessageGetResponseStatusCode()
|
|
673
|
+
*
|
|
674
|
+
* Discussion:
|
|
675
|
+
* Returns the status code for the response.
|
|
676
|
+
*
|
|
677
|
+
* Mac OS X threading:
|
|
678
|
+
* Not thread safe
|
|
679
|
+
*
|
|
680
|
+
* Parameters:
|
|
681
|
+
*
|
|
682
|
+
* response:
|
|
683
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
684
|
+
* NULL, the behavior is undefined.
|
|
685
|
+
*
|
|
686
|
+
* Result:
|
|
687
|
+
* A UInt32 indicating the status code.
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
690
|
+
CFN_EXPORT CFIndex
|
|
691
|
+
CFHTTPMessageGetResponseStatusCode(CFHTTPMessageRef response) CF_AVAILABLE(10_1, 2_0);
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
/*
|
|
695
|
+
* CFHTTPMessageCopyResponseStatusLine()
|
|
696
|
+
*
|
|
697
|
+
* Discussion:
|
|
698
|
+
* Returns the status line for the response.
|
|
699
|
+
*
|
|
700
|
+
* Mac OS X threading:
|
|
701
|
+
* Not thread safe
|
|
702
|
+
*
|
|
703
|
+
* Parameters:
|
|
704
|
+
*
|
|
705
|
+
* response:
|
|
706
|
+
* A pointer to the CFHTTPMessage to be copied. If the message is
|
|
707
|
+
* NULL, the behavior is undefined.
|
|
708
|
+
*
|
|
709
|
+
* Result:
|
|
710
|
+
* A CFString indicating the status code, or NULL if failed. It is
|
|
711
|
+
* caller's responsibility to release the memory allocated for the
|
|
712
|
+
* string.
|
|
713
|
+
*
|
|
714
|
+
*/
|
|
715
|
+
CFN_EXPORT __nullable CFStringRef
|
|
716
|
+
CFHTTPMessageCopyResponseStatusLine(CFHTTPMessageRef response) CF_AVAILABLE(10_1, 2_0);
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
CF_ASSUME_NONNULL_END
|
|
721
|
+
CF_EXTERN_C_END
|
|
722
|
+
|
|
723
|
+
#endif /* __CFHTTPMESSAGE__ */
|
|
724
|
+
|