Duplicate global variables: WTF::asciiCaseFoldTable
[WebKit-https.git] / Source / WebCore / PAL / pal / spi / cf / CFNetworkSPI.h
1 /*
2  * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #pragma clang system_header
27
28 #pragma once
29
30 #include <CFNetwork/CFNetwork.h>
31 #include <pal/spi/cf/CFNetworkConnectionCacheSPI.h>
32
33 #if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
34
35 #include <CFNetwork/CFHTTPCookiesPriv.h>
36 #include <CFNetwork/CFHTTPStream.h>
37 #include <CFNetwork/CFProxySupportPriv.h>
38 #include <CFNetwork/CFURLCachePriv.h>
39 #include <CFNetwork/CFURLConnectionPriv.h>
40 #include <CFNetwork/CFURLCredentialStorage.h>
41 #include <CFNetwork/CFURLProtocolPriv.h>
42 #include <CFNetwork/CFURLRequestPriv.h>
43 #include <CFNetwork/CFURLResponsePriv.h>
44 #include <CFNetwork/CFURLStorageSession.h>
45
46 #if PLATFORM(WIN)
47
48 WTF_EXTERN_C_BEGIN
49
50 CFN_EXPORT CFStringRef _CFNetworkErrorGetLocalizedDescription(CFIndex);
51
52 extern const CFStringRef _kCFWindowsSSLLocalCert;
53 extern const CFStringRef _kCFStreamPropertyWindowsSSLCertInfo;
54 extern const CFStringRef _kCFWindowsSSLPeerCert;
55
56 WTF_EXTERN_C_END
57
58 #endif
59
60 // FIXME: Remove the defined(__OBJC__)-guard once we fix <rdar://problem/19033610>.
61 #if defined(__OBJC__) && PLATFORM(COCOA)
62 #import <CFNetwork/CFNSURLConnection.h>
63 #endif
64
65 // This only needs to be declared on macOS 10.12 Sierra because
66 // it will never appear in those SDK headers.  See also
67 // HAVE(CFNETWORK_OVERRIDE_SESSION_COOKIE_ACCEPT_POLICY).
68 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 101200
69 @interface NSHTTPCookieStorage ()
70 @property (nonatomic, readwrite) BOOL _overrideSessionCookieAcceptPolicy;
71 @end
72 #endif
73
74 #else // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
75
76 typedef CF_ENUM(int64_t, _TimingDataOptions)
77 {
78     _TimingDataOptionsEnableW3CNavigationTiming = (1 << 0)
79 };
80
81 enum CFURLCacheStoragePolicy {
82     kCFURLCacheStorageAllowed = 0,
83     kCFURLCacheStorageAllowedInMemoryOnly = 1,
84     kCFURLCacheStorageNotAllowed = 2
85 };
86 typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
87
88 typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
89 typedef const struct _CFURLCache* CFURLCacheRef;
90 typedef const struct _CFURLCredential* CFURLCredentialRef;
91 typedef const struct _CFURLRequest* CFURLRequestRef;
92 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
93 typedef const struct __CFData* CFDataRef;
94 typedef const struct OpaqueCFHTTPCookie* CFHTTPCookieRef;
95 typedef struct _CFURLConnection* CFURLConnectionRef;
96 typedef struct _CFURLCredentialStorage* CFURLCredentialStorageRef;
97 typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
98 typedef struct _CFURLRequest* CFMutableURLRequestRef;
99 typedef struct _CFURLResponse* CFURLResponseRef;
100 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
101 typedef CFIndex CFURLRequestPriority;
102 typedef int CFHTTPCookieStorageAcceptPolicy;
103
104 #ifdef __BLOCKS__
105 typedef void (^CFCachedURLResponseCallBackBlock)(CFCachedURLResponseRef);
106 #endif
107
108 #if defined(__OBJC__)
109
110 @interface NSURLCache ()
111 - (CFURLCacheRef)_CFURLCache;
112 @end
113
114 @interface NSCachedURLResponse ()
115 - (id)_initWithCFCachedURLResponse:(CFCachedURLResponseRef)cachedResponse;
116 - (CFCachedURLResponseRef)_CFCachedURLResponse;
117 @end
118
119 @interface NSHTTPCookie ()
120 - (CFHTTPCookieRef)_CFHTTPCookie;
121 + (CFArrayRef __nullable)_ns2cfCookies:(NSArray * __nullable)nsCookies CF_RETURNS_RETAINED;
122 - (CFHTTPCookieRef __nullable)_GetInternalCFHTTPCookie;
123 @property (nullable, readonly, copy) NSString *_storagePartition;
124 @end
125
126 @interface NSHTTPCookieStorage ()
127 - (id)_initWithIdentifier:(NSString *)identifier private:(bool)isPrivate;
128 - (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition completionHandler:(void (^)(NSArray *))completionHandler;
129 - (void)_getCookiesForURL:(NSURL *)url mainDocumentURL:(NSURL *)mainDocumentURL partition:(NSString *)partition policyProperties:(NSDictionary*)props completionHandler:(void (^)(NSArray *))completionHandler;
130 - (void)_setCookies:(NSArray *)cookies forURL:(NSURL *)URL mainDocumentURL:(NSURL *)mainDocumentURL policyProperties:(NSDictionary*) props;
131 - (void)removeCookiesSinceDate:(NSDate *)date;
132 - (id)_initWithCFHTTPCookieStorage:(CFHTTPCookieStorageRef)cfStorage;
133 - (CFHTTPCookieStorageRef)_cookieStorage;
134 - (void)_saveCookies;
135 #if HAVE(FOUNDATION_WITH_SAVE_COOKIES_WITH_COMPLETION_HANDLER)
136 - (void)_saveCookies:(dispatch_block_t) completionHandler;
137 #endif
138 #if HAVE(CFNETWORK_OVERRIDE_SESSION_COOKIE_ACCEPT_POLICY)
139 @property (nonatomic, readwrite) BOOL _overrideSessionCookieAcceptPolicy;
140 #endif
141 @end
142
143 @interface NSURLConnection ()
144 - (id)_initWithRequest:(NSURLRequest *)request delegate:(id)delegate usesCache:(BOOL)usesCacheFlag maxContentLength:(long long)maxContentLength startImmediately:(BOOL)startImmediately connectionProperties:(NSDictionary *)connectionProperties;
145 @end
146
147 @interface NSMutableURLRequest ()
148 - (void)setContentDispositionEncodingFallbackArray:(NSArray *)theEncodingFallbackArray;
149 - (void)setBoundInterfaceIdentifier:(NSString *)identifier;
150 - (void)_setPreventHSTSStorage:(BOOL)preventHSTSStorage;
151 - (void)_setIgnoreHSTS:(BOOL)ignoreHSTS;
152 @end
153
154 @interface NSURLProtocol ()
155 + (Class)_protocolClassForRequest:(NSURLRequest *)request;
156 @end
157
158 @interface NSURLRequest ()
159 + (NSArray *)allowsSpecificHTTPSCertificateForHost:(NSString *)host;
160 + (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;
161 + (void)setDefaultTimeoutInterval:(NSTimeInterval)seconds;
162 - (NSArray *)contentDispositionEncodingFallbackArray;
163 - (CFMutableURLRequestRef)_CFURLRequest;
164 - (id)_initWithCFURLRequest:(CFURLRequestRef)request;
165 - (id)_propertyForKey:(NSString *)key;
166 - (void)_setProperty:(id)value forKey:(NSString *)key;
167 - (BOOL)_schemeWasUpgradedDueToDynamicHSTS;
168 - (BOOL)_preventHSTSStorage;
169 - (BOOL)_ignoreHSTS;
170 @end
171
172 @interface NSURLResponse ()
173 + (NSURLResponse *)_responseWithCFURLResponse:(CFURLResponseRef)response;
174 - (CFURLResponseRef)_CFURLResponse;
175 - (NSDate *)_lastModifiedDate;
176 @end
177
178 #if PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 60000
179 typedef NS_ENUM(NSInteger, NSURLSessionCompanionProxyPreference) {
180     NSURLSessionCompanionProxyPreferenceDefault = 0,
181     NSURLSessionCompanionProxyPreferencePreferCompanion,
182     NSURLSessionCompanionProxyPreferencePreferDirectToCloud,
183 };
184 #endif
185
186 @interface NSURLSessionConfiguration ()
187 @property (assign) _TimingDataOptions _timingDataOptions;
188 @property (copy) NSData *_sourceApplicationAuditTokenData;
189 @property (nullable, copy) NSString *_sourceApplicationBundleIdentifier;
190 @property (nullable, copy) NSString *_sourceApplicationSecondaryIdentifier;
191 @property BOOL _shouldSkipPreferredClientCertificateLookup NS_AVAILABLE(10_10, 8_0);
192 #if PLATFORM(IOS_FAMILY)
193 @property (nullable, copy) NSString *_CTDataConnectionServiceType;
194 #endif
195 #if HAVE(CFNETWORK_WITH_AUTO_ADDED_HTTP_HEADER_SUPPRESSION_SUPPORT)
196 @property (nullable, copy) NSSet *_suppressedAutoAddedHTTPHeaders;
197 #endif
198 #if PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 60000
199 @property NSURLSessionCompanionProxyPreference _companionProxyPreference;
200 #endif
201 @end
202
203 @interface NSURLSessionTask ()
204 - (NSDictionary *)_timingData;
205 @property (readwrite, copy) NSString *_pathToDownloadTaskFile;
206 @property (copy) NSString *_storagePartitionIdentifier;
207 #if HAVE(FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT)
208 @property (nullable, readwrite, retain) NSURL *_siteForCookies;
209 @property (readwrite) BOOL _isTopLevelNavigation;
210 #endif
211 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
212 @property (nonatomic, assign) BOOL _preconnect;
213 #endif
214 @end
215
216 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
217 @interface NSURLSessionTaskTransactionMetrics ()
218 @property (copy, readonly) NSString* _remoteAddressAndPort;
219 @property (copy, readonly) NSUUID* _connectionIdentifier;
220 @property (assign, readonly) NSInteger _requestHeaderBytesSent;
221 @property (assign, readonly) NSInteger _responseHeaderBytesReceived;
222 @property (assign, readonly) int64_t _responseBodyBytesReceived;
223 @property (assign, readonly) int64_t _responseBodyBytesDecoded;
224 @end
225 #endif
226
227 #if HAVE(CFNETWORK_NEGOTIATED_SSL_PROTOCOL_CIPHER)
228 @interface NSURLSessionTaskTransactionMetrics ()
229 @property (assign) SSLProtocol _negotiatedTLSProtocol;
230 @property (assign) SSLCipherSuite _negotiatedTLSCipher;
231 @end
232 #endif
233
234 extern NSString * const NSURLAuthenticationMethodOAuth;
235
236 #endif // defined(__OBJC__)
237
238 #endif // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
239
240 WTF_EXTERN_C_BEGIN
241
242 #if !PLATFORM(WIN)
243
244 CFURLStorageSessionRef _CFURLStorageSessionCreate(CFAllocatorRef, CFStringRef, CFDictionaryRef);
245 CFURLCacheRef _CFURLStorageSessionCopyCache(CFAllocatorRef, CFURLStorageSessionRef);
246
247 void CFURLRequestSetShouldStartSynchronously(CFURLRequestRef, Boolean);
248
249 CFURLCacheRef CFURLCacheCopySharedURLCache();
250 void CFURLCacheSetMemoryCapacity(CFURLCacheRef, CFIndex memoryCapacity);
251 CFIndex CFURLCacheMemoryCapacity(CFURLCacheRef);
252 void CFURLCacheSetDiskCapacity(CFURLCacheRef, CFIndex);
253 CFCachedURLResponseRef CFURLCacheCopyResponseForRequest(CFURLCacheRef, CFURLRequestRef);
254
255 void CFHTTPCookieStorageDeleteAllCookies(CFHTTPCookieStorageRef);
256 void _CFHTTPCookieStorageFlushCookieStores();
257
258 #if PLATFORM(COCOA)
259 CFDataRef _CFCachedURLResponseGetMemMappedData(CFCachedURLResponseRef);
260 #endif
261
262 #if PLATFORM(COCOA) && defined(__BLOCKS__)
263 void _CFCachedURLResponseSetBecameFileBackedCallBackBlock(CFCachedURLResponseRef, CFCachedURLResponseCallBackBlock, dispatch_queue_t);
264 #endif
265
266 extern CFStringRef const kCFHTTPCookieLocalFileDomain;
267 extern const CFStringRef kCFHTTPVersion1_1;
268 extern const CFStringRef kCFURLRequestAllowAllPOSTCaching;
269 extern const CFStringRef _kCFURLCachePartitionKey;
270 extern const CFStringRef _kCFURLConnectionPropertyShouldSniff;
271 extern const CFStringRef _kCFURLStorageSessionIsPrivate;
272
273 #if HAVE(CFNETWORK_WITH_CONTENT_ENCODING_SNIFFING_OVERRIDE)
274 extern const CFStringRef kCFURLRequestContentDecoderSkipURLCheck;
275 #endif
276
277 CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef);
278 CFHTTPCookieStorageRef CFHTTPCookieStorageCreateFromFile(CFAllocatorRef, CFURLRef, CFHTTPCookieStorageRef);
279 void CFHTTPCookieStorageScheduleWithRunLoop(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef);
280 void CFHTTPCookieStorageSetCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef);
281 void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy);
282 CFHTTPCookieStorageAcceptPolicy CFHTTPCookieStorageGetCookieAcceptPolicy(CFHTTPCookieStorageRef);
283
284 typedef void (*CFHTTPCookieStorageChangedProcPtr)(CFHTTPCookieStorageRef, void*);
285 void CFHTTPCookieStorageAddObserver(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef, CFHTTPCookieStorageChangedProcPtr, void*);
286 void CFHTTPCookieStorageRemoveObserver(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef, CFHTTPCookieStorageChangedProcPtr, void*);
287
288 CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef);
289 CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef);
290 CFURLRequestPriority CFURLRequestGetRequestPriority(CFURLRequestRef);
291 void _CFURLRequestSetProtocolProperty(CFURLRequestRef, CFStringRef, CFTypeRef);
292 void CFURLRequestSetRequestPriority(CFURLRequestRef, CFURLRequestPriority);
293 void CFURLRequestSetShouldPipelineHTTP(CFURLRequestRef, Boolean, Boolean);
294 void _CFURLRequestSetStorageSession(CFMutableURLRequestRef, CFURLStorageSessionRef);
295 CFStringRef CFURLResponseCopySuggestedFilename(CFURLResponseRef);
296 CFHTTPMessageRef CFURLResponseGetHTTPResponse(CFURLResponseRef);
297 CFStringRef CFURLResponseGetMIMEType(CFURLResponseRef);
298 CFDictionaryRef _CFURLResponseGetSSLCertificateContext(CFURLResponseRef);
299 CFURLRef CFURLResponseGetURL(CFURLResponseRef);
300 void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef);
301 CFHTTPCookieStorageRef _CFURLStorageSessionCopyCookieStorage(CFAllocatorRef, CFURLStorageSessionRef);
302 CFArrayRef _CFHTTPCookieStorageCopyCookiesForURLWithMainDocumentURL(CFHTTPCookieStorageRef inCookieStorage, CFURLRef inURL, CFURLRef inMainDocumentURL, Boolean sendSecureCookies);
303 CFStringRef CFURLResponseGetTextEncodingName(CFURLResponseRef);
304 SInt64 CFURLResponseGetExpectedContentLength(CFURLResponseRef);
305 CFTypeID CFURLResponseGetTypeID();
306 Boolean CFURLRequestShouldHandleHTTPCookies(CFURLRequestRef);
307 CFURLRef CFURLRequestGetURL(CFURLRequestRef);
308 CFURLResponseRef CFURLResponseCreate(CFAllocatorRef, CFURLRef, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy);
309 void CFURLResponseSetExpectedContentLength(CFURLResponseRef, SInt64 length);
310 CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef, CFURLRef, CFHTTPMessageRef, CFURLCacheStoragePolicy);
311 CFArrayRef CFHTTPCookieStorageCopyCookies(CFHTTPCookieStorageRef);
312 void CFHTTPCookieStorageSetCookies(CFHTTPCookieStorageRef, CFArrayRef cookies, CFURLRef, CFURLRef mainDocumentURL);
313 void CFHTTPCookieStorageDeleteCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef);
314 CFMutableURLRequestRef CFURLRequestCreateMutableCopy(CFAllocatorRef, CFURLRequestRef);
315 CFStringRef _CFURLCacheCopyCacheDirectory(CFURLCacheRef);
316 Boolean _CFHostIsDomainTopLevel(CFStringRef domain);
317 void _CFURLRequestCreateArchiveList(CFAllocatorRef, CFURLRequestRef, CFIndex* version, CFTypeRef** objects, CFIndex* objectCount, CFDictionaryRef* protocolProperties);
318 CFMutableURLRequestRef _CFURLRequestCreateFromArchiveList(CFAllocatorRef, CFIndex version, CFTypeRef* objects, CFIndex objectCount, CFDictionaryRef protocolProperties);
319 void CFURLRequestSetProxySettings(CFMutableURLRequestRef, CFDictionaryRef);
320
321 #endif // !PLATFORM(WIN)
322
323 CFN_EXPORT const CFStringRef kCFStreamPropertyCONNECTProxy;
324 CFN_EXPORT const CFStringRef kCFStreamPropertyCONNECTProxyHost;
325 CFN_EXPORT const CFStringRef kCFStreamPropertyCONNECTProxyPort;
326 CFN_EXPORT const CFStringRef kCFStreamPropertyCONNECTAdditionalHeaders;
327 CFN_EXPORT const CFStringRef kCFStreamPropertyCONNECTResponse;
328
329 CFN_EXPORT void _CFHTTPMessageSetResponseURL(CFHTTPMessageRef, CFURLRef);
330 CFN_EXPORT void _CFHTTPMessageSetResponseProxyURL(CFHTTPMessageRef, CFURLRef);
331
332 WTF_EXTERN_C_END
333
334 #if defined(__OBJC__) && !USE(APPLE_INTERNAL_SDK)
335
336 enum : NSUInteger {
337     NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain = 3,
338 };
339
340 #endif
341
342 WTF_EXTERN_C_BEGIN
343
344 CFDataRef _CFNetworkCopyATSContext(void);
345 Boolean _CFNetworkSetATSContext(CFDataRef);
346
347 #if PLATFORM(COCOA)
348 extern const CFStringRef _kCFNetworkHSTSPreloaded;
349 CFDictionaryRef _CFNetworkCopyHSTSPolicies(CFURLStorageSessionRef);
350 void _CFNetworkResetHSTS(CFURLRef, CFURLStorageSessionRef);
351 void _CFNetworkResetHSTSHostsSinceDate(CFURLStorageSessionRef, CFDateRef);
352 Boolean _CFNetworkIsKnownHSTSHostWithSession(CFURLRef, CFURLStorageSessionRef);
353 void _CFNetworkResetHSTSHostsWithSession(CFURLStorageSessionRef);
354 #endif
355
356 CFDataRef CFHTTPCookieStorageCreateIdentifyingData(CFAllocatorRef inAllocator, CFHTTPCookieStorageRef inStorage);
357 CFHTTPCookieStorageRef CFHTTPCookieStorageCreateFromIdentifyingData(CFAllocatorRef inAllocator, CFDataRef inData);
358 CFArrayRef _CFHTTPParsedCookiesWithResponseHeaderFields(CFAllocatorRef inAllocator, CFDictionaryRef headerFields, CFURLRef inURL);
359
360 WTF_EXTERN_C_END
361
362 #if defined(__OBJC__)
363
364 // FIXME: Move these declarations the above section under !USE(APPLE_INTERNAL_SDK) when possible so that
365 // Apple internal SDK builds use headers instead.
366
367 @interface NSHTTPCookie ()
368 #if PLATFORM(MAC)
369 + (NSArray *)_parsedCookiesWithResponseHeaderFields:(NSDictionary *)headerFields forURL:(NSURL *)aURL;
370 #endif
371 + (NSArray *)_cf2nsCookies:(CFArrayRef)cfCookies;
372 @end
373
374 @interface NSHTTPCookieStorage ()
375 + (void)_setSharedHTTPCookieStorage:(NSHTTPCookieStorage *)storage;
376 @end
377
378 @interface NSURLResponse ()
379 - (void)_setMIMEType:(NSString *)type;
380 @end
381
382 @interface NSURLSessionConfiguration ()
383 // FIXME: Remove this once rdar://problem/40650244 is in a build.
384 @property (copy) NSDictionary *_socketStreamProperties;
385 @end
386
387 @interface NSURLSessionTask ()
388 - (void)_setExplicitCookieStorage:(CFHTTPCookieStorageRef)storage;
389 @end
390
391 #endif // defined(__OBJC__)