2014-02-12 05:13:12 +00:00
|
|
|
/**
|
|
|
|
* 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
|
2014-02-12 05:13:12 +00:00
|
|
|
//
|
|
|
|
// Created by lhunath on 2/11/2014.
|
|
|
|
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2014-10-30 01:24:35 +00:00
|
|
|
#import "MPSiteEntity.h"
|
2015-01-20 04:30:19 +00:00
|
|
|
#import "MPAlgorithm.h"
|
2015-03-11 21:30:34 +00:00
|
|
|
#import "MPUserEntity.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;
|
|
|
|
@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;
|
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
|