Permalink
Browse files

[Network] Move TTURLRequestCachePolicy to a separate file.

  • Loading branch information...
1 parent c2e40b3 commit 800bc0374b1e8ac32310479c446504f1479e7c72 @jverkoey jverkoey committed Apr 21, 2010
View
1 src/TTPhotoViewController.m
@@ -36,6 +36,7 @@
#import "Three20/TTDefaultStyleSheet.h"
// Network
+#import "Three20/TTGlobalNetwork.h"
#import "Three20/TTURLCache.h"
// Core
View
1 src/TTRequestLoader.m
@@ -17,6 +17,7 @@
#import "Three20/TTRequestLoader.h"
// Network
+#import "Three20/TTGlobalNetwork.h"
#import "Three20/TTURLRequest.h"
#import "Three20/TTURLRequestDelegate.h"
#import "Three20/TTURLRequestQueue.h"
View
1 src/TTThumbsDataSource.m
@@ -24,6 +24,7 @@
#import "Three20/TTThumbsTableViewCell.h"
// Network
+#import "Three20/TTGlobalNetwork.h"
#import "Three20/TTURLCache.h"
// Core
View
1 src/TTURLRequest.m
@@ -17,6 +17,7 @@
#import "Three20/TTURLRequest.h"
// Network
+#import "Three20/TTGlobalNetwork.h"
#import "Three20/TTURLResponse.h"
#import "Three20/TTURLRequestQueue.h"
View
4 src/Three20.xcodeproj/project.pbxproj
@@ -124,6 +124,7 @@
6E5CEEBD117E2F4900798CF8 /* Three20Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E5CEEBB117E2F4900798CF8 /* Three20Core.h */; };
6E5CEEBE117E2F4900798CF8 /* Three20Network.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E5CEEBC117E2F4900798CF8 /* Three20Network.h */; };
6E5CEFA6117E47C900798CF8 /* TTGlobalStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E5CEFA5117E47C900798CF8 /* TTGlobalStyle.m */; };
+ 6E5CF241117E90EE00798CF8 /* TTURLRequestCachePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E5CF240117E90EE00798CF8 /* TTURLRequestCachePolicy.h */; };
6E6206A91176486D00035C6C /* TTTableMoreButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6206A71176486D00035C6C /* TTTableMoreButtonCell.m */; };
6E6206AB1176487B00035C6C /* TTTableMoreButtonCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6206AA1176487B00035C6C /* TTTableMoreButtonCell.h */; };
6E6206B1117648F900035C6C /* TTTableImageItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6206AF117648F900035C6C /* TTTableImageItemCell.m */; };
@@ -609,6 +610,7 @@
6E5CEEBB117E2F4900798CF8 /* Three20Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Core.h; path = Three20/Three20Core.h; sourceTree = "<group>"; };
6E5CEEBC117E2F4900798CF8 /* Three20Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Network.h; path = Three20/Three20Network.h; sourceTree = "<group>"; };
6E5CEFA5117E47C900798CF8 /* TTGlobalStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTGlobalStyle.m; sourceTree = "<group>"; };
+ 6E5CF240117E90EE00798CF8 /* TTURLRequestCachePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestCachePolicy.h; path = Three20/TTURLRequestCachePolicy.h; sourceTree = "<group>"; };
6E6206A71176486D00035C6C /* TTTableMoreButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTableMoreButtonCell.m; sourceTree = "<group>"; };
6E6206AA1176487B00035C6C /* TTTableMoreButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableMoreButtonCell.h; path = Three20/TTTableMoreButtonCell.h; sourceTree = "<group>"; };
6E6206AF117648F900035C6C /* TTTableImageItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTableImageItemCell.m; sourceTree = "<group>"; };
@@ -1253,6 +1255,7 @@
children = (
EB4CDA5110CAD85E00A856E5 /* TTGlobalNetwork.h */,
EB4CDA4E10CAD83A00A856E5 /* TTGlobalNetwork.m */,
+ 6E5CF240117E90EE00798CF8 /* TTURLRequestCachePolicy.h */,
);
name = Global;
sourceTree = "<group>";
@@ -2213,6 +2216,7 @@
6E5CEC69117CD83F00798CF8 /* TTStyledImageFrame.h in Headers */,
6E5CEEBD117E2F4900798CF8 /* Three20Core.h in Headers */,
6E5CEEBE117E2F4900798CF8 /* Three20Network.h in Headers */,
+ 6E5CF241117E90EE00798CF8 /* TTURLRequestCachePolicy.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
13 src/Three20/TTGlobalNetwork.h
@@ -16,19 +16,6 @@
#import <Foundation/Foundation.h>
-typedef enum {
- TTURLRequestCachePolicyNone = 0,
- TTURLRequestCachePolicyMemory = 1,
- TTURLRequestCachePolicyDisk = 2,
- TTURLRequestCachePolicyNetwork = 4,
- TTURLRequestCachePolicyNoCache = 8,
- TTURLRequestCachePolicyLocal
- = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk),
- TTURLRequestCachePolicyDefault
- = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk
- | TTURLRequestCachePolicyNetwork),
-} TTURLRequestCachePolicy;
-
#define TT_DEFAULT_CACHE_INVALIDATION_AGE (60*60*24) // 1 day
#define TT_DEFAULT_CACHE_EXPIRATION_AGE (60*60*24*7) // 1 week
#define TT_CACHE_EXPIRATION_AGE_NEVER (1.0 / 0.0) // inf
View
4 src/Three20/TTModel.h
@@ -14,8 +14,10 @@
// limitations under the License.
//
+#import <Foundation/Foundation.h>
+
// Network
-#import "Three20/TTGlobalNetwork.h" // For TTURLRequestCachePolicy
+#import "Three20/TTURLRequestCachePolicy.h"
/**
* TTModel describes the state of an object that can be loaded from a remote source.
View
4 src/Three20/TTRequestLoader.h
@@ -14,8 +14,10 @@
// limitations under the License.
//
+#import <Foundation/Foundation.h>
+
// Network
-#import "Three20/TTGlobalNetwork.h"
+#import "Three20/TTURLRequestCachePolicy.h"
// Core
#import "Three20/TTCorePreprocessorMacros.h" // For __TTDEPRECATED_METHOD
View
4 src/Three20/TTURLRequest.h
@@ -14,8 +14,10 @@
// limitations under the License.
//
+#import <Foundation/Foundation.h>
+
// Network
-#import "Three20/TTGlobalNetwork.h"
+#import "Three20/TTURLRequestCachePolicy.h"
// Core
#import "Three20/TTCorePreprocessorMacros.h" // For __TTDEPRECATED_METHOD
View
28 src/Three20/TTURLRequestCachePolicy.h
@@ -0,0 +1,28 @@
+//
+// Copyright 2009-2010 Facebook
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+typedef enum {
+ TTURLRequestCachePolicyNone = 0,
+ TTURLRequestCachePolicyMemory = 1,
+ TTURLRequestCachePolicyDisk = 2,
+ TTURLRequestCachePolicyNetwork = 4,
+ TTURLRequestCachePolicyNoCache = 8,
+ TTURLRequestCachePolicyLocal
+ = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk),
+ TTURLRequestCachePolicyDefault
+ = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk
+ | TTURLRequestCachePolicyNetwork),
+} TTURLRequestCachePolicy;
View
1 src/Three20/Three20Network.h
@@ -20,6 +20,7 @@
// Network
// - Global
#import "Three20/TTGlobalNetwork.h"
+#import "Three20/TTURLRequestCachePolicy.h"
// - Models
#import "Three20/TTModel.h"

0 comments on commit 800bc03

Please sign in to comment.