mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
Introduced new single global header file for pulling in the RestKit stack. Updated the notification names to be more in line with idiomatic Cocoa naming.
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
|
||||
#import "RKModelManager.h"
|
||||
|
||||
NSString* const kRKDidEnterOfflineMode = @"kRKDidEnterOfflineMode";
|
||||
NSString* const kRKDidEnterOnlineMode = @"kRKDidEnterOnlineMode";
|
||||
NSString* const RKDidEnterOfflineModeNotification = @"RKDidEnterOfflineModeNotification";
|
||||
NSString* const RKDidEnterOnlineModeNotification = @"RKDidEnterOnlineModeNotification";
|
||||
|
||||
//////////////////////////////////
|
||||
// Global Instance
|
||||
@@ -60,12 +60,12 @@ static RKModelManager* sharedManager = nil;
|
||||
|
||||
- (void)goOffline {
|
||||
_isOnline = NO;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRKDidEnterOfflineMode object:[RKModelManager manager]];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKDidEnterOfflineModeNotification object:[RKModelManager manager]];
|
||||
}
|
||||
|
||||
- (void)goOnline {
|
||||
_isOnline = YES;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRKDidEnterOnlineMode object:[RKModelManager manager]];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RKDidEnterOnlineModeNotification object:[RKModelManager manager]];
|
||||
}
|
||||
|
||||
- (BOOL)isOnline {
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#import "RKManagedObjectStore.h"
|
||||
#import "RKModelLoader.h"
|
||||
|
||||
extern NSString* const kRKDidEnterOfflineMode;
|
||||
extern NSString* const kRKDidEnterOnlineMode;
|
||||
extern NSString* const RKDidEnterOfflineModeNotification;
|
||||
extern NSString* const RKDidEnterOnlineModeNotification;
|
||||
|
||||
@interface RKModelManager : NSObject {
|
||||
RKClient* _client;
|
||||
|
||||
12
Code/RestKit/RestKit.h
Normal file
12
Code/RestKit/RestKit.h
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// RestKit.h
|
||||
// RestKit
|
||||
//
|
||||
// Created by Blake Watters on 2/19/10.
|
||||
// Copyright 2010 Two Toasters. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RestKit/RKClient.h"
|
||||
#import "RestKit/RKModelManager.h"
|
||||
#import "RestKit/RKManagedModel.h"
|
||||
#import "RestKit/RKNotifications.h"
|
||||
@@ -228,6 +228,7 @@
|
||||
256FD650112C7B780077F340 /* RKMappableAssociation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKMappableAssociation.m; sourceTree = "<group>"; };
|
||||
256FDE53112DB0B90077F340 /* RKModelMapperSpecModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKModelMapperSpecModel.h; sourceTree = "<group>"; };
|
||||
256FDE54112DB0B90077F340 /* RKModelMapperSpecModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKModelMapperSpecModel.m; sourceTree = "<group>"; };
|
||||
256FE8D6112EE5310077F340 /* RestKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RestKit.h; path = RestKit/RestKit.h; sourceTree = "<group>"; };
|
||||
2580B066102E0F1000832D07 /* RKModelLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RKModelLoader.h; path = RestKit/RKModelLoader.h; sourceTree = "<group>"; };
|
||||
2580B067102E0F1000832D07 /* RKModelLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKModelLoader.m; sourceTree = "<group>"; };
|
||||
25FCDDD91035BC85005418A7 /* RKManagedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RKManagedModel.h; path = RestKit/RKManagedModel.h; sourceTree = "<group>"; };
|
||||
@@ -446,6 +447,7 @@
|
||||
3F4E18EF102DD38700320118 /* RKRequestSerializable.h */,
|
||||
3F4E1918102DD42F00320118 /* NSDictionary+RKRequestSerialization.h */,
|
||||
3F4E1919102DD42F00320118 /* NSDictionary+RKRequestSerialization.m */,
|
||||
256FE8D6112EE5310077F340 /* RestKit.h */,
|
||||
);
|
||||
name = Core;
|
||||
path = Code;
|
||||
|
||||
Reference in New Issue
Block a user