-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathQOauthKey.m
50 lines (42 loc) · 1.3 KB
/
QOauthKey.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
42
43
44
45
46
47
48
49
50
//
// QOauthKey.m
// QWeiboSDK4iOS
//
// Created on 11-1-12.
//
//
#import "QOauthKey.h"
@implementation QOauthKey
#pragma mark -
#pragma mark public variables
@synthesize consumerKey;
@synthesize consumerSecret;
@synthesize tokenKey;
@synthesize tokenSecret;
@synthesize verify;
@synthesize callbackUrl;
- (id)initWithCoder:(NSCoder *)coder
{
// self = [super initWithCoder:coder];
self = [super init];
if (self != nil) {
self.consumerKey = [coder decodeObjectForKey:@"consumerKey"];
self.consumerSecret = [coder decodeObjectForKey:@"consumerSecret"];
self.tokenKey = [coder decodeObjectForKey:@"tokenKey"];
self.tokenSecret = [coder decodeObjectForKey:@"tokenSecret"];
self.verify = [coder decodeObjectForKey:@"verify"];
self.callbackUrl = [coder decodeObjectForKey:@"callbackUrl"];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
// [super encodeWithCoder:aCoder];
[aCoder encodeObject:consumerKey forKey:@"consumerKey"];
[aCoder encodeObject:consumerSecret forKey:@"consumerSecret"];
[aCoder encodeObject:tokenKey forKey:@"tokenKey"];
[aCoder encodeObject:tokenSecret forKey:@"tokenSecret"];
[aCoder encodeObject:verify forKey:@"verify"];
[aCoder encodeObject:callbackUrl forKey:@"callbackUrl"];
}
@end