@@ -50,9 +50,9 @@ enum HTTPCookieAcceptPolicy {
50
50
httpCookieAcceptPolicyOnlyFromMainDocumentDomain,
51
51
}
52
52
53
- // Controls how response data is cached.
54
- //
55
- // See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy).
53
+ /// Controls how response data is cached.
54
+ ///
55
+ /// See [URLRequestCachePolicy] (https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy).
56
56
enum URLRequestCachePolicy {
57
57
useProtocolCachePolicy,
58
58
reloadIgnoringLocalCacheData,
@@ -72,17 +72,33 @@ enum URLSessionMultipathServiceType {
72
72
multipathServiceTypeAggregate,
73
73
}
74
74
75
- // Controls how [URLSessionTask] execute will proceed after the response is
76
- // received.
77
- //
78
- // See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition).
75
+ /// Controls how [URLSessionTask] execute will proceed after the response is
76
+ /// received.
77
+ ///
78
+ /// See [NSURLSessionResponseDisposition] (https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition).
79
79
enum URLSessionResponseDisposition {
80
80
urlSessionResponseCancel,
81
81
urlSessionResponseAllow,
82
82
urlSessionResponseBecomeDownload,
83
83
urlSessionResponseBecomeStream
84
84
}
85
85
86
+ /// Provides in indication to the operating system on what type of requests
87
+ /// are being sent.
88
+ ///
89
+ /// See [NSURLRequestNetworkServiceType] (https://developer.apple.com/documentation/foundation/nsurlrequestnetworkservicetype).
90
+ enum URLRequestNetworkService {
91
+ networkServiceTypeDefault,
92
+ networkServiceTypeVoIP,
93
+ networkServiceTypeVideo,
94
+ networkServiceTypeBackground,
95
+ networkServiceTypeVoice,
96
+ networkServiceTypeResponsiveData,
97
+ networkServiceTypeAVStreaming,
98
+ networkServiceTypeResponsiveAV,
99
+ networkServiceTypeCallSignaling
100
+ }
101
+
86
102
/// Information about a failure.
87
103
///
88
104
/// See [NSError] (https://developer.apple.com/documentation/foundation/nserror)
@@ -220,6 +236,15 @@ class URLSessionConfiguration
220
236
set multipathServiceType (URLSessionMultipathServiceType value) =>
221
237
_nsObject.multipathServiceType = value.index;
222
238
239
+ /// Provides in indication to the operating system on what type of requests
240
+ /// are being sent.
241
+ ///
242
+ /// See [NSURLSessionConfiguration.networkServiceType] (https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411606-networkservicetype).
243
+ URLRequestNetworkService get networkServiceType =>
244
+ URLRequestNetworkService .values[_nsObject.networkServiceType];
245
+ set networkServiceType (URLRequestNetworkService value) =>
246
+ _nsObject.networkServiceType = value.index;
247
+
223
248
// Controls how to deal with response caching.
224
249
//
225
250
// See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy)
0 commit comments