2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
// MGMHTTPCookieStorage.h
|
|
|
|
// MGMUsers
|
|
|
|
//
|
|
|
|
// Created by Mr. Gecko on 12/28/08.
|
2011-02-24 11:24:19 -06:00
|
|
|
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
|
2011-03-07 19:02:53 -06:00
|
|
|
#import <Foundation/Foundation.h>
|
2010-09-20 19:44:17 -05:00
|
|
|
|
2011-09-11 14:54:29 -05:00
|
|
|
#define MGMEnableMemorySaving 1
|
|
|
|
|
2010-09-20 19:44:17 -05:00
|
|
|
@interface MGMHTTPCookieStorage : NSObject {
|
|
|
|
@private
|
2011-09-11 14:54:29 -05:00
|
|
|
#if MGMEnableMemorySaving
|
|
|
|
MGMHTTPCookieStorage *foundCookieJar;
|
|
|
|
#endif
|
2010-09-20 19:44:17 -05:00
|
|
|
NSString *cookiesPath;
|
|
|
|
NSHTTPCookieAcceptPolicy policy;
|
|
|
|
NSMutableArray *cookieJar;
|
|
|
|
}
|
2010-09-24 12:46:38 -05:00
|
|
|
#if !TARGET_OS_IPHONE
|
2010-09-20 19:44:17 -05:00
|
|
|
+ (void)override;
|
2010-09-24 12:46:38 -05:00
|
|
|
#endif
|
2010-09-20 19:44:17 -05:00
|
|
|
+ (void)setCookieJarPath:(NSString *)thePath;
|
|
|
|
+ (MGMHTTPCookieStorage *)sharedHTTPCookieStorage;
|
|
|
|
+ (MGMHTTPCookieStorage *)sharedCookieStorageWithPath:(NSString *)thePath;
|
|
|
|
+ (void)releaseShared;
|
|
|
|
+ (MGMHTTPCookieStorage *)cookieStorageWithPath:(NSString *)thePath;
|
|
|
|
- (id)initWithPath:(NSString *)thePath;
|
|
|
|
- (NSArray *)cookies;
|
|
|
|
- (void)removeAllCookies;
|
|
|
|
- (void)setNewPath:(NSString *)thePath;
|
|
|
|
- (void)setCookie:(NSHTTPCookie *)theCookie;
|
|
|
|
- (void)setCookies:(NSArray *)theCookies;
|
|
|
|
- (void)deleteCookie:(NSHTTPCookie *)theCookie;
|
|
|
|
- (NSArray *)cookiesForURL:(NSURL *)theURL;
|
|
|
|
- (void)setCookies:(NSArray *)theCookies forURL:(NSURL *)theURL mainDocumentURL:(NSURL *)theMainDocumentURL;
|
|
|
|
- (NSHTTPCookieAcceptPolicy)cookieAcceptPolicy;
|
|
|
|
- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)cookieAcceptPolicy;
|
|
|
|
@end
|