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