| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_IOS_DATA_STORE_H_ | |
| 6 #define REMOTING_IOS_DATA_STORE_H_ | |
| 7 | |
| 8 #import <CoreData/CoreData.h> | |
| 9 | |
| 10 #import "remoting/ios/host_preferences.h" | |
| 11 | |
| 12 // A local data store backed by SQLLite to hold instances of HostPreferences. | |
| 13 // HostPreference is defined by the Core Data Model templates see | |
| 14 // ChromotingModel.xcdatamodel | |
| 15 @interface DataStore : NSObject | |
| 16 | |
| 17 // Static pointer to the managed data store | |
| 18 + (DataStore*)sharedStore; | |
| 19 | |
| 20 // General methods | |
| 21 - (BOOL)saveChanges; | |
| 22 | |
| 23 // Access methods for Hosts | |
| 24 - (NSArray*)allHosts; | |
| 25 - (const HostPreferences*)createHost:(NSString*)hostId; | |
| 26 - (void)removeHost:(const HostPreferences*)p; | |
| 27 - (const HostPreferences*)getHostForId:(NSString*)hostId; | |
| 28 | |
| 29 @end | |
| 30 | |
| 31 #endif // REMOTING_IOS_DATA_STORE_H_ | |
| OLD | NEW |