diff --git a/CHANGES.md b/CHANGES.md index 951d952ab..11ce14b45 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,8 @@ # Changes -#### cordova-sqlite-storage 3.4.2-dev +#### cordova-sqlite-storage 4.0.0-pre1 -TBD +- rename PSPDFThreadSafeMutableDictionary to CustomPSPDFThreadSafeMutableDictionary and completely remove PSPDFThreadSafeMutableDictionary.h #### cordova-sqlite-storage 3.4.1 diff --git a/package.json b/package.json index 3120ad252..96f40026d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlite-storage", - "version": "3.4.2-dev", + "version": "4.0.0-pre1", "description": "Native interface to SQLite for PhoneGap/Cordova - cordova-sqlite-storage plugin version", "cordova": { "id": "cordova-sqlite-storage", diff --git a/plugin.xml b/plugin.xml index db794d943..dd067e55a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="4.0.0-pre1"> Cordova sqlite storage plugin - cordova-sqlite-storage plugin version @@ -51,8 +51,7 @@ - - @@ -72,8 +71,7 @@ - - diff --git a/src/ios/PSPDFThreadSafeMutableDictionary.m b/src/ios/CustomPSPDFThreadSafeMutableDictionary.m similarity index 88% rename from src/ios/PSPDFThreadSafeMutableDictionary.m rename to src/ios/CustomPSPDFThreadSafeMutableDictionary.m index 2b39604b9..bfdfebadb 100644 --- a/src/ios/PSPDFThreadSafeMutableDictionary.m +++ b/src/ios/CustomPSPDFThreadSafeMutableDictionary.m @@ -1,5 +1,9 @@ // -// PSPDFThreadSafeMutableDictionary.m +// CustomPSPDFThreadSafeMutableDictionary.m +// +// renamed from PSPDFThreadSafeMutableDictionary.m +// +// Copyright (c) 2019-present Christopher J. Brody (aka Chris Brody) // // Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. All rights reserved. // @@ -23,29 +27,31 @@ #import -/* ** ALREADY INCLUDED BY #import "PSPDFThreadSafeMutableDictionary.h" // Dictionary-Subclasss whose primitive operations are thread safe. -@interface PSPDFThreadSafeMutableDictionary : NSMutableDictionary +@interface CustomPSPDFThreadSafeMutableDictionary : NSMutableDictionary @end -// */ // ---------------------------------------------------------------- // -// PSPDFThreadSafeMutableDictionary.m +// CustomPSPDFThreadSafeMutableDictionary.m +// +// renamed from PSPDFThreadSafeMutableDictionary.m +// // PSPDFKit // // Copyright (c) 2013 PSPDFKit GmbH. All rights reserved. // -#import "PSPDFThreadSafeMutableDictionary.h" +// #import "PSPDFThreadSafeMutableDictionary.h" + #import #define LOCKED(...) OSSpinLockLock(&_lock); \ __VA_ARGS__; \ OSSpinLockUnlock(&_lock); -@implementation PSPDFThreadSafeMutableDictionary { +@implementation CustomPSPDFThreadSafeMutableDictionary { OSSpinLock _lock; NSMutableDictionary *_dictionary; // Class Cluster! } @@ -145,8 +151,8 @@ - (void)performLockedWithDictionary:(void (^)(NSDictionary *dictionary))block { - (BOOL)isEqual:(id)object { if (object == self) return YES; - if ([object isKindOfClass:PSPDFThreadSafeMutableDictionary.class]) { - PSPDFThreadSafeMutableDictionary *other = object; + if ([object isKindOfClass:CustomPSPDFThreadSafeMutableDictionary.class]) { + CustomPSPDFThreadSafeMutableDictionary *other = object; __block BOOL isEqual = NO; [other performLockedWithDictionary:^(NSDictionary *dictionary) { [self performLockedWithDictionary:^(NSDictionary *otherDictionary) { diff --git a/src/ios/PSPDFThreadSafeMutableDictionary.h b/src/ios/PSPDFThreadSafeMutableDictionary.h deleted file mode 100644 index 05cd9ac1f..000000000 --- a/src/ios/PSPDFThreadSafeMutableDictionary.h +++ /dev/null @@ -1,28 +0,0 @@ -// PSPDFThreadSafeMutableDictionary.h header copied from -// PSPDFThreadSafeMutableDictionary.m -// -// Copyright (c) 2013 Peter Steinberger, PSPDFKit GmbH. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -// Dictionary-Subclasss whose primitive operations are thread safe. -@interface PSPDFThreadSafeMutableDictionary : NSMutableDictionary -@end diff --git a/src/ios/SQLitePlugin.m b/src/ios/SQLitePlugin.m index 08e0387d6..b0a6b08f3 100755 --- a/src/ios/SQLitePlugin.m +++ b/src/ios/SQLitePlugin.m @@ -10,8 +10,6 @@ #import "sqlite3.h" -#import "PSPDFThreadSafeMutableDictionary.h" - // Defines Macro to only log lines when in DEBUG mode #ifdef DEBUG # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); @@ -23,6 +21,13 @@ # error "Missing objc_arc feature" #endif +// CustomPSPDFThreadSafeMutableDictionary interface copied from +// CustomPSPDFThreadSafeMutableDictionary.m: +// +// Dictionary-Subclasss whose primitive operations are thread safe. +@interface CustomPSPDFThreadSafeMutableDictionary : NSMutableDictionary +@end + @implementation SQLitePlugin @synthesize openDBs; @@ -33,7 +38,7 @@ -(void)pluginInitialize DLog(@"Initializing SQLitePlugin"); { - openDBs = [PSPDFThreadSafeMutableDictionary dictionaryWithCapacity:0]; + openDBs = [CustomPSPDFThreadSafeMutableDictionary dictionaryWithCapacity:0]; appDBPaths = [NSMutableDictionary dictionaryWithCapacity:0]; NSString *docs = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0];