forked from pokeb/asi-http-request
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/pokeb/asi-http-request
Conflicts: Classes/ASIHTTPRequestConfig.h
- Loading branch information
Showing
85 changed files
with
7,822 additions
and
2,805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ build | |
profile | ||
*.pbxuser | ||
*.mode1v3 | ||
External/GHUnit/* | ||
.svn |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# This script fetches a pre-compiled copy of the iOS GHUnit.framework, if one isn't already in the External/GHUnit folder | ||
# This replaces the old system, where GHUnit was included as a git submodule, because: | ||
# a) git submodules confuse people (including me) | ||
# b) GHUnit seems to be tricky to build without warnings | ||
# The pre-compiled frameworks on allseeing-i.com were taken directly from those on the GHUnit downloads page on GitHub | ||
# If you'd rather build GHUnit yourself, simply grab a copy from http://github.com/gabriel/gh-unit and drop your built framework into External/GHUnit | ||
|
||
require 'net/http' | ||
if (!File.exists?('External/GHUnit/GHUnitIOS.framework')) | ||
`curl -s http://allseeing-i.com/ASIHTTPRequest/GHUnit/GHUnit-IOS.zip > External/GHUnit/GHUnit-IOS.zip` | ||
`unzip External/GHUnit/GHUnit-IOS.zip -d External/GHUnit/ & rm External/GHUnit/GHUnit-IOS.zip` | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# This script fetches a pre-compiled copy of the Mac GHUnit.framework, if one isn't already in the External/GHUnit folder | ||
# This replaces the old system, where GHUnit was included as a git submodule, because: | ||
# a) git submodules confuse people (including me) | ||
# b) GHUnit seems to be tricky to build without warnings | ||
# The pre-compiled frameworks on allseeing-i.com were taken directly from those on the GHUnit downloads page on GitHub | ||
# If you'd rather build GHUnit yourself, simply grab a copy from http://github.com/gabriel/gh-unit and drop your built framework into External/GHUnit | ||
|
||
require 'net/http' | ||
if (!File.exists?('External/GHUnit/GHUnit.framework')) | ||
`curl -s http://allseeing-i.com/ASIHTTPRequest/GHUnit/GHUnit-Mac.zip > External/GHUnit/GHUnit-Mac.zip` | ||
`unzip External/GHUnit/GHUnit-Mac.zip -d External/GHUnit/ & rm External/GHUnit/GHUnit-Mac.zip` | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// ASIDataCompressor.h | ||
// Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest | ||
// | ||
// Created by Ben Copsey on 17/08/2010. | ||
// Copyright 2010 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
// This is a helper class used by ASIHTTPRequest to handle deflating (compressing) data in memory and on disk | ||
// You may also find it helpful if you need to deflate data and files yourself - see the class methods below | ||
// Most of the zlib stuff is based on the sample code by Mark Adler available at http://zlib.net | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <zlib.h> | ||
|
||
@interface ASIDataCompressor : NSObject { | ||
BOOL streamReady; | ||
z_stream zStream; | ||
} | ||
|
||
// Convenience constructor will call setupStream for you | ||
+ (id)compressor; | ||
|
||
// Compress the passed chunk of data | ||
// Passing YES for shouldFinish will finalize the deflated data - you must pass YES when you are on the last chunk of data | ||
- (NSData *)compressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSError **)err shouldFinish:(BOOL)shouldFinish; | ||
|
||
// Convenience method - pass it some data, and you'll get deflated data back | ||
+ (NSData *)compressData:(NSData*)uncompressedData error:(NSError **)err; | ||
|
||
// Convenience method - pass it a file containing the data to compress in sourcePath, and it will write deflated data to destinationPath | ||
+ (BOOL)compressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinationPath error:(NSError **)err; | ||
|
||
// Sets up zlib to handle the inflating. You only need to call this yourself if you aren't using the convenience constructor 'compressor' | ||
- (NSError *)setupStream; | ||
|
||
// Tells zlib to clean up. You need to call this if you need to cancel deflating part way through | ||
// If deflating finishes or fails, this method will be called automatically | ||
- (NSError *)closeStream; | ||
|
||
@property (assign, readonly) BOOL streamReady; | ||
@end |
Oops, something went wrong.