Removed unused class

This commit is contained in:
michael starke
2016-08-31 16:00:56 +02:00
parent c1d4bcbfd9
commit 7ab1ed4a34
3 changed files with 0 additions and 77 deletions

View File

@@ -1,27 +0,0 @@
//
// MPEntryProxy.h
// MacPass
//
// Created by Michael Starke on 07/03/16.
// Copyright © 2016 HicknHack Software GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
/*
Proxies the display of an entry to enable discardable changes to the entry
*/
NS_ASSUME_NONNULL_BEGIN
@class KPKEntry;
@interface MPEntryProxy : NSProxy
@property (strong, readonly) KPKEntry *entry;
- (instancetype)initWithEntry:(KPKEntry *)entry;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,49 +0,0 @@
//
// MPEntryProxy.m
// MacPass
//
// Created by Michael Starke on 07/03/16.
// Copyright © 2016 HicknHack Software GmbH. All rights reserved.
//
#import "MPEntryProxy.h"
#import <KeePassKit/KeePassKit.h>
#pragma mark -
@interface MPEntryProxy ()
@property (strong) KPKEntry *entry;
@property BOOL firstModification;
@end
@implementation MPEntryProxy
- (instancetype)initWithEntry:(KPKEntry *)entry {
if(!entry) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:nil userInfo:nil];
}
_entry = entry;
_firstModification = NO;
return self;
}
- (void)forwardInvocation:(NSInvocation *)invocation {
if(invocation.selector == @selector(touchModified)) {
if(self.firstModification) {
[self.entry pushHistory];
self.firstModification = YES;
}
NSLog(@"Possible mutation detected. Creating backup!");
}
invocation.target = self.entry;
[invocation invoke];
}
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel {
NSLog(@"methodSignatureForSelector %@", NSStringFromSelector(sel));
return [self.entry methodSignatureForSelector:sel];
}
@end