You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dws/ui/cocoa/RequestHistoryItem.m

27 lines
521 B
Objective-C

#import "RequestHistoryItem.h"
@implementation RequestHistoryItem
+ (instancetype) itemWithRequestMeta:(RequestMeta *)meta {
return [[self alloc] initWithRequestMeta:meta];
}
- (instancetype) initWithRequestMeta:(RequestMeta *)meta {
self = [super init];
if (self) {
_seq = meta->seq;
_path = [NSString stringWithUTF8String:meta->path];
}
return self;
}
- (void) updateWithResponseMeta:(ResponseMeta *)meta {
if (meta->seq != self.seq) {
return;
}
_status = meta->status;
_bytes = meta->bytes;
}
@end