| File: | Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm |
| Warning: | line 593, column 5 Call argument for 'this' parameter is uncounted and unsafe |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
| 1 | /* |
| 2 | * Copyright (C) 2017-2021 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 | #import "config.h" |
| 27 | #import "_WKWebsiteDataStoreConfigurationInternal.h" |
| 28 | |
| 29 | #import "TimeBasedEvictionMode.h" |
| 30 | #import "UnifiedOriginStorageLevel.h" |
| 31 | #import <WebCore/SecurityOriginData.h> |
| 32 | #import <WebCore/WebCoreObjCExtras.h> |
| 33 | #import <wtf/RetainPtr.h> |
| 34 | |
| 35 | static void checkURLArgument(NSURL *url) |
| 36 | { |
| 37 | if (url && ![url isFileURL]) |
| 38 | [NSException raise:NSInvalidArgumentException format:@"%@ is not a file URL", url]; |
| 39 | } |
| 40 | |
| 41 | @implementation _WKWebsiteDataStoreConfiguration |
| 42 | |
| 43 | - (instancetype)init |
| 44 | { |
| 45 | self = [super init]; |
| 46 | if (!self) |
| 47 | return nilnullptr; |
| 48 | |
| 49 | API::Object::constructInWrapper<WebKit::WebsiteDataStoreConfiguration>(self, WebKit::IsPersistent::Yes); |
| 50 | |
| 51 | return self; |
| 52 | } |
| 53 | |
| 54 | - (instancetype)initNonPersistentConfiguration |
| 55 | { |
| 56 | self = [super init]; |
| 57 | if (!self) |
| 58 | return nilnullptr; |
| 59 | |
| 60 | API::Object::constructInWrapper<WebKit::WebsiteDataStoreConfiguration>(self, WebKit::IsPersistent::No); |
| 61 | |
| 62 | return self; |
| 63 | } |
| 64 | |
| 65 | - (instancetype)initWithIdentifier:(NSUUID *)identifier |
| 66 | { |
| 67 | self = [super init]; |
| 68 | if (!self) |
| 69 | return nilnullptr; |
| 70 | |
| 71 | if (!identifier) |
| 72 | [NSException raise:NSInvalidArgumentException format:@"Identifier is nil"]; |
| 73 | |
| 74 | auto uuid = WTF::UUID::fromNSUUID(identifier); |
| 75 | if (!uuid || !uuid->isValid()) |
| 76 | [NSException raise:NSInvalidArgumentException format:@"Identifier (%s) is invalid for data store", String([identifier UUIDString]).utf8().data()]; |
| 77 | |
| 78 | API::Object::constructInWrapper<WebKit::WebsiteDataStoreConfiguration>(self, *uuid); |
| 79 | |
| 80 | return self; |
| 81 | } |
| 82 | |
| 83 | - (instancetype)initWithDirectory:(NSURL *)directory |
| 84 | { |
| 85 | self = [super init]; |
| 86 | if (!self) |
| 87 | return nilnullptr; |
| 88 | |
| 89 | if (!directory) |
| 90 | [NSException raise:NSInvalidArgumentException format:@"Directory is nil"]; |
| 91 | |
| 92 | RetainPtr<NSString> path = directory.path; |
| 93 | API::Object::constructInWrapper<WebKit::WebsiteDataStoreConfiguration>(self, path.get(), path.get()); |
| 94 | |
| 95 | return self; |
| 96 | } |
| 97 | |
| 98 | - (void)dealloc |
| 99 | { |
| 100 | if (WebCoreObjCScheduleDeallocateOnMainRunLoop(_WKWebsiteDataStoreConfiguration.class, self)) |
| 101 | return; |
| 102 | SUPPRESS_UNRETAINED_ARG[[clang::suppress]] _configuration->~WebsiteDataStoreConfiguration(); |
| 103 | [super dealloc]; |
| 104 | } |
| 105 | |
| 106 | - (BOOL)isPersistent |
| 107 | { |
| 108 | return _configuration->isPersistent(); |
| 109 | } |
| 110 | |
| 111 | - (NSURL *)_webStorageDirectory |
| 112 | { |
| 113 | return [NSURL fileURLWithPath:_configuration->localStorageDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 114 | } |
| 115 | |
| 116 | - (void)_setWebStorageDirectory:(NSURL *)url |
| 117 | { |
| 118 | if (!_configuration->isPersistent()) |
| 119 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _webStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 120 | |
| 121 | if (_configuration->identifier()) |
| 122 | [NSException raise:NSGenericException format:@"Cannot set _webStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 123 | |
| 124 | checkURLArgument(url); |
| 125 | protect(_configuration.get())->setLocalStorageDirectory(url.path); |
| 126 | } |
| 127 | |
| 128 | - (NSURL *)_indexedDBDatabaseDirectory |
| 129 | { |
| 130 | return [NSURL fileURLWithPath:_configuration->indexedDBDatabaseDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 131 | } |
| 132 | |
| 133 | - (void)_setIndexedDBDatabaseDirectory:(NSURL *)url |
| 134 | { |
| 135 | if (!_configuration->isPersistent()) |
| 136 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _indexedDBDatabaseDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 137 | |
| 138 | if (_configuration->identifier()) |
| 139 | [NSException raise:NSGenericException format:@"Cannot set _indexedDBDatabaseDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 140 | |
| 141 | checkURLArgument(url); |
| 142 | protect(_configuration.get())->setIndexedDBDatabaseDirectory(url.path); |
| 143 | } |
| 144 | |
| 145 | - (NSURL *)networkCacheDirectory |
| 146 | { |
| 147 | return [NSURL fileURLWithPath:_configuration->networkCacheDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 148 | } |
| 149 | |
| 150 | - (void)setNetworkCacheDirectory:(NSURL *)url |
| 151 | { |
| 152 | if (!_configuration->isPersistent()) |
| 153 | [NSException raise:NSInvalidArgumentException format:@"Cannot set networkCacheDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 154 | |
| 155 | if (_configuration->identifier()) |
| 156 | [NSException raise:NSGenericException format:@"Cannot set networkCacheDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 157 | |
| 158 | checkURLArgument(url); |
| 159 | protect(_configuration.get())->setNetworkCacheDirectory(url.path); |
| 160 | } |
| 161 | |
| 162 | - (NSURL *)deviceIdHashSaltsStorageDirectory |
| 163 | { |
| 164 | return [NSURL fileURLWithPath:_configuration->deviceIdHashSaltsStorageDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 165 | } |
| 166 | |
| 167 | - (void)setDeviceIdHashSaltsStorageDirectory:(NSURL *)url |
| 168 | { |
| 169 | if (!_configuration->isPersistent()) |
| 170 | [NSException raise:NSInvalidArgumentException format:@"Cannot set deviceIdHashSaltsStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 171 | |
| 172 | if (_configuration->identifier()) |
| 173 | [NSException raise:NSGenericException format:@"Cannot set deviceIdHashSaltsStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 174 | |
| 175 | checkURLArgument(url); |
| 176 | protect(_configuration.get())->setDeviceIdHashSaltsStorageDirectory(url.path); |
| 177 | } |
| 178 | |
| 179 | - (NSURL *)_webSQLDatabaseDirectory |
| 180 | { |
| 181 | return [NSURL fileURLWithPath:_configuration->webSQLDatabaseDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 182 | } |
| 183 | |
| 184 | - (void)_setWebSQLDatabaseDirectory:(NSURL *)url |
| 185 | { |
| 186 | if (!_configuration->isPersistent()) |
| 187 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _webSQLDatabaseDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 188 | |
| 189 | if (_configuration->identifier()) |
| 190 | [NSException raise:NSGenericException format:@"Cannot set _webSQLDatabaseDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 191 | |
| 192 | checkURLArgument(url); |
| 193 | protect(_configuration.get())->setWebSQLDatabaseDirectory(url.path); |
| 194 | } |
| 195 | |
| 196 | - (NSURL *)httpProxy |
| 197 | { |
| 198 | return _configuration->httpProxy().createNSURL().autorelease(); |
| 199 | } |
| 200 | |
| 201 | - (void)setHTTPProxy:(NSURL *)proxy |
| 202 | { |
| 203 | protect(_configuration.get())->setHTTPProxy(proxy); |
| 204 | } |
| 205 | |
| 206 | - (NSURL *)httpsProxy |
| 207 | { |
| 208 | return _configuration->httpsProxy().createNSURL().autorelease(); |
| 209 | } |
| 210 | |
| 211 | - (void)setHTTPSProxy:(NSURL *)proxy |
| 212 | { |
| 213 | protect(_configuration.get())->setHTTPSProxy(proxy); |
| 214 | } |
| 215 | |
| 216 | - (NSURL *)_cookieStorageFile |
| 217 | { |
| 218 | return [NSURL fileURLWithPath:_configuration->cookieStorageFile().createNSString().get() isDirectory:NO__objc_no]; |
| 219 | } |
| 220 | |
| 221 | - (void)_setCookieStorageFile:(NSURL *)url |
| 222 | { |
| 223 | if (!_configuration->isPersistent()) |
| 224 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _cookieStorageFile on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 225 | |
| 226 | if (_configuration->identifier()) |
| 227 | [NSException raise:NSGenericException format:@"Cannot set _cookieStorageFile on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 228 | |
| 229 | checkURLArgument(url); |
| 230 | if ([url hasDirectoryPath]) |
| 231 | [NSException raise:NSInvalidArgumentException format:@"The cookie storage path must point to a file, not a directory."]; |
| 232 | |
| 233 | protect(_configuration.get())->setCookieStorageFile(url.path); |
| 234 | } |
| 235 | |
| 236 | - (NSURL *)_resourceLoadStatisticsDirectory |
| 237 | { |
| 238 | return [NSURL fileURLWithPath:_configuration->resourceLoadStatisticsDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 239 | } |
| 240 | |
| 241 | - (void)_setResourceLoadStatisticsDirectory:(NSURL *)url |
| 242 | { |
| 243 | if (!_configuration->isPersistent()) |
| 244 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _resourceLoadStatisticsDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 245 | |
| 246 | if (_configuration->identifier()) |
| 247 | [NSException raise:NSGenericException format:@"Cannot set _resourceLoadStatisticsDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 248 | |
| 249 | checkURLArgument(url); |
| 250 | protect(_configuration.get())->setResourceLoadStatisticsDirectory(url.path); |
| 251 | } |
| 252 | |
| 253 | - (NSURL *)_cacheStorageDirectory |
| 254 | { |
| 255 | return [NSURL fileURLWithPath:_configuration->cacheStorageDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 256 | } |
| 257 | |
| 258 | - (void)_setCacheStorageDirectory:(NSURL *)url |
| 259 | { |
| 260 | if (!_configuration->isPersistent()) |
| 261 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _cacheStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 262 | |
| 263 | if (_configuration->identifier()) |
| 264 | [NSException raise:NSGenericException format:@"Cannot set _cacheStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 265 | |
| 266 | checkURLArgument(url); |
| 267 | protect(_configuration.get())->setCacheStorageDirectory(url.path); |
| 268 | } |
| 269 | |
| 270 | - (NSURL *)_serviceWorkerRegistrationDirectory |
| 271 | { |
| 272 | return [NSURL fileURLWithPath:_configuration->serviceWorkerRegistrationDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 273 | } |
| 274 | |
| 275 | - (void)_setServiceWorkerRegistrationDirectory:(NSURL *)url |
| 276 | { |
| 277 | if (!_configuration->isPersistent()) |
| 278 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _serviceWorkerRegistrationDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 279 | |
| 280 | if (_configuration->identifier()) |
| 281 | [NSException raise:NSGenericException format:@"Cannot set _serviceWorkerRegistrationDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 282 | |
| 283 | checkURLArgument(url); |
| 284 | protect(_configuration.get())->setServiceWorkerRegistrationDirectory(url.path); |
| 285 | } |
| 286 | |
| 287 | - (BOOL)serviceWorkerProcessTerminationDelayEnabled |
| 288 | { |
| 289 | return _configuration->serviceWorkerProcessTerminationDelayEnabled(); |
| 290 | } |
| 291 | |
| 292 | - (void)setServiceWorkerProcessTerminationDelayEnabled:(BOOL)enabled |
| 293 | { |
| 294 | _configuration->setServiceWorkerProcessTerminationDelayEnabled(enabled); |
| 295 | } |
| 296 | |
| 297 | - (void)setSourceApplicationBundleIdentifier:(NSString *)identifier |
| 298 | { |
| 299 | protect(_configuration.get())->setSourceApplicationBundleIdentifier(identifier); |
| 300 | } |
| 301 | |
| 302 | - (NSString *)sourceApplicationBundleIdentifier |
| 303 | { |
| 304 | return _configuration->sourceApplicationBundleIdentifier().createNSString().autorelease(); |
| 305 | } |
| 306 | |
| 307 | - (NSString *)sourceApplicationSecondaryIdentifier |
| 308 | { |
| 309 | return _configuration->sourceApplicationSecondaryIdentifier().createNSString().autorelease(); |
| 310 | } |
| 311 | |
| 312 | - (void)setSourceApplicationSecondaryIdentifier:(NSString *)identifier |
| 313 | { |
| 314 | protect(_configuration.get())->setSourceApplicationSecondaryIdentifier(identifier); |
| 315 | } |
| 316 | |
| 317 | - (NSURL *)applicationCacheDirectory |
| 318 | { |
| 319 | return nilnullptr; |
| 320 | } |
| 321 | |
| 322 | - (void)setApplicationCacheDirectory:(NSURL *)url |
| 323 | { |
| 324 | } |
| 325 | |
| 326 | - (NSString *)applicationCacheFlatFileSubdirectoryName |
| 327 | { |
| 328 | return nilnullptr; |
| 329 | } |
| 330 | |
| 331 | - (void)setApplicationCacheFlatFileSubdirectoryName:(NSString *)name |
| 332 | { |
| 333 | } |
| 334 | |
| 335 | - (NSURL *)mediaCacheDirectory |
| 336 | { |
| 337 | return [NSURL fileURLWithPath:_configuration->mediaCacheDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 338 | } |
| 339 | |
| 340 | - (void)setMediaCacheDirectory:(NSURL *)url |
| 341 | { |
| 342 | if (!_configuration->isPersistent()) |
| 343 | [NSException raise:NSInvalidArgumentException format:@"Cannot set mediaCacheDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 344 | |
| 345 | if (_configuration->identifier()) |
| 346 | [NSException raise:NSGenericException format:@"Cannot set mediaCacheDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 347 | |
| 348 | checkURLArgument(url); |
| 349 | protect(_configuration.get())->setMediaCacheDirectory(url.path); |
| 350 | } |
| 351 | |
| 352 | - (NSURL *)mediaKeysStorageDirectory |
| 353 | { |
| 354 | return [NSURL fileURLWithPath:_configuration->mediaKeysStorageDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 355 | } |
| 356 | |
| 357 | - (void)setMediaKeysStorageDirectory:(NSURL *)url |
| 358 | { |
| 359 | if (!_configuration->isPersistent()) |
| 360 | [NSException raise:NSInvalidArgumentException format:@"Cannot set mediaKeysStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 361 | |
| 362 | if (_configuration->identifier()) |
| 363 | [NSException raise:NSGenericException format:@"Cannot set mediaKeysStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 364 | |
| 365 | checkURLArgument(url); |
| 366 | protect(_configuration.get())->setMediaKeysStorageDirectory(url.path); |
| 367 | } |
| 368 | |
| 369 | - (NSURL *)hstsStorageDirectory |
| 370 | { |
| 371 | return [NSURL fileURLWithPath:_configuration->hstsStorageDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 372 | } |
| 373 | |
| 374 | - (void)setHSTSStorageDirectory:(NSURL *)url |
| 375 | { |
| 376 | if (!_configuration->isPersistent()) |
| 377 | [NSException raise:NSInvalidArgumentException format:@"Cannot set hstsStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 378 | |
| 379 | if (_configuration->identifier()) |
| 380 | [NSException raise:NSGenericException format:@"Cannot set hstsStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 381 | |
| 382 | checkURLArgument(url); |
| 383 | protect(_configuration.get())->setHSTSStorageDirectory(url.path); |
| 384 | } |
| 385 | |
| 386 | - (NSURL *)alternativeServicesStorageDirectory |
| 387 | { |
| 388 | return [NSURL fileURLWithPath:_configuration->alternativeServicesDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 389 | } |
| 390 | |
| 391 | - (void)setAlternativeServicesStorageDirectory:(NSURL *)url |
| 392 | { |
| 393 | if (!_configuration->isPersistent()) |
| 394 | [NSException raise:NSInvalidArgumentException format:@"Cannot set alternativeServicesDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 395 | |
| 396 | if (_configuration->identifier()) |
| 397 | [NSException raise:NSGenericException format:@"Cannot set alternativeServicesStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 398 | |
| 399 | checkURLArgument(url); |
| 400 | protect(_configuration.get())->setAlternativeServicesDirectory(url.path); |
| 401 | } |
| 402 | |
| 403 | - (NSURL *)generalStorageDirectory |
| 404 | { |
| 405 | auto& directory = _configuration->generalStorageDirectory(); |
| 406 | if (directory.isNull()) |
| 407 | return nilnullptr; |
| 408 | return [NSURL fileURLWithPath:directory.createNSString().get() isDirectory:YES__objc_yes]; |
| 409 | } |
| 410 | |
| 411 | - (void)setGeneralStorageDirectory:(NSURL *)url |
| 412 | { |
| 413 | if (!_configuration->isPersistent()) |
| 414 | [NSException raise:NSInvalidArgumentException format:@"Cannot set generalStorageDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 415 | |
| 416 | if (_configuration->identifier()) |
| 417 | [NSException raise:NSGenericException format:@"Cannot set generalStorageDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 418 | |
| 419 | checkURLArgument(url); |
| 420 | protect(_configuration.get())->setGeneralStorageDirectory(url.path); |
| 421 | } |
| 422 | |
| 423 | static _WKUnifiedOriginStorageLevel NODELETE[[clang::annotate_type("webkit.nodelete")]] toWKUnifiedOriginStorageLevel(WebKit::UnifiedOriginStorageLevel level) |
| 424 | { |
| 425 | switch (level) { |
| 426 | case WebKit::UnifiedOriginStorageLevel::None: |
| 427 | return _WKUnifiedOriginStorageLevelNone; |
| 428 | case WebKit::UnifiedOriginStorageLevel::Basic: |
| 429 | return _WKUnifiedOriginStorageLevelBasic; |
| 430 | case WebKit::UnifiedOriginStorageLevel::Standard: |
| 431 | return _WKUnifiedOriginStorageLevelStandard; |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | static WebKit::UnifiedOriginStorageLevel NODELETE[[clang::annotate_type("webkit.nodelete")]] toUnifiedOriginStorageLevel(_WKUnifiedOriginStorageLevel wkLevel) |
| 436 | { |
| 437 | switch (wkLevel) { |
| 438 | case _WKUnifiedOriginStorageLevelNone: |
| 439 | return WebKit::UnifiedOriginStorageLevel::None; |
| 440 | case _WKUnifiedOriginStorageLevelBasic: |
| 441 | return WebKit::UnifiedOriginStorageLevel::Basic; |
| 442 | case _WKUnifiedOriginStorageLevelStandard: |
| 443 | return WebKit::UnifiedOriginStorageLevel::Standard; |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | - (_WKUnifiedOriginStorageLevel)unifiedOriginStorageLevel |
| 448 | { |
| 449 | return toWKUnifiedOriginStorageLevel(_configuration->unifiedOriginStorageLevel()); |
| 450 | } |
| 451 | |
| 452 | - (void)setUnifiedOriginStorageLevel:(_WKUnifiedOriginStorageLevel)level |
| 453 | { |
| 454 | _configuration->setUnifiedOriginStorageLevel(toUnifiedOriginStorageLevel(level)); |
| 455 | } |
| 456 | |
| 457 | - (NSString *)webPushPartitionString |
| 458 | { |
| 459 | return _configuration->webPushPartitionString().createNSString().autorelease(); |
| 460 | } |
| 461 | |
| 462 | - (void)setWebPushPartitionString:(NSString *)string |
| 463 | { |
| 464 | protect(_configuration.get())->setWebPushPartitionString(string); |
| 465 | } |
| 466 | |
| 467 | - (BOOL)deviceManagementRestrictionsEnabled |
| 468 | { |
| 469 | return _configuration->deviceManagementRestrictionsEnabled(); |
| 470 | } |
| 471 | |
| 472 | - (void)setDeviceManagementRestrictionsEnabled:(BOOL)enabled |
| 473 | { |
| 474 | _configuration->setDeviceManagementRestrictionsEnabled(enabled); |
| 475 | } |
| 476 | |
| 477 | - (BOOL)networkCacheSpeculativeValidationEnabled |
| 478 | { |
| 479 | return _configuration->networkCacheSpeculativeValidationEnabled(); |
| 480 | } |
| 481 | |
| 482 | - (void)setNetworkCacheSpeculativeValidationEnabled:(BOOL)enabled |
| 483 | { |
| 484 | _configuration->setNetworkCacheSpeculativeValidationEnabled(enabled); |
| 485 | } |
| 486 | |
| 487 | - (BOOL)fastServerTrustEvaluationEnabled |
| 488 | { |
| 489 | return _configuration->fastServerTrustEvaluationEnabled(); |
| 490 | } |
| 491 | |
| 492 | - (void)setFastServerTrustEvaluationEnabled:(BOOL)enabled |
| 493 | { |
| 494 | return _configuration->setFastServerTrustEvaluationEnabled(enabled); |
| 495 | } |
| 496 | |
| 497 | - (NSUInteger)perOriginStorageQuota |
| 498 | { |
| 499 | return _configuration->perOriginStorageQuota(); |
| 500 | } |
| 501 | |
| 502 | - (void)setPerOriginStorageQuota:(NSUInteger)quota |
| 503 | { |
| 504 | _configuration->setPerOriginStorageQuota(quota); |
| 505 | } |
| 506 | |
| 507 | - (_WKTimeBasedEvictionMode)timeBasedEvictionMode |
| 508 | { |
| 509 | switch (_configuration->timeBasedEvictionMode()) { |
| 510 | case WebKit::TimeBasedEvictionMode::Disabled: |
| 511 | return _WKTimeBasedEvictionModeDisabled; |
| 512 | case WebKit::TimeBasedEvictionMode::ServiceWorkerRegistrationsOnly: |
| 513 | return _WKTimeBasedEvictionModeServiceWorkerRegistrationsOnly; |
| 514 | case WebKit::TimeBasedEvictionMode::AllTypes: |
| 515 | return _WKTimeBasedEvictionModeAllTypes; |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | - (void)setTimeBasedEvictionMode:(_WKTimeBasedEvictionMode)mode |
| 520 | { |
| 521 | switch (mode) { |
| 522 | case _WKTimeBasedEvictionModeDisabled: |
| 523 | _configuration->setTimeBasedEvictionMode(WebKit::TimeBasedEvictionMode::Disabled); |
| 524 | break; |
| 525 | case _WKTimeBasedEvictionModeServiceWorkerRegistrationsOnly: |
| 526 | _configuration->setTimeBasedEvictionMode(WebKit::TimeBasedEvictionMode::ServiceWorkerRegistrationsOnly); |
| 527 | break; |
| 528 | case _WKTimeBasedEvictionModeAllTypes: |
| 529 | _configuration->setTimeBasedEvictionMode(WebKit::TimeBasedEvictionMode::AllTypes); |
| 530 | break; |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | - (NSTimeInterval)timeBasedEvictionThreshold |
| 535 | { |
| 536 | return _configuration->timeBasedEvictionThreshold().seconds(); |
| 537 | } |
| 538 | |
| 539 | - (void)setTimeBasedEvictionThreshold:(NSTimeInterval)seconds |
| 540 | { |
| 541 | _configuration->setTimeBasedEvictionThreshold(Seconds(seconds)); |
| 542 | } |
| 543 | |
| 544 | - (NSNumber *)lastModificationTimeUpdateIntervalOverride |
| 545 | { |
| 546 | auto interval = _configuration->lastModificationTimeUpdateIntervalOverride(); |
| 547 | if (!interval) |
| 548 | return nilnullptr; |
| 549 | |
| 550 | return [NSNumber numberWithDouble:interval->seconds()]; |
| 551 | } |
| 552 | |
| 553 | - (void)setLastModificationTimeUpdateIntervalOverride:(NSNumber *)seconds |
| 554 | { |
| 555 | if (seconds) |
| 556 | _configuration->setLastModificationTimeUpdateIntervalOverride(Seconds([seconds doubleValue])); |
| 557 | else |
| 558 | _configuration->setLastModificationTimeUpdateIntervalOverride(std::nullopt); |
| 559 | } |
| 560 | |
| 561 | - (NSNumber *)timeBasedEvictionIntervalOverride |
| 562 | { |
| 563 | auto interval = _configuration->timeBasedEvictionIntervalOverride(); |
| 564 | if (!interval) |
| 565 | return nilnullptr; |
| 566 | |
| 567 | return [NSNumber numberWithDouble:interval->seconds()]; |
| 568 | } |
| 569 | |
| 570 | - (void)setTimeBasedEvictionIntervalOverride:(NSNumber *)seconds |
| 571 | { |
| 572 | if (seconds) |
| 573 | _configuration->setTimeBasedEvictionIntervalOverride(Seconds([seconds doubleValue])); |
| 574 | else |
| 575 | _configuration->setTimeBasedEvictionIntervalOverride(std::nullopt); |
| 576 | } |
| 577 | |
| 578 | - (NSArray<NSString *> *)mockPushSubscriptionOriginsForTesting |
| 579 | { |
| 580 | auto& origins = _configuration->mockPushSubscriptionOriginsForTesting(); |
| 581 | RetainPtr result = adoptNS([[NSMutableArray alloc] initWithCapacity:origins.size()]); |
| 582 | for (auto& origin : origins) |
| 583 | [result addObject:origin.toString().createNSString().get()]; |
| 584 | return result.autorelease(); |
| 585 | } |
| 586 | |
| 587 | - (void)setMockPushSubscriptionOriginsForTesting:(NSArray<NSString *> *)originStrings |
| 588 | { |
| 589 | Vector<WebCore::SecurityOriginData> origins; |
| 590 | origins.reserveInitialCapacity(originStrings.count); |
| 591 | for (NSString *originString in originStrings) |
| 592 | origins.append(WebCore::SecurityOriginData::fromURL(URL { String { originString } })); |
| 593 | _configuration->setMockPushSubscriptionOriginsForTesting(WTF::move(origins)); |
Call argument for 'this' parameter is uncounted and unsafe | |
| 594 | } |
| 595 | |
| 596 | - (NSNumber *)originQuotaRatio |
| 597 | { |
| 598 | auto ratio = _configuration->originQuotaRatio(); |
| 599 | if (!ratio) |
| 600 | return nilnullptr; |
| 601 | |
| 602 | return [NSNumber numberWithDouble:*ratio]; |
| 603 | } |
| 604 | |
| 605 | - (void)setOriginQuotaRatio:(NSNumber *)originQuotaRatio |
| 606 | { |
| 607 | std::optional<double> ratio = std::nullopt; |
| 608 | if (originQuotaRatio) { |
| 609 | ratio = [originQuotaRatio doubleValue]; |
| 610 | if (*ratio < 0.0 || *ratio > 1.0) |
| 611 | [NSException raise:NSInvalidArgumentException format:@"OriginQuotaRatio must be in the range [0.0, 1]"]; |
| 612 | } |
| 613 | |
| 614 | _configuration->setOriginQuotaRatio(ratio); |
| 615 | } |
| 616 | |
| 617 | - (NSNumber *)totalQuotaRatio |
| 618 | { |
| 619 | auto ratio = _configuration->totalQuotaRatio(); |
| 620 | if (!ratio) |
| 621 | return nilnullptr; |
| 622 | |
| 623 | return [NSNumber numberWithDouble:*ratio]; |
| 624 | } |
| 625 | |
| 626 | - (void)setTotalQuotaRatio:(NSNumber *)totalQuotaRatio |
| 627 | { |
| 628 | std::optional<double> ratio = std::nullopt; |
| 629 | if (totalQuotaRatio) { |
| 630 | ratio = [totalQuotaRatio doubleValue]; |
| 631 | if (*ratio < 0.0 || *ratio > 1.0) |
| 632 | [NSException raise:NSInvalidArgumentException format:@"TotalQuotaRatio must be in the range [0.0, 1]"]; |
| 633 | } |
| 634 | |
| 635 | _configuration->setTotalQuotaRatio(ratio); |
| 636 | } |
| 637 | |
| 638 | - (NSNumber *)standardVolumeCapacity |
| 639 | { |
| 640 | auto capacity = _configuration->standardVolumeCapacity(); |
| 641 | if (!capacity) |
| 642 | return nilnullptr; |
| 643 | |
| 644 | return [NSNumber numberWithUnsignedLongLong:*capacity]; |
| 645 | } |
| 646 | |
| 647 | - (void)setStandardVolumeCapacity:(NSNumber *)standardVolumeCapacity |
| 648 | { |
| 649 | std::optional<uint64_t> capacity; |
| 650 | if (standardVolumeCapacity) |
| 651 | capacity = [standardVolumeCapacity unsignedLongLongValue]; |
| 652 | |
| 653 | _configuration->setStandardVolumeCapacity(capacity); |
| 654 | } |
| 655 | |
| 656 | - (NSNumber *)volumeCapacityOverride |
| 657 | { |
| 658 | auto capacity = _configuration->volumeCapacityOverride(); |
| 659 | if (!capacity) |
| 660 | return nilnullptr; |
| 661 | |
| 662 | return [NSNumber numberWithUnsignedLongLong:*capacity]; |
| 663 | } |
| 664 | |
| 665 | - (void)setVolumeCapacityOverride:(NSNumber *)mockVolumeCapactiy |
| 666 | { |
| 667 | std::optional<uint64_t> capacity = std::nullopt; |
| 668 | if (mockVolumeCapactiy) |
| 669 | capacity = [mockVolumeCapactiy unsignedLongLongValue]; |
| 670 | |
| 671 | _configuration->setVolumeCapacityOverride(capacity); |
| 672 | } |
| 673 | |
| 674 | - (NSURL *)_resourceMonitorThrottlerDirectory |
| 675 | { |
| 676 | return [NSURL fileURLWithPath:_configuration->resourceMonitorThrottlerDirectory().createNSString().get() isDirectory:YES__objc_yes]; |
| 677 | } |
| 678 | |
| 679 | - (void)_setResourceMonitorThrottlerDirectory:(NSURL *)url |
| 680 | { |
| 681 | if (!_configuration->isPersistent()) |
| 682 | [NSException raise:NSInvalidArgumentException format:@"Cannot set _resourceMonitorThrottlerDirectory on a non-persistent _WKWebsiteDataStoreConfiguration."]; |
| 683 | |
| 684 | if (_configuration->identifier()) |
| 685 | [NSException raise:NSGenericException format:@"Cannot set _resourceMonitorThrottlerDirectory on a _WKWebsiteDataStoreConfiguration created with identifier"]; |
| 686 | |
| 687 | checkURLArgument(url); |
| 688 | protect(_configuration.get())->setResourceMonitorThrottlerDirectory(url.path); |
| 689 | } |
| 690 | |
| 691 | - (NSURL *)webContentRestrictionsConfigurationURL |
| 692 | { |
| 693 | #if HAVE(WEBCONTENTRESTRICTIONS_PATH_SPI)(defined HAVE_WEBCONTENTRESTRICTIONS_PATH_SPI && HAVE_WEBCONTENTRESTRICTIONS_PATH_SPI ) |
| 694 | auto file = _configuration->webContentRestrictionsConfigurationFile(); |
| 695 | if (!file.isEmpty()) |
| 696 | return [NSURL fileURLWithPath:file.createNSString().get()]; |
| 697 | #endif |
| 698 | |
| 699 | return nilnullptr; |
| 700 | } |
| 701 | |
| 702 | - (void)setWebContentRestrictionsConfigurationURL:(NSURL *)url |
| 703 | { |
| 704 | checkURLArgument(url); |
| 705 | #if HAVE(WEBCONTENTRESTRICTIONS_PATH_SPI)(defined HAVE_WEBCONTENTRESTRICTIONS_PATH_SPI && HAVE_WEBCONTENTRESTRICTIONS_PATH_SPI ) |
| 706 | _configuration->setWebContentRestrictionsConfigurationFile(url.path); |
| 707 | #endif |
| 708 | } |
| 709 | |
| 710 | - (BOOL)isDeclarativeWebPushEnabled |
| 711 | { |
| 712 | #if ENABLE(DECLARATIVE_WEB_PUSH)(defined 1 && 1) |
| 713 | return _configuration->isDeclarativeWebPushEnabled(); |
| 714 | #else |
| 715 | return NO__objc_no; |
| 716 | #endif |
| 717 | } |
| 718 | |
| 719 | - (void)setIsDeclarativeWebPushEnabled:(BOOL)enabled |
| 720 | { |
| 721 | UNUSED_PARAM(enabled)(void)enabled; |
| 722 | #if ENABLE(DECLARATIVE_WEB_PUSH)(defined 1 && 1) |
| 723 | _configuration->setIsDeclarativeWebPushEnabled(enabled); |
| 724 | #endif |
| 725 | } |
| 726 | |
| 727 | - (NSUInteger)testSpeedMultiplier |
| 728 | { |
| 729 | return _configuration->testSpeedMultiplier(); |
| 730 | } |
| 731 | |
| 732 | - (void)setTestSpeedMultiplier:(NSUInteger)quota |
| 733 | { |
| 734 | _configuration->setTestSpeedMultiplier(quota); |
| 735 | } |
| 736 | |
| 737 | - (BOOL)suppressesConnectionTerminationOnSystemChange |
| 738 | { |
| 739 | return _configuration->suppressesConnectionTerminationOnSystemChange(); |
| 740 | } |
| 741 | |
| 742 | - (void)setSuppressesConnectionTerminationOnSystemChange:(BOOL)suppresses |
| 743 | { |
| 744 | _configuration->setSuppressesConnectionTerminationOnSystemChange(suppresses); |
| 745 | } |
| 746 | |
| 747 | - (BOOL)allowsServerPreconnect |
| 748 | { |
| 749 | return _configuration->allowsServerPreconnect(); |
| 750 | } |
| 751 | |
| 752 | - (void)setAllowsServerPreconnect:(BOOL)allows |
| 753 | { |
| 754 | _configuration->setAllowsServerPreconnect(allows); |
| 755 | } |
| 756 | |
| 757 | - (NSString *)boundInterfaceIdentifier |
| 758 | { |
| 759 | return _configuration->boundInterfaceIdentifier().createNSString().autorelease(); |
| 760 | } |
| 761 | |
| 762 | - (void)setBoundInterfaceIdentifier:(NSString *)identifier |
| 763 | { |
| 764 | protect(_configuration.get())->setBoundInterfaceIdentifier(identifier); |
| 765 | } |
| 766 | |
| 767 | - (BOOL)allowsCellularAccess |
| 768 | { |
| 769 | return _configuration->allowsCellularAccess(); |
| 770 | } |
| 771 | |
| 772 | - (void)setAllowsCellularAccess:(BOOL)allows |
| 773 | { |
| 774 | _configuration->setAllowsCellularAccess(allows); |
| 775 | } |
| 776 | |
| 777 | - (BOOL)legacyTLSEnabled |
| 778 | { |
| 779 | return _configuration->legacyTLSEnabled(); |
| 780 | } |
| 781 | |
| 782 | - (void)setLegacyTLSEnabled:(BOOL)enable |
| 783 | { |
| 784 | _configuration->setLegacyTLSEnabled(enable); |
| 785 | } |
| 786 | |
| 787 | - (NSDictionary *)proxyConfiguration |
| 788 | { |
| 789 | return (__bridge NSDictionary *)_configuration->proxyConfiguration(); |
| 790 | } |
| 791 | |
| 792 | - (NSString *)dataConnectionServiceType |
| 793 | { |
| 794 | return _configuration->dataConnectionServiceType().createNSString().autorelease(); |
| 795 | } |
| 796 | |
| 797 | - (void)setDataConnectionServiceType:(NSString *)type |
| 798 | { |
| 799 | protect(_configuration.get())->setDataConnectionServiceType(type); |
| 800 | } |
| 801 | |
| 802 | - (BOOL)preventsSystemHTTPProxyAuthentication |
| 803 | { |
| 804 | return _configuration->preventsSystemHTTPProxyAuthentication(); |
| 805 | } |
| 806 | |
| 807 | - (void)setPreventsSystemHTTPProxyAuthentication:(BOOL)prevents |
| 808 | { |
| 809 | _configuration->setPreventsSystemHTTPProxyAuthentication(prevents); |
| 810 | } |
| 811 | |
| 812 | - (BOOL)requiresSecureHTTPSProxyConnection |
| 813 | { |
| 814 | return _configuration->requiresSecureHTTPSProxyConnection(); |
| 815 | } |
| 816 | |
| 817 | - (void)setRequiresSecureHTTPSProxyConnection:(BOOL)requiresSecureProxy |
| 818 | { |
| 819 | _configuration->setRequiresSecureHTTPSProxyConnection(requiresSecureProxy); |
| 820 | } |
| 821 | |
| 822 | - (BOOL)shouldRunServiceWorkersOnMainThreadForTesting |
| 823 | { |
| 824 | return _configuration->shouldRunServiceWorkersOnMainThreadForTesting(); |
| 825 | } |
| 826 | |
| 827 | - (void)setShouldRunServiceWorkersOnMainThreadForTesting:(BOOL)shouldRunOnMainThread |
| 828 | { |
| 829 | _configuration->setShouldRunServiceWorkersOnMainThreadForTesting(shouldRunOnMainThread); |
| 830 | } |
| 831 | |
| 832 | - (NSUInteger)overrideServiceWorkerRegistrationCountTestingValue |
| 833 | { |
| 834 | return _configuration->overrideServiceWorkerRegistrationCountTestingValue().value_or(0); |
| 835 | } |
| 836 | |
| 837 | - (void)setOverrideServiceWorkerRegistrationCountTestingValue:(NSUInteger)count |
| 838 | { |
| 839 | _configuration->setOverrideServiceWorkerRegistrationCountTestingValue(count); |
| 840 | } |
| 841 | |
| 842 | - (BOOL)_shouldAcceptInsecureCertificatesForWebSockets |
| 843 | { |
| 844 | return false; |
| 845 | } |
| 846 | |
| 847 | - (void)_setShouldAcceptInsecureCertificatesForWebSockets:(BOOL)accept |
| 848 | { |
| 849 | UNUSED_PARAM(accept)(void)accept; |
| 850 | } |
| 851 | |
| 852 | - (void)setProxyConfiguration:(NSDictionary *)configuration |
| 853 | { |
| 854 | Ref { *_configuration }->setProxyConfiguration((__bridge CFDictionaryRef)adoptNS([configuration copy]).get()); |
| 855 | } |
| 856 | |
| 857 | - (NSURL *)standaloneApplicationURL |
| 858 | { |
| 859 | return _configuration->standaloneApplicationURL().createNSURL().autorelease(); |
| 860 | } |
| 861 | |
| 862 | - (void)setStandaloneApplicationURL:(NSURL *)url |
| 863 | { |
| 864 | protect(_configuration.get())->setStandaloneApplicationURL(url); |
| 865 | } |
| 866 | |
| 867 | - (BOOL)enableInAppBrowserPrivacyForTesting |
| 868 | { |
| 869 | return _configuration->enableInAppBrowserPrivacyForTesting(); |
| 870 | } |
| 871 | |
| 872 | - (void)setEnableInAppBrowserPrivacyForTesting:(BOOL)enable |
| 873 | { |
| 874 | _configuration->setEnableInAppBrowserPrivacyForTesting(enable); |
| 875 | } |
| 876 | |
| 877 | - (BOOL)allowsHSTSWithUntrustedRootCertificate |
| 878 | { |
| 879 | return _configuration->allowsHSTSWithUntrustedRootCertificate(); |
| 880 | } |
| 881 | |
| 882 | - (void)setAllowsHSTSWithUntrustedRootCertificate:(BOOL)allows |
| 883 | { |
| 884 | _configuration->setAllowsHSTSWithUntrustedRootCertificate(allows); |
| 885 | } |
| 886 | |
| 887 | - (NSString *)pcmMachServiceName |
| 888 | { |
| 889 | return _configuration->pcmMachServiceName().createNSString().autorelease(); |
| 890 | } |
| 891 | |
| 892 | - (void)setPCMMachServiceName:(NSString *)name |
| 893 | { |
| 894 | protect(_configuration.get())->setPCMMachServiceName(name); |
| 895 | } |
| 896 | |
| 897 | - (NSString *)webPushMachServiceName |
| 898 | { |
| 899 | return _configuration->webPushMachServiceName().createNSString().autorelease(); |
| 900 | } |
| 901 | |
| 902 | - (void)setWebPushMachServiceName:(NSString *)name |
| 903 | { |
| 904 | protect(_configuration.get())->setWebPushMachServiceName(name); |
| 905 | } |
| 906 | |
| 907 | - (BOOL)allLoadsBlockedByDeviceManagementRestrictionsForTesting |
| 908 | { |
| 909 | return _configuration->allLoadsBlockedByDeviceManagementRestrictionsForTesting(); |
| 910 | } |
| 911 | |
| 912 | - (void)setAllLoadsBlockedByDeviceManagementRestrictionsForTesting:(BOOL)blocked |
| 913 | { |
| 914 | _configuration->setAllLoadsBlockedByDeviceManagementRestrictionsForTesting(blocked); |
| 915 | } |
| 916 | |
| 917 | - (BOOL)resourceLoadStatisticsDebugModeEnabled |
| 918 | { |
| 919 | return _configuration->resourceLoadStatisticsDebugModeEnabled(); |
| 920 | } |
| 921 | |
| 922 | - (void)setResourceLoadStatisticsDebugModeEnabled:(BOOL)enabled |
| 923 | { |
| 924 | _configuration->setResourceLoadStatisticsDebugModeEnabled(enabled); |
| 925 | } |
| 926 | |
| 927 | - (NSNumber *)defaultTrackingPreventionEnabledOverride |
| 928 | { |
| 929 | auto enabled = _configuration->defaultTrackingPreventionEnabledOverride(); |
| 930 | if (!enabled) |
| 931 | return nilnullptr; |
| 932 | |
| 933 | return [NSNumber numberWithBool:*enabled]; |
| 934 | } |
| 935 | |
| 936 | - (void)setDefaultTrackingPreventionEnabledOverride:(NSNumber *)defaultTrackingPreventionEnabledOverride |
| 937 | { |
| 938 | std::optional<bool> enabled; |
| 939 | if (defaultTrackingPreventionEnabledOverride) |
| 940 | enabled = [defaultTrackingPreventionEnabledOverride boolValue]; |
| 941 | |
| 942 | _configuration->setDefaultTrackingPreventionEnabledOverride(enabled); |
| 943 | } |
| 944 | |
| 945 | - (NSString *)additionalDomainsWithUserInteractionForTesting |
| 946 | { |
| 947 | return _configuration->additionalDomainsWithUserInteractionForTesting().createNSString().autorelease(); |
| 948 | } |
| 949 | |
| 950 | - (void)setAdditionalDomainsWithUserInteractionForTesting:(NSString *)domains |
| 951 | { |
| 952 | protect(_configuration.get())->setAdditionalDomainsWithUserInteractionForTesting(domains); |
| 953 | } |
| 954 | |
| 955 | - (NSUUID *)identifier |
| 956 | { |
| 957 | auto currentIdentifier = _configuration->identifier(); |
| 958 | if (!currentIdentifier) |
| 959 | return nullptr; |
| 960 | |
| 961 | return currentIdentifier->createNSUUID().autorelease(); |
| 962 | } |
| 963 | |
| 964 | - (API::Object&)_apiObject |
| 965 | { |
| 966 | return *_configuration; |
| 967 | } |
| 968 | |
| 969 | @end |