Introduced MPDatabaseController to handle file load/saveing

This commit is contained in:
michael starke
2013-02-13 02:02:34 +01:00
parent 737ccf0ade
commit cdaa61f2e6
8 changed files with 181 additions and 58 deletions

View File

@@ -0,0 +1,29 @@
//
// MPDatabaseController.h
// MacPass
//
// Created by michael starke on 13.02.13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@class MPDatabaseDocument;
typedef enum{
MPDatabaseVersion1,
MPDatabaseVersion2
} MPDatabaseVersion;
@interface MPDatabaseController : NSObject
@property (retain, readonly) MPDatabaseDocument *database;
+ (MPDatabaseController *)defaultController;
- (MPDatabaseDocument *)createDatabase:(MPDatabaseVersion )version password:(NSString *)password keyfile:(NSURL *)key;
- (MPDatabaseDocument *)openDatabase:(NSURL *)file password:(NSString *)password keyfile:(NSURL *)key;
@end