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

52 lines
1.8 KiB
C
Raw Permalink Normal View History

2010-09-20 19:44:17 -05:00
//
// MGMURLConnectionManager.h
// MGMUsers
//
// Created by Mr. Gecko on 2/21/11.
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
2010-09-20 19:44:17 -05:00
//
#import <Foundation/Foundation.h>
@class MGMURLConnectionManager;
2010-09-20 19:44:17 -05: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
2010-09-20 19:44:17 -05:00
@interface MGMURLConnectionManager : NSObject {
NSHTTPCookieStorage *cookieStorage;
NSString *userAgent;
2010-09-20 19:44:17 -05:00
NSURLCredential *credentials;
NSMutableArray *handlers;
BOOL runningSynchronousConnection;
2010-09-20 19:44:17 -05:00
}
+ (id)manager;
2010-09-20 19:44:17 -05:00
+ (id)managerWithCookieStorage:(id)theCookieStorage;
- (id)initWithCookieStorage:(id)theCookieStorage;
- (void)setCookieStorage:(id)theCookieStorage;
2010-09-20 19:44:17 -05:00
- (NSHTTPCookieStorage *)cookieStorage;
- (void)setUserAgent:(NSString *)theUserAgent;
- (NSString *)userAgent;
2010-09-20 19:44:17 -05:00
- (void)setCredentials:(NSURLCredential *)theCredentials;
- (void)setUser:(NSString *)theUser password:(NSString *)thePassword;
2010-09-20 19:44:17 -05:00
- (NSURLCredential *)credentials;
- (void)addHandler:(id)theHandler;
- (void)cancelHandler:(id)theHandler;
2010-09-20 19:44:17 -05:00
- (void)cancelAll;
@end