2017-04-05 20:56:22 +00:00
|
|
|
//==============================================================================
|
|
|
|
// This file is part of Master Password.
|
|
|
|
// Copyright (c) 2011-2017, Maarten Billemont.
|
2014-02-12 05:13:12 +00:00
|
|
|
//
|
2017-04-05 20:56:22 +00:00
|
|
|
// Master Password is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2014-02-12 05:13:12 +00:00
|
|
|
//
|
2017-04-05 20:56:22 +00:00
|
|
|
// Master Password is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
2014-02-12 05:13:12 +00:00
|
|
|
//
|
2017-04-05 20:56:22 +00:00
|
|
|
// You can find a copy of the GNU General Public License in the
|
|
|
|
// LICENSE file. Alternatively, see <http://www.gnu.org/licenses/>.
|
|
|
|
//==============================================================================
|
2014-02-12 05:13:12 +00:00
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2017-05-07 22:36:01 +00:00
|
|
|
#import "MPSiteEntity+CoreDataClass.h"
|
2015-01-20 04:30:19 +00:00
|
|
|
#import "MPAlgorithm.h"
|
2017-05-07 22:36:01 +00:00
|
|
|
#import "MPUserEntity+CoreDataClass.h"
|
2015-01-20 04:30:19 +00:00
|
|
|
|
2014-09-21 14:39:09 +00:00
|
|
|
@class MPSiteEntity;
|
2014-02-12 05:13:12 +00:00
|
|
|
|
2014-09-21 15:47:53 +00:00
|
|
|
@interface MPSiteModel : NSObject
|
2014-06-24 04:55:08 +00:00
|
|
|
|
2017-04-01 04:30:25 +00:00
|
|
|
@property(nonatomic) NSString *name;
|
|
|
|
@property(nonatomic) NSAttributedString *displayedName;
|
2017-08-13 02:26:48 +00:00
|
|
|
@property(nonatomic) MPResultType type;
|
2017-04-01 04:30:25 +00:00
|
|
|
@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;
|
2017-08-13 02:26:48 +00:00
|
|
|
@property(nonatomic) MPCounterValue counter;
|
2017-04-01 04:30:25 +00:00
|
|
|
@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;
|
2014-02-12 05:13:12 +00:00
|
|
|
|
2014-10-30 01:24:35 +00:00
|
|
|
- (instancetype)initWithEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups;
|
2015-03-11 21:30:34 +00:00
|
|
|
- (instancetype)initWithName:(NSString *)siteName forUser:(MPUserEntity *)user;
|
2014-09-21 14:39:09 +00:00
|
|
|
- (MPSiteEntity *)entityInContext:(NSManagedObjectContext *)moc;
|
2014-02-12 05:13:12 +00:00
|
|
|
|
2014-06-27 03:13:21 +00:00
|
|
|
- (void)updateContent;
|
2014-02-12 05:13:12 +00:00
|
|
|
@end
|