2019-11-08 23:05:21 +00:00
|
|
|
//
|
|
|
|
// VGMPropertiesReader.m
|
|
|
|
// VGMStream
|
|
|
|
//
|
|
|
|
// Created by Christopher Snowhill on 10/18/19.
|
2022-01-03 07:34:29 +00:00
|
|
|
// Copyright 2019-2022 __LoSnoCo__. All rights reserved.
|
2019-11-08 23:05:21 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "GamePropertiesReader.h"
|
|
|
|
#import "GameDecoder.h"
|
|
|
|
|
|
|
|
@implementation GamePropertiesReader
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSArray *)fileTypes {
|
2019-11-08 23:05:21 +00:00
|
|
|
return [GameDecoder fileTypes];
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSArray *)mimeTypes {
|
2019-11-08 23:05:21 +00:00
|
|
|
return [GameDecoder mimeTypes];
|
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (float)priority {
|
|
|
|
return [GameDecoder priority];
|
2019-11-08 23:05:21 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (NSDictionary *)propertiesForSource:(id<CogSource>)source {
|
|
|
|
GameDecoder *decoder = [[GameDecoder alloc] init];
|
|
|
|
|
|
|
|
NSDictionary *properties = [NSDictionary dictionary];
|
|
|
|
|
|
|
|
if([decoder open:source]) {
|
|
|
|
properties = [decoder properties];
|
|
|
|
|
|
|
|
[decoder close];
|
|
|
|
}
|
|
|
|
|
|
|
|
return properties;
|
2019-11-08 23:05:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|