CaptureConfig.m 888 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#import "CaptureConfig.h"

@implementation CaptureConfig

-(instancetype)initWithFormat: (NSString *)format
                     withType: (NSString *)type
                  withQuality: (NSNumber *)quality
                 withFilePath: (NSString *)filePath
{
  if ((self = [super init])) {
    self.format = format;
    self.type = type;
    self.quality = quality;
    self.filePath = filePath;
  }
  return self;
}


- (bool) isEqualToCaptureConfig: (CaptureConfig *)other
{
  return [self.format isEqualToString:other.format] &&
  [self.type isEqualToString:other.type] &&
  [self.quality isEqualToNumber:other.quality] &&
  [self.filePath isEqualToString:other.filePath];
}

- (NSDictionary *) dictionary
{
  return @{
           @"format": self.format,
           @"type": self.type,
           @"quality": self.quality,
           @"filePath": self.filePath
           };
}

@end