571898632f
[ADDED] The master password can now be changed. [IMPROVED] Flow of handling the master password when activating the app. [IMPROVED] iTunesArtwork & icons. [ADDED] Elements are now scoped to the current master password. [ADDED] Lots of documentation for the user: - Settings - FAQ - A quickstart guide
43 lines
891 B
Objective-C
43 lines
891 B
Objective-C
//
|
|
// OPElementEntity.m
|
|
// OnePassword
|
|
//
|
|
// Created by Maarten Billemont on 02/01/12.
|
|
// Copyright (c) 2012 Lyndir. All rights reserved.
|
|
//
|
|
|
|
#import "OPElementEntity.h"
|
|
|
|
|
|
@implementation OPElementEntity
|
|
|
|
@dynamic name;
|
|
@dynamic mpHashHex;
|
|
@dynamic type;
|
|
@dynamic uses;
|
|
@dynamic lastUsed;
|
|
|
|
- (void)use {
|
|
|
|
++self.uses;
|
|
self.lastUsed = [[NSDate date] timeIntervalSinceReferenceDate];
|
|
}
|
|
|
|
- (id)content {
|
|
|
|
@throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Content implementation missing." userInfo:nil];
|
|
}
|
|
|
|
- (NSString *)description {
|
|
|
|
return [[self content] description];
|
|
}
|
|
|
|
- (NSString *)debugDescription {
|
|
|
|
return [NSString stringWithFormat:@"{%@: name=%@, mpHashHex=%@, type=%d, uses=%d, lastUsed=%@}",
|
|
NSStringFromClass([self class]), self.name, self.mpHashHex, self.type, self.uses, self.lastUsed];
|
|
}
|
|
|
|
@end
|