Skip to content

Commit

Permalink
Renamed GCDWebServerStreamingResponse to GCDWebServerStreamedResponse.h
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspol committed Apr 19, 2014
1 parent 0807cf5 commit 766072e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions GCDWebServer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
E28BAE4918F99C810095C089 /* GCDWebServerErrorResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE2F18F99C810095C089 /* GCDWebServerErrorResponse.m */; };
E28BAE4A18F99C810095C089 /* GCDWebServerFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3118F99C810095C089 /* GCDWebServerFileResponse.m */; };
E28BAE4B18F99C810095C089 /* GCDWebServerFileResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3118F99C810095C089 /* GCDWebServerFileResponse.m */; };
E28BAE4C18F99C810095C089 /* GCDWebServerStreamingResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3318F99C810095C089 /* GCDWebServerStreamingResponse.m */; };
E28BAE4D18F99C810095C089 /* GCDWebServerStreamingResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3318F99C810095C089 /* GCDWebServerStreamingResponse.m */; };
E28BAE4C18F99C810095C089 /* GCDWebServerStreamedResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3318F99C810095C089 /* GCDWebServerStreamedResponse.m */; };
E28BAE4D18F99C810095C089 /* GCDWebServerStreamedResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = E28BAE3318F99C810095C089 /* GCDWebServerStreamedResponse.m */; };
E2A0E80A18F3432600C580B1 /* GCDWebDAVServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A0E80918F3432600C580B1 /* GCDWebDAVServer.m */; };
E2A0E80B18F3432600C580B1 /* GCDWebDAVServer.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A0E80918F3432600C580B1 /* GCDWebDAVServer.m */; };
E2A0E80D18F35C9A00C580B1 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A0E80C18F35C9A00C580B1 /* libxml2.dylib */; };
Expand Down Expand Up @@ -138,8 +138,8 @@
E28BAE2F18F99C810095C089 /* GCDWebServerErrorResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServerErrorResponse.m; sourceTree = "<group>"; };
E28BAE3018F99C810095C089 /* GCDWebServerFileResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerFileResponse.h; sourceTree = "<group>"; };
E28BAE3118F99C810095C089 /* GCDWebServerFileResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServerFileResponse.m; sourceTree = "<group>"; };
E28BAE3218F99C810095C089 /* GCDWebServerStreamingResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerStreamingResponse.h; sourceTree = "<group>"; };
E28BAE3318F99C810095C089 /* GCDWebServerStreamingResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServerStreamingResponse.m; sourceTree = "<group>"; };
E28BAE3218F99C810095C089 /* GCDWebServerStreamedResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerStreamedResponse.h; sourceTree = "<group>"; };
E28BAE3318F99C810095C089 /* GCDWebServerStreamedResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServerStreamedResponse.m; sourceTree = "<group>"; };
E2A0E80818F3432600C580B1 /* GCDWebDAVServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebDAVServer.h; sourceTree = "<group>"; };
E2A0E80918F3432600C580B1 /* GCDWebDAVServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebDAVServer.m; sourceTree = "<group>"; };
E2A0E80C18F35C9A00C580B1 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/lib/libxml2.dylib; sourceTree = DEVELOPER_DIR; };
Expand Down Expand Up @@ -300,8 +300,8 @@
E28BAE2F18F99C810095C089 /* GCDWebServerErrorResponse.m */,
E28BAE3018F99C810095C089 /* GCDWebServerFileResponse.h */,
E28BAE3118F99C810095C089 /* GCDWebServerFileResponse.m */,
E28BAE3218F99C810095C089 /* GCDWebServerStreamingResponse.h */,
E28BAE3318F99C810095C089 /* GCDWebServerStreamingResponse.m */,
E28BAE3218F99C810095C089 /* GCDWebServerStreamedResponse.h */,
E28BAE3318F99C810095C089 /* GCDWebServerStreamedResponse.m */,
);
path = Responses;
sourceTree = "<group>";
Expand Down Expand Up @@ -437,7 +437,7 @@
E28BAE3618F99C810095C089 /* GCDWebServerConnection.m in Sources */,
E28BAE3C18F99C810095C089 /* GCDWebServerResponse.m in Sources */,
E28BAE4018F99C810095C089 /* GCDWebServerFileRequest.m in Sources */,
E28BAE4C18F99C810095C089 /* GCDWebServerStreamingResponse.m in Sources */,
E28BAE4C18F99C810095C089 /* GCDWebServerStreamedResponse.m in Sources */,
E28BAE3E18F99C810095C089 /* GCDWebServerDataRequest.m in Sources */,
E2A0E80A18F3432600C580B1 /* GCDWebDAVServer.m in Sources */,
E28BAE4218F99C810095C089 /* GCDWebServerMultiPartFormRequest.m in Sources */,
Expand All @@ -457,7 +457,7 @@
E28BAE4B18F99C810095C089 /* GCDWebServerFileResponse.m in Sources */,
E28BAE3918F99C810095C089 /* GCDWebServerFunctions.m in Sources */,
E28BAE4118F99C810095C089 /* GCDWebServerFileRequest.m in Sources */,
E28BAE4D18F99C810095C089 /* GCDWebServerStreamingResponse.m in Sources */,
E28BAE4D18F99C810095C089 /* GCDWebServerStreamedResponse.m in Sources */,
E28BAE3F18F99C810095C089 /* GCDWebServerDataRequest.m in Sources */,
E2BE850B18E77ECA0061360B /* GCDWebUploader.m in Sources */,
E22112951690B64F0048D2B2 /* AppDelegate.m in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion GCDWebServer/Core/GCDWebServerPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#import "GCDWebServerDataResponse.h"
#import "GCDWebServerErrorResponse.h"
#import "GCDWebServerFileResponse.h"
#import "GCDWebServerStreamingResponse.h"
#import "GCDWebServerStreamedResponse.h"

#ifdef __GCDWEBSERVER_LOGGING_HEADER__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#import "GCDWebServerStreamingResponse.h"
#import "GCDWebServerStreamedResponse.h"

/**
* The GCDWebServerStreamBlock is called to stream the data for the HTTP body.
* The GCDWebServerStreamingBlock is called to stream the data for the HTTP body.
* The block must return empty NSData when done or nil on error and set the
* "error" argument which is guaranteed to be non-NULL.
*/
typedef NSData* (^GCDWebServerStreamBlock)(NSError** error);
typedef NSData* (^GCDWebServerStreamingBlock)(NSError** error);

/**
* The GCDWebServerStreamingResponse subclass of GCDWebServerResponse streams
* The GCDWebServerStreamedResponse subclass of GCDWebServerResponse streams
* the body of the HTTP response using a GCD block.
*/
@interface GCDWebServerStreamingResponse : GCDWebServerResponse
@interface GCDWebServerStreamedResponse : GCDWebServerResponse

/**
* Creates a response with streamed data and a given content type.
*/
+ (instancetype)responseWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamBlock)block;
+ (instancetype)responseWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamingBlock)block;

/**
* This method is the designated initializer for the class.
*/
- (instancetype)initWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamBlock)block;
- (instancetype)initWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamingBlock)block;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@

#import "GCDWebServerPrivate.h"

@interface GCDWebServerStreamingResponse () {
@interface GCDWebServerStreamedResponse () {
@private
GCDWebServerStreamBlock _block;
GCDWebServerStreamingBlock _block;
}
@end

@implementation GCDWebServerStreamingResponse
@implementation GCDWebServerStreamedResponse

+ (instancetype)responseWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamBlock)block {
+ (instancetype)responseWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamingBlock)block {
return ARC_AUTORELEASE([[[self class] alloc] initWithContentType:type streamBlock:block]);
}

- (instancetype)initWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamBlock)block {
- (instancetype)initWithContentType:(NSString*)type streamBlock:(GCDWebServerStreamingBlock)block {
if ((self = [super init])) {
_block = [block copy];

Expand Down
4 changes: 2 additions & 2 deletions Mac/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#import "GCDWebServerURLEncodedFormRequest.h"

#import "GCDWebServerDataResponse.h"
#import "GCDWebServerStreamingResponse.h"
#import "GCDWebServerStreamedResponse.h"

#import "GCDWebDAVServer.h"

Expand Down Expand Up @@ -267,7 +267,7 @@ int main(int argc, const char* argv[]) {
processBlock:^GCDWebServerResponse *(GCDWebServerRequest* request) {

__block int countDown = 10;
return [GCDWebServerStreamingResponse responseWithContentType:@"text/plain" streamBlock:^NSData *(NSError** error) {
return [GCDWebServerStreamedResponse responseWithContentType:@"text/plain" streamBlock:^NSData *(NSError** error) {

usleep(100 * 1000);
if (countDown) {
Expand Down

0 comments on commit 766072e

Please sign in to comment.