appium-webdriveragent 3.9.2 → 3.12.0
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/PrivateHeaders/.DS_Store +0 -0
- package/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +3 -0
- package/README.md +0 -1
- package/WebDriverAgent.xcodeproj/project.pbxproj +56 -56
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/elf.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/elf.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +51 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/{kazuaki.xcuserdatad → elf.xcuserdatad}/xcschemes/xcschememanagement.plist +23 -8
- package/WebDriverAgentLib/.DS_Store +0 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +0 -17
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +0 -16
- package/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m +28 -14
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.h +37 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBResolve.m +51 -0
- package/WebDriverAgentLib/Categories/XCUIElement+FBUtilities.m +8 -2
- package/WebDriverAgentLib/Commands/FBElementCommands.m +3 -1
- package/WebDriverAgentLib/Commands/FBOrientationCommands.m +20 -9
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +119 -99
- package/WebDriverAgentLib/FBApplication.m +1 -1
- package/WebDriverAgentLib/Routing/FBElementCache.m +42 -11
- package/WebDriverAgentLib/Routing/FBResponsePayload.m +9 -3
- package/WebDriverAgentLib/Routing/FBSession.h +6 -0
- package/WebDriverAgentLib/Routing/FBSession.m +45 -55
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.h +1 -3
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.m +6 -13
- package/WebDriverAgentLib/Utilities/FBCapabilities.h +23 -0
- package/WebDriverAgentLib/Utilities/FBCapabilities.m +23 -0
- package/WebDriverAgentLib/Utilities/FBConfiguration.m +6 -1
- package/WebDriverAgentLib/Utilities/FBScreenshot.m +125 -14
- package/WebDriverAgentLib/Utilities/FBSettings.h +23 -23
- package/WebDriverAgentLib/Utilities/FBSettings.m +23 -23
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +16 -0
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +16 -0
- package/WebDriverAgentLib/Utilities/FBXPath.m +15 -44
- package/WebDriverAgentLib/Utilities/LRUCache/.DS_Store +0 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.h +59 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCache.m +104 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.h +43 -0
- package/WebDriverAgentLib/Utilities/LRUCache/LRUCacheNode.m +59 -0
- package/WebDriverAgentLib/Vendor/.DS_Store +0 -0
- package/WebDriverAgentRunner/.DS_Store +0 -0
- package/WebDriverAgentRunner-Runner.app.zip +0 -0
- package/WebDriverAgentTests/IntegrationApp/Resources/.DS_Store +0 -0
- package/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +20 -16
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +2 -1
- package/WebDriverAgentTests/IntegrationTests/XCUIElementFBFindTests.m +11 -0
- package/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.h +3 -0
- package/WebDriverAgentTests/UnitTests/Doubles/FBApplicationDouble.m +15 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/XCUIElementDouble.m +1 -0
- package/WebDriverAgentTests/UnitTests/FBSessionTests.m +11 -1
- package/WebDriverAgentTests/UnitTests/FBXPathTests.m +3 -1
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.h +1 -0
- package/WebDriverAgentTests/UnitTests_tvOS/Doubles/XCUIElementDouble.m +1 -0
- package/package.json +3 -3
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazuaki.xcuserdatad/WorkspaceSettings.xcsettings +0 -20
- package/WebDriverAgent.xcodeproj/xcuserdata/kazuaki.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -906
- package/WebDriverAgentLib/Vendor/YYCache/YYCache.h +0 -206
- package/WebDriverAgentLib/Vendor/YYCache/YYCache.m +0 -140
- package/WebDriverAgentLib/Vendor/YYCache/YYDiskCache.h +0 -412
- package/WebDriverAgentLib/Vendor/YYCache/YYDiskCache.m +0 -462
- package/WebDriverAgentLib/Vendor/YYCache/YYKVStorage.h +0 -325
- package/WebDriverAgentLib/Vendor/YYCache/YYKVStorage.m +0 -1068
- package/WebDriverAgentLib/Vendor/YYCache/YYMemoryCache.h +0 -213
- package/WebDriverAgentLib/Vendor/YYCache/YYMemoryCache.m +0 -508
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// YYCache.h
|
|
3
|
-
// YYCache <https://github.com/ibireme/YYCache>
|
|
4
|
-
//
|
|
5
|
-
// Created by ibireme on 15/2/13.
|
|
6
|
-
// Copyright (c) 2015 ibireme.
|
|
7
|
-
//
|
|
8
|
-
// This source code is licensed under the MIT-style license found in the
|
|
9
|
-
// LICENSE file in the root directory of this source tree.
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
#import <Foundation/Foundation.h>
|
|
13
|
-
|
|
14
|
-
#if __has_include(<YYCache/YYCache.h>)
|
|
15
|
-
FOUNDATION_EXPORT double YYCacheVersionNumber;
|
|
16
|
-
FOUNDATION_EXPORT const unsigned char YYCacheVersionString[];
|
|
17
|
-
#import <YYCache/YYMemoryCache.h>
|
|
18
|
-
#import <YYCache/YYDiskCache.h>
|
|
19
|
-
#import <YYCache/YYKVStorage.h>
|
|
20
|
-
#elif __has_include(<YYWebImage/YYCache.h>)
|
|
21
|
-
#import <YYWebImage/YYMemoryCache.h>
|
|
22
|
-
#import <YYWebImage/YYDiskCache.h>
|
|
23
|
-
#import <YYWebImage/YYKVStorage.h>
|
|
24
|
-
#else
|
|
25
|
-
#import "YYMemoryCache.h"
|
|
26
|
-
#import "YYDiskCache.h"
|
|
27
|
-
#import "YYKVStorage.h"
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
`YYCache` is a thread safe key-value cache.
|
|
35
|
-
|
|
36
|
-
It use `YYMemoryCache` to store objects in a small and fast memory cache,
|
|
37
|
-
and use `YYDiskCache` to persisting objects to a large and slow disk cache.
|
|
38
|
-
See `YYMemoryCache` and `YYDiskCache` for more information.
|
|
39
|
-
*/
|
|
40
|
-
@interface YYCache : NSObject
|
|
41
|
-
|
|
42
|
-
/** The name of the cache, readonly. */
|
|
43
|
-
@property (copy, readonly) NSString *name;
|
|
44
|
-
|
|
45
|
-
/** The underlying memory cache. see `YYMemoryCache` for more information.*/
|
|
46
|
-
@property (strong, readonly) YYMemoryCache *memoryCache;
|
|
47
|
-
|
|
48
|
-
/** The underlying disk cache. see `YYDiskCache` for more information.*/
|
|
49
|
-
@property (strong, readonly) YYDiskCache *diskCache;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
Create a new instance with the specified name.
|
|
53
|
-
Multiple instances with the same name will make the cache unstable.
|
|
54
|
-
|
|
55
|
-
@param name The name of the cache. It will create a dictionary with the name in
|
|
56
|
-
the app's caches dictionary for disk cache. Once initialized you should not
|
|
57
|
-
read and write to this directory.
|
|
58
|
-
@result A new cache object, or nil if an error occurs.
|
|
59
|
-
*/
|
|
60
|
-
- (nullable instancetype)initWithName:(NSString *)name;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
Create a new instance with the specified path.
|
|
64
|
-
Multiple instances with the same name will make the cache unstable.
|
|
65
|
-
|
|
66
|
-
@param path Full path of a directory in which the cache will write data.
|
|
67
|
-
Once initialized you should not read and write to this directory.
|
|
68
|
-
@result A new cache object, or nil if an error occurs.
|
|
69
|
-
*/
|
|
70
|
-
- (nullable instancetype)initWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
Convenience Initializers
|
|
74
|
-
Create a new instance with the specified name.
|
|
75
|
-
Multiple instances with the same name will make the cache unstable.
|
|
76
|
-
|
|
77
|
-
@param name The name of the cache. It will create a dictionary with the name in
|
|
78
|
-
the app's caches dictionary for disk cache. Once initialized you should not
|
|
79
|
-
read and write to this directory.
|
|
80
|
-
@result A new cache object, or nil if an error occurs.
|
|
81
|
-
*/
|
|
82
|
-
+ (nullable instancetype)cacheWithName:(NSString *)name;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
Convenience Initializers
|
|
86
|
-
Create a new instance with the specified path.
|
|
87
|
-
Multiple instances with the same name will make the cache unstable.
|
|
88
|
-
|
|
89
|
-
@param path Full path of a directory in which the cache will write data.
|
|
90
|
-
Once initialized you should not read and write to this directory.
|
|
91
|
-
@result A new cache object, or nil if an error occurs.
|
|
92
|
-
*/
|
|
93
|
-
+ (nullable instancetype)cacheWithPath:(NSString *)path;
|
|
94
|
-
|
|
95
|
-
- (instancetype)init UNAVAILABLE_ATTRIBUTE;
|
|
96
|
-
+ (instancetype)new UNAVAILABLE_ATTRIBUTE;
|
|
97
|
-
|
|
98
|
-
#pragma mark - Access Methods
|
|
99
|
-
///=============================================================================
|
|
100
|
-
/// @name Access Methods
|
|
101
|
-
///=============================================================================
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
Returns a boolean value that indicates whether a given key is in cache.
|
|
105
|
-
This method may blocks the calling thread until file read finished.
|
|
106
|
-
|
|
107
|
-
@param key A string identifying the value. If nil, just return NO.
|
|
108
|
-
@return Whether the key is in cache.
|
|
109
|
-
*/
|
|
110
|
-
- (BOOL)containsObjectForKey:(NSString *)key;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
Returns a boolean value with the block that indicates whether a given key is in cache.
|
|
114
|
-
This method returns immediately and invoke the passed block in background queue
|
|
115
|
-
when the operation finished.
|
|
116
|
-
|
|
117
|
-
@param key A string identifying the value. If nil, just return NO.
|
|
118
|
-
@param block A block which will be invoked in background queue when finished.
|
|
119
|
-
*/
|
|
120
|
-
- (void)containsObjectForKey:(NSString *)key withBlock:(nullable void(^)(NSString *key, BOOL contains))block;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
Returns the value associated with a given key.
|
|
124
|
-
This method may blocks the calling thread until file read finished.
|
|
125
|
-
|
|
126
|
-
@param key A string identifying the value. If nil, just return nil.
|
|
127
|
-
@return The value associated with key, or nil if no value is associated with key.
|
|
128
|
-
*/
|
|
129
|
-
- (nullable id<NSCoding>)objectForKey:(NSString *)key;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
Returns the value associated with a given key.
|
|
133
|
-
This method returns immediately and invoke the passed block in background queue
|
|
134
|
-
when the operation finished.
|
|
135
|
-
|
|
136
|
-
@param key A string identifying the value. If nil, just return nil.
|
|
137
|
-
@param block A block which will be invoked in background queue when finished.
|
|
138
|
-
*/
|
|
139
|
-
- (void)objectForKey:(NSString *)key withBlock:(nullable void(^)(NSString *key, id<NSCoding> object))block;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
Sets the value of the specified key in the cache.
|
|
143
|
-
This method may blocks the calling thread until file write finished.
|
|
144
|
-
|
|
145
|
-
@param object The object to be stored in the cache. If nil, it calls `removeObjectForKey:`.
|
|
146
|
-
@param key The key with which to associate the value. If nil, this method has no effect.
|
|
147
|
-
*/
|
|
148
|
-
- (void)setObject:(nullable id<NSCoding>)object forKey:(NSString *)key;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
Sets the value of the specified key in the cache.
|
|
152
|
-
This method returns immediately and invoke the passed block in background queue
|
|
153
|
-
when the operation finished.
|
|
154
|
-
|
|
155
|
-
@param object The object to be stored in the cache. If nil, it calls `removeObjectForKey:`.
|
|
156
|
-
@param block A block which will be invoked in background queue when finished.
|
|
157
|
-
*/
|
|
158
|
-
- (void)setObject:(nullable id<NSCoding>)object forKey:(NSString *)key withBlock:(nullable void(^)(void))block;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
Removes the value of the specified key in the cache.
|
|
162
|
-
This method may blocks the calling thread until file delete finished.
|
|
163
|
-
|
|
164
|
-
@param key The key identifying the value to be removed. If nil, this method has no effect.
|
|
165
|
-
*/
|
|
166
|
-
- (void)removeObjectForKey:(NSString *)key;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
Removes the value of the specified key in the cache.
|
|
170
|
-
This method returns immediately and invoke the passed block in background queue
|
|
171
|
-
when the operation finished.
|
|
172
|
-
|
|
173
|
-
@param key The key identifying the value to be removed. If nil, this method has no effect.
|
|
174
|
-
@param block A block which will be invoked in background queue when finished.
|
|
175
|
-
*/
|
|
176
|
-
- (void)removeObjectForKey:(NSString *)key withBlock:(nullable void(^)(NSString *key))block;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
Empties the cache.
|
|
180
|
-
This method may blocks the calling thread until file delete finished.
|
|
181
|
-
*/
|
|
182
|
-
- (void)removeAllObjects;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
Empties the cache.
|
|
186
|
-
This method returns immediately and invoke the passed block in background queue
|
|
187
|
-
when the operation finished.
|
|
188
|
-
|
|
189
|
-
@param block A block which will be invoked in background queue when finished.
|
|
190
|
-
*/
|
|
191
|
-
- (void)removeAllObjectsWithBlock:(void(^)(void))block;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
Empties the cache with block.
|
|
195
|
-
This method returns immediately and executes the clear operation with block in background.
|
|
196
|
-
|
|
197
|
-
@warning You should not send message to this instance in these blocks.
|
|
198
|
-
@param progress This block will be invoked during removing, pass nil to ignore.
|
|
199
|
-
@param end This block will be invoked at the end, pass nil to ignore.
|
|
200
|
-
*/
|
|
201
|
-
- (void)removeAllObjectsWithProgressBlock:(nullable void(^)(int removedCount, int totalCount))progress
|
|
202
|
-
endBlock:(nullable void(^)(BOOL error))end;
|
|
203
|
-
|
|
204
|
-
@end
|
|
205
|
-
|
|
206
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// YYCache.m
|
|
3
|
-
// YYCache <https://github.com/ibireme/YYCache>
|
|
4
|
-
//
|
|
5
|
-
// Created by ibireme on 15/2/13.
|
|
6
|
-
// Copyright (c) 2015 ibireme.
|
|
7
|
-
//
|
|
8
|
-
// This source code is licensed under the MIT-style license found in the
|
|
9
|
-
// LICENSE file in the root directory of this source tree.
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
#import "YYCache.h"
|
|
13
|
-
#import "YYMemoryCache.h"
|
|
14
|
-
#import "YYDiskCache.h"
|
|
15
|
-
|
|
16
|
-
@implementation YYCache
|
|
17
|
-
|
|
18
|
-
- (instancetype) init {
|
|
19
|
-
NSLog(@"Use \"initWithName\" or \"initWithPath\" to create YYCache instance.");
|
|
20
|
-
return [self initWithPath:@""];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
- (instancetype)initWithName:(NSString *)name {
|
|
24
|
-
if (name.length == 0) return nil;
|
|
25
|
-
NSString *cacheFolder = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
|
|
26
|
-
NSString *path = [cacheFolder stringByAppendingPathComponent:name];
|
|
27
|
-
return [self initWithPath:path];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
- (instancetype)initWithPath:(NSString *)path {
|
|
31
|
-
if (path.length == 0) return nil;
|
|
32
|
-
YYDiskCache *diskCache = [[YYDiskCache alloc] initWithPath:path];
|
|
33
|
-
if (!diskCache) return nil;
|
|
34
|
-
NSString *name = [path lastPathComponent];
|
|
35
|
-
YYMemoryCache *memoryCache = [YYMemoryCache new];
|
|
36
|
-
memoryCache.name = name;
|
|
37
|
-
|
|
38
|
-
self = [super init];
|
|
39
|
-
_name = name;
|
|
40
|
-
_diskCache = diskCache;
|
|
41
|
-
_memoryCache = memoryCache;
|
|
42
|
-
return self;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
+ (instancetype)cacheWithName:(NSString *)name {
|
|
46
|
-
return [[self alloc] initWithName:name];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
+ (instancetype)cacheWithPath:(NSString *)path {
|
|
50
|
-
return [[self alloc] initWithPath:path];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
- (BOOL)containsObjectForKey:(NSString *)key {
|
|
54
|
-
return [_memoryCache containsObjectForKey:key] || [_diskCache containsObjectForKey:key];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
- (void)containsObjectForKey:(NSString *)key withBlock:(void (^)(NSString *key, BOOL contains))block {
|
|
58
|
-
if (!block) return;
|
|
59
|
-
|
|
60
|
-
if ([_memoryCache containsObjectForKey:key]) {
|
|
61
|
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
62
|
-
block(key, YES);
|
|
63
|
-
});
|
|
64
|
-
} else {
|
|
65
|
-
[_diskCache containsObjectForKey:key withBlock:block];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
- (id<NSCoding>)objectForKey:(NSString *)key {
|
|
70
|
-
id<NSCoding> object = [_memoryCache objectForKey:key];
|
|
71
|
-
if (!object) {
|
|
72
|
-
object = [_diskCache objectForKey:key];
|
|
73
|
-
if (object) {
|
|
74
|
-
[_memoryCache setObject:object forKey:key];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return object;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
- (void)objectForKey:(NSString *)key withBlock:(void (^)(NSString *key, id<NSCoding> object))block {
|
|
81
|
-
if (!block) return;
|
|
82
|
-
id<NSCoding> object = [_memoryCache objectForKey:key];
|
|
83
|
-
if (object) {
|
|
84
|
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
85
|
-
block(key, object);
|
|
86
|
-
});
|
|
87
|
-
} else {
|
|
88
|
-
[_diskCache objectForKey:key withBlock:^(NSString *cacheKey, id<NSCoding> cacheObject) {
|
|
89
|
-
if (cacheObject && ![self.memoryCache objectForKey:cacheKey]) {
|
|
90
|
-
[self.memoryCache setObject:cacheObject forKey:cacheKey];
|
|
91
|
-
}
|
|
92
|
-
block(cacheKey, cacheObject);
|
|
93
|
-
}];
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
- (void)setObject:(id<NSCoding>)object forKey:(NSString *)key {
|
|
98
|
-
[_memoryCache setObject:object forKey:key];
|
|
99
|
-
[_diskCache setObject:object forKey:key];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
- (void)setObject:(id<NSCoding>)object forKey:(NSString *)key withBlock:(void (^)(void))block {
|
|
103
|
-
[_memoryCache setObject:object forKey:key];
|
|
104
|
-
[_diskCache setObject:object forKey:key withBlock:block];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
- (void)removeObjectForKey:(NSString *)key {
|
|
108
|
-
[_memoryCache removeObjectForKey:key];
|
|
109
|
-
[_diskCache removeObjectForKey:key];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
- (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *key))block {
|
|
113
|
-
[_memoryCache removeObjectForKey:key];
|
|
114
|
-
[_diskCache removeObjectForKey:key withBlock:block];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
- (void)removeAllObjects {
|
|
118
|
-
[_memoryCache removeAllObjects];
|
|
119
|
-
[_diskCache removeAllObjects];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
- (void)removeAllObjectsWithBlock:(void(^)(void))block {
|
|
123
|
-
[_memoryCache removeAllObjects];
|
|
124
|
-
[_diskCache removeAllObjectsWithBlock:block];
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
- (void)removeAllObjectsWithProgressBlock:(void(^)(int removedCount, int totalCount))progress
|
|
128
|
-
endBlock:(void(^)(BOOL error))end {
|
|
129
|
-
[_memoryCache removeAllObjects];
|
|
130
|
-
[_diskCache removeAllObjectsWithProgressBlock:progress endBlock:end];
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
- (NSString *)description {
|
|
135
|
-
if (_name) return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, (void *)self, _name];
|
|
136
|
-
else return [NSString stringWithFormat:@"<%@: %p>", self.class, (void *)self];
|
|
137
|
-
}
|
|
138
|
-
@end
|
|
139
|
-
|
|
140
|
-
#pragma clang diagnostic pop
|