Revision d8426ffb pithos-macos/PithosActivity.m

b/pithos-macos/PithosActivity.m
36 36
// or implied, of GRNET S.A.
37 37

  
38 38
#import "PithosActivity.h"
39
#import "PithosAccount.h"
39 40

  
40 41
@implementation PithosActivity
41
@synthesize type, message, totalBytes, currentBytes;
42
@synthesize type, message, totalBytes, currentBytes, pithosAccount;
42 43

  
43 44
#pragma mark -
44 45
#pragma mark Object Lifecycle
45 46

  
46
- (id)initWithType:(PithosActivityType)aType {
47
- (id)initWithType:(PithosActivityType)aType pithosAccount:(PithosAccount *)aPithosAccount {
47 48
    if ((self = [super init])) {
48 49
        type = aType;
49 50
        totalBytes = 0;
50 51
        currentBytes = 0;
52
        pithosAccount = aPithosAccount;
51 53
    }
52 54
    return self;
53 55
}
......
58 60
}
59 61

  
60 62
- (NSString *)description {
61
    return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu", 
62
            type, message, totalBytes, currentBytes];
63
    if (pithosAccount)
64
        return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu, pithosAccount: %@", 
65
                type, message, totalBytes, currentBytes, pithosAccount.name];
66
    else
67
        return [NSString stringWithFormat:@"type: %lu, message: %@, totalBytes: %lu, currentBytes: %lu", 
68
                type, message, totalBytes, currentBytes];
63 69
}
64 70

  
65 71
@end

Also available in: Unified diff