2
0
MasterPassword/platform-darwin/Source/Mac/MPSiteModel.h

54 lines
1.7 KiB
C
Raw Normal View History

/**
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
*
* See the enclosed file LICENSE for license information (LGPLv3). If you did
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
*
* @author Maarten Billemont <lhunath@lyndir.com>
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
*/
//
2014-09-21 15:47:53 +00:00
// MPSiteModel.h
// MPSiteModel
//
// Created by lhunath on 2/11/2014.
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MPSiteEntity.h"
2015-01-20 04:30:19 +00:00
#import "MPAlgorithm.h"
#import "MPUserEntity.h"
2015-01-20 04:30:19 +00:00
2014-09-21 14:39:09 +00:00
@class MPSiteEntity;
2014-09-21 15:47:53 +00:00
@interface MPSiteModel : NSObject
2017-04-01 04:30:25 +00:00
@property(nonatomic) NSString *name;
@property(nonatomic) NSAttributedString *displayedName;
@property(nonatomic) MPSiteType type;
@property(nonatomic) NSString *typeName;
@property(nonatomic) NSString *content;
@property(nonatomic) NSString *displayedContent;
@property(nonatomic) NSString *question;
@property(nonatomic) NSString *answer;
@property(nonatomic) NSString *loginName;
@property(nonatomic) BOOL loginGenerated;
@property(nonatomic) NSNumber *uses;
@property(nonatomic) NSUInteger counter;
@property(nonatomic) NSDate *lastUsed;
@property(nonatomic) id<MPAlgorithm> algorithm;
@property(nonatomic) MPAlgorithmVersion algorithmVersion;
@property(nonatomic, readonly) BOOL outdated;
@property(nonatomic, readonly) BOOL generated;
@property(nonatomic, readonly) BOOL stored;
@property(nonatomic, readonly) BOOL transient;
- (instancetype)initWithEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups;
- (instancetype)initWithName:(NSString *)siteName forUser:(MPUserEntity *)user;
2014-09-21 14:39:09 +00:00
- (MPSiteEntity *)entityInContext:(NSManagedObjectContext *)moc;
- (void)updateContent;
@end