-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
InttoStatus.m
41 lines (37 loc) · 954 Bytes
/
InttoStatus.m
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
39
40
41
//
// InttoStatus.m
// MAL Updater OS X
//
// Created by 桐間紗路 on 2017/01/10.
// Copyright 2009-2017 MAL Updater OS X Group and James Moy All rights reserved. Code licensed under New BSD License
//
#import "InttoStatus.h"
@implementation InttoStatus
+ (Class)transformedValueClass
{
return [NSString class];
}
- (id)transformedValue:(id)value{
if (!value) return nil;
if ([value respondsToSelector:@selector(integerValue)]) {
int status = [value intValue];
switch (status) {
case 23:
return @"Queued";
case 2:
return @"Update Not Needed";
case 3:
return @"Awaiting Confirmation";
case 21:
case 22:
return @"Successful";
case 51:
case 52:
case 53:
case 54:
return @"Unsuccessful";
}
}
return nil;
}
@end