2012-06-04 09:27:02 +00:00
|
|
|
//
|
|
|
|
// MPElementEntities.h
|
|
|
|
// MasterPassword-iOS
|
|
|
|
//
|
|
|
|
// Created by Maarten Billemont on 31/05/12.
|
|
|
|
// Copyright (c) 2012 Lyndir. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "MPElementEntity.h"
|
|
|
|
#import "MPElementStoredEntity.h"
|
|
|
|
#import "MPElementGeneratedEntity.h"
|
|
|
|
#import "MPUserEntity.h"
|
2012-07-17 20:57:11 +00:00
|
|
|
#import "MPAlgorithm.h"
|
2012-06-04 09:27:02 +00:00
|
|
|
|
2012-06-05 22:59:09 +00:00
|
|
|
#define MPAvatarCount 19
|
|
|
|
|
2012-06-04 09:27:02 +00:00
|
|
|
@interface MPElementEntity (MP)
|
|
|
|
|
2012-06-04 22:55:02 +00:00
|
|
|
@property (assign) MPElementType type;
|
2012-07-17 20:57:11 +00:00
|
|
|
@property (readonly) NSString *typeName;
|
|
|
|
@property (readonly) NSString *typeShortName;
|
|
|
|
@property (readonly) NSString *typeClassName;
|
|
|
|
@property (readonly) Class typeClass;
|
2012-06-08 21:46:13 +00:00
|
|
|
@property (assign) NSUInteger uses;
|
2012-07-12 06:41:18 +00:00
|
|
|
@property (assign) NSUInteger version;
|
|
|
|
@property (assign) BOOL requiresExplicitMigration;
|
2012-07-17 20:57:11 +00:00
|
|
|
@property (readonly) id<MPAlgorithm> algorithm;
|
2012-06-04 22:55:02 +00:00
|
|
|
|
2012-09-01 20:14:57 +00:00
|
|
|
- (id)contentUsingKey:(MPKey *)key;
|
|
|
|
- (void)setContent:(id)content usingKey:(MPKey *)key;
|
|
|
|
|
2012-06-04 22:55:02 +00:00
|
|
|
- (NSUInteger)use;
|
2012-06-04 09:27:02 +00:00
|
|
|
- (NSString *)exportContent;
|
2012-08-19 07:34:49 +00:00
|
|
|
- (void)importProtectedContent:(NSString *)protectedContent protectedByKey:(MPKey *)contentProtectionKey usingKey:(MPKey *)key2;
|
2012-07-17 20:57:11 +00:00
|
|
|
- (void)importClearTextContent:(NSString *)clearContent usingKey:(MPKey *)key;
|
|
|
|
- (BOOL)migrateExplicitly:(BOOL)explicit;
|
2012-06-04 09:27:02 +00:00
|
|
|
|
|
|
|
@end
|
2012-06-04 22:55:02 +00:00
|
|
|
|
|
|
|
@interface MPElementGeneratedEntity (MP)
|
|
|
|
|
|
|
|
@property (assign) NSUInteger counter;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MPUserEntity (MP)
|
|
|
|
|
|
|
|
@property (assign) NSUInteger avatar;
|
2012-06-08 21:46:13 +00:00
|
|
|
@property (assign) BOOL saveKey;
|
2012-06-11 14:15:49 +00:00
|
|
|
@property (assign) MPElementType defaultType;
|
2012-07-17 20:57:11 +00:00
|
|
|
@property (assign) BOOL requiresExplicitMigration;
|
2012-06-14 19:56:54 +00:00
|
|
|
@property (readonly) NSString *userID;
|
|
|
|
|
|
|
|
+ (NSString *)idFor:(NSString *)userName;
|
2012-06-04 22:55:02 +00:00
|
|
|
|
|
|
|
@end
|