Skip to content
Newer
Older
100644 38 lines (26 sloc) 950 Bytes
aac4b79 @clarkware Initial import
authored
1 #import "AsyncExample.h"
2 #import <DotMacKit/DotMacKit.h>
3
4 @implementation AsyncExample
5
6 - (int) run {
7
8 DMMemberAccount *memberAccount;
9 memberAccount = [DMMemberAccount accountWithName:@"account_name"
10 password:@"account_password"
11 applicationID:@"----"];
12
13 if ([memberAccount validateCredentials] != kDMSuccess) {
14 return 1;
15 }
16
17 [memberAccount setDelegate:self];
18
19 DMTransaction *daysLeftTxn = [memberAccount daysLeftUntilExpiration];
20 if (daysLeftTxn == nil) {
21 return 1;
22 }
23
24 [memberAccount autorelease];
25
26 return 0;
27 }
28
29 - (void)transactionSuccessful: (DMTransaction *)theTransaction
30 {
31 NSLog(@"******************************************************");
32 NSLog(@"A transaction was successful");
33 NSLog(@"******************************************************");
34 }
35
36 @end
37
Something went wrong with that request. Please try again.