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
|
|
|
|
2014-10-30 01:24:35 +00:00
|
|
|
@property (nonatomic) NSString *name;
|
|
|
|
@property (nonatomic) NSAttributedString *displayedName;
|
2014-09-21 14:39:09 +00:00
|
|
|
@property (nonatomic) MPSiteType type;
|
2014-05-19 18:37:05 +00:00
|
|
|
@property (nonatomic) NSString *typeName;
|
|
|
|
@property (nonatomic) NSString *content;
|
2014-10-30 01:24:35 +00:00
|
|
|
@property (nonatomic) NSString *displayedContent;
|
2016-02-21 02:56:04 +00:00
|
|
|
@property (nonatomic) NSString *question;
|
|
|
|
@property (nonatomic) NSString *answer;
|
2014-05-19 18:37:05 +00:00
|
|
|
@property (nonatomic) NSString *loginName;
|
2016-05-16 04:50:17 +00:00
|
|
|
@property (nonatomic) BOOL loginGenerated;
|
2014-05-19 18:37:05 +00:00
|
|
|
@property (nonatomic) NSNumber *uses;
|
2014-02-21 05:19:24 +00:00
|
|
|
@property (nonatomic) NSUInteger counter;
|
2014-05-19 18:37:05 +00:00
|
|
|
@property (nonatomic) NSDate *lastUsed;
|
|
|
|
@property (nonatomic) id<MPAlgorithm> algorithm;
|
2015-09-23 04:31:33 +00:00
|
|
|
@property (nonatomic) MPAlgorithmVersion algorithmVersion;
|
|
|
|
@property (nonatomic, readonly) BOOL outdated;
|
2015-03-05 22:28:04 +00:00
|
|
|
@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
|