Sha256: 5865e0cf2bb1cd071f8bd9eb8e957661c19b1086f3e6e3e243ceaae7656e1e9c

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

//
//    wax_http_connection.h
//    RentList
//
//    Created by Corey Johnson on 8/9/09.
//    Copyright 2009 ProbablyInteractive. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "lua.h"

enum {
    WAX_HTTP_UNKNOWN,
    WAX_HTTP_TEXT,
    WAX_HTTP_BINARY, // Like an image or something
    WAX_HTTP_JSON,
    WAX_HTTP_XML
};

#define WAX_HTTP_CALLBACK_FUNCTION_NAME "callback"
#define WAX_HTTP_PROGRESS_CALLBACK_FUNCTION_NAME "progressCallback"
#define WAX_HTTP_AUTH_CALLBACK_FUNCTION_NAME "authCallback"
#define WAX_HTTP_REDIRECT_CALLBACK_FUNCTION_NAME "redirectCallback"

@interface wax_http_connection : NSURLConnection {
    lua_State *L;
    NSMutableData *_data;
    NSHTTPURLResponse *_response;
    NSURLRequest *_request;
    NSTimer *_timeoutTimer;
    NSError *_error;
    
    NSTimeInterval _timeout;
    int _format;
    bool _finished;
    bool _canceled;
}

@property (nonatomic, assign) NSHTTPURLResponse *response;

@property (nonatomic, assign) int format;
@property (nonatomic, readonly, getter=isFinished) bool finished;

- (id)initWithRequest:(NSURLRequest *)urlRequest timeout:(NSTimeInterval)timeout luaState:(lua_State *)luaState;
- (void)callRedirectCallback:(NSURLResponse *)redirectResponse;
- (BOOL)callLuaAuthCallback:(NSURLAuthenticationChallenge *)challenge;
- (void)callLuaProgressCallback;
- (void)callLuaCallback;

// HSHTTPURLResponse Delegate Methods
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;

@end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
candle-0.0.7 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h
candle-0.0.6 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h
candle-0.0.4 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h
candle-0.0.3 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h
candle-0.0.2 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h
candle-0.0.1 lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h