CocoaShare/Frameworks/MGMUsers.framework/Versions/A/Headers/MGMURLConnectionManager.h

52 lines
1.8 KiB
C
Raw Permalink Normal View History

2011-02-01 09:51:02 -06:00
//
// MGMURLConnectionManager.h
// MGMUsers
//
// Created by Mr. Gecko on 2/21/11.
2011-02-01 09:51:02 -06:00
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
//
#import <Foundation/Foundation.h>
@class MGMURLConnectionManager;
2011-02-01 09:51:02 -06:00
@protocol MGMURLConnectionHandler <NSObject>
- (void)setManager:(MGMURLConnectionManager *)theManager;
- (void)setConnection:(NSURLConnection *)theConnection;
- (NSURLConnection *)connection;
- (void)setRequest:(NSMutableURLRequest *)theRequest;
- (NSMutableURLRequest *)request;
- (BOOL)synchronous;
- (NSURLCredential *)credentailsForChallenge:(NSURLAuthenticationChallenge *)theChallenge;
- (void)uploaded:(unsigned long)theBytes totalBytes:(unsigned long)theTotalBytes totalBytesExpected:(unsigned long)theExpectedBytes;
- (NSURLRequest *)willSendRequest:(NSURLRequest *)theRequest redirectResponse:(NSHTTPURLResponse *)theResponse;
- (void)didReceiveResponse:(NSHTTPURLResponse *)theResponse;
- (void)didReceiveData:(NSData *)theData;
- (void)didFailWithError:(NSError *)theError;
- (void)didFinishLoading;
@end
2011-02-01 09:51:02 -06:00
@interface MGMURLConnectionManager : NSObject {
NSHTTPCookieStorage *cookieStorage;
NSString *userAgent;
2011-02-01 09:51:02 -06:00
NSURLCredential *credentials;
NSMutableArray *handlers;
BOOL runningSynchronousConnection;
2011-02-01 09:51:02 -06:00
}
+ (id)manager;
2011-02-01 09:51:02 -06:00
+ (id)managerWithCookieStorage:(id)theCookieStorage;
- (id)initWithCookieStorage:(id)theCookieStorage;
- (void)setCookieStorage:(id)theCookieStorage;
2011-02-01 09:51:02 -06:00
- (NSHTTPCookieStorage *)cookieStorage;
- (void)setUserAgent:(NSString *)theUserAgent;
- (NSString *)userAgent;
2011-02-01 09:51:02 -06:00
- (void)setCredentials:(NSURLCredential *)theCredentials;
- (void)setUser:(NSString *)theUser password:(NSString *)thePassword;
2011-02-01 09:51:02 -06:00
- (NSURLCredential *)credentials;
- (void)addHandler:(id)theHandler;
- (void)cancelHandler:(id)theHandler;
2011-02-01 09:51:02 -06:00
- (void)cancelAll;
@end