NSSecureCoding in MP42Image
This commit is contained in:
1 parent
8997086845
commit
5a18403c09
3 files changed
+13
-9
No files matched your search
@@ -27,7 +27,7 @@
|
|||||||
return [[self alloc] initWithKey:key value:value];
|
return [[self alloc] initWithKey:key value:value];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - NSCoding
|
#pragma mark - NSSecureCoding
|
||||||
|
|
||||||
+ (BOOL)supportsSecureCoding
|
+ (BOOL)supportsSecureCoding
|
||||||
{
|
{
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - NSCoding
|
#pragma mark - NSSecureCoding
|
||||||
|
|
||||||
+ (BOOL)supportsSecureCoding
|
+ (BOOL)supportsSecureCoding
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, SBQueueItemStatus) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface SBQueueItem : NSObject <NSCoding>
|
@interface SBQueueItem : NSObject <NSSecureCoding>
|
||||||
|
|
||||||
@property (nonatomic, readwrite) SBQueueItemStatus status;
|
@property (nonatomic, readwrite) SBQueueItemStatus status;
|
||||||
@property (nonatomic, readonly, nullable) NSString *localizedWorkingDescription;
|
@property (nonatomic, readonly, nullable) NSString *localizedWorkingDescription;
|
||||||
|
|||||||
+10
-6
@@ -357,7 +357,11 @@ bail:
|
|||||||
[self.delegate progressStatus:progress];
|
[self.delegate progressStatus:progress];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark NSCoding
|
#pragma mark NSSecyreCoding
|
||||||
|
|
||||||
|
+ (BOOL)supportsSecureCoding {
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)encodeWithCoder:(NSCoder *)coder {
|
- (void)encodeWithCoder:(NSCoder *)coder {
|
||||||
[coder encodeInt:2 forKey:@"SBQueueItemTagEncodeVersion"];
|
[coder encodeInt:2 forKey:@"SBQueueItemTagEncodeVersion"];
|
||||||
@@ -374,12 +378,12 @@ bail:
|
|||||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
_mp4File = [decoder decodeObjectForKey:@"SBQueueItemMp4File"];
|
_mp4File = [decoder decodeObjectOfClass:[MP42File class] forKey:@"SBQueueItemMp4File"];
|
||||||
|
|
||||||
_fileURL = [decoder decodeObjectForKey:@"SBQueueItemFileURL"];
|
_fileURL = [decoder decodeObjectOfClass:[NSURL class] forKey:@"SBQueueItemFileURL"];
|
||||||
_destURL = [decoder decodeObjectForKey:@"SBQueueItemDestURL"];
|
_destURL = [decoder decodeObjectOfClass:[NSURL class] forKey:@"SBQueueItemDestURL"];
|
||||||
_attributes = [decoder decodeObjectForKey:@"SBQueueItemAttributes"];
|
_attributes = [decoder decodeObjectOfClass:[NSDictionary class] forKey:@"SBQueueItemAttributes"];
|
||||||
_actionsInternal = [decoder decodeObjectForKey:@"SBQueueItemActions"];
|
_actionsInternal = [decoder decodeObjectOfClass:[NSMutableArray class] forKey:@"SBQueueItemActions"];
|
||||||
|
|
||||||
_status = [decoder decodeIntForKey:@"SBQueueItemStatus"];
|
_status = [decoder decodeIntForKey:@"SBQueueItemStatus"];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user