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

54 lines
2.1 KiB
C
Raw Normal View History

2017-04-05 20:56:22 +00:00
//==============================================================================
// This file is part of Master Password.
// Copyright (c) 2011-2017, Maarten Billemont.
//
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.
//
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.
//
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/>.
//==============================================================================
#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-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;
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;
- (instancetype)initWithEntity:(MPSiteEntity *)entity queryGroups:(NSArray *)queryGroups;
- (instancetype)initWithName:(NSString *)siteName forUser:(MPUserEntity *)user;
2014-09-21 14:39:09 +00:00
- (MPSiteEntity *)entityInContext:(NSManagedObjectContext *)moc;
- (void)updateContent;
@end