PageRenderTime 27ms CodeModel.GetById 22ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/cocoaint/src/foundation/NSHTTPCookieStorage.inc

https://github.com/slibre/freepascal
Pascal | 77 lines | 27 code | 18 blank | 32 comment | 0 complexity | 5ef986ace6f82da5ade67aaca6d5f663 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{ Parsed from Foundation.framework NSHTTPCookieStorage.h }
 2
 3{$ifdef TYPES}
 4{$ifndef NSHTTPCOOKIESTORAGE_PAS_T}
 5{$define NSHTTPCOOKIESTORAGE_PAS_T}
 6
 7{ Constants }
 8
 9const
10  NSHTTPCookieAcceptPolicyAlways = 0;
11  NSHTTPCookieAcceptPolicyNever = 1;
12  NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2;
13
14{ Types }
15type
16  NSHTTPCookieAcceptPolicy = NSUInteger;
17  NSHTTPCookieAcceptPolicyPtr = ^NSHTTPCookieAcceptPolicy;
18
19{$endif}
20{$endif}
21
22{$ifdef RECORDS}
23{$ifndef NSHTTPCOOKIESTORAGE_PAS_R}
24{$define NSHTTPCOOKIESTORAGE_PAS_R}
25
26{$endif}
27{$endif}
28
29{$ifdef FUNCTIONS}
30{$ifndef NSHTTPCOOKIESTORAGE_PAS_F}
31{$define NSHTTPCOOKIESTORAGE_PAS_F}
32
33{$endif}
34{$endif}
35
36{$ifdef EXTERNAL_SYMBOLS}
37{$ifndef NSHTTPCOOKIESTORAGE_PAS_S}
38{$define NSHTTPCOOKIESTORAGE_PAS_S}
39
40{ External string constants }
41var
42  NSHTTPCookieManagerAcceptPolicyChangedNotification: NSString; cvar; external;
43  NSHTTPCookieManagerCookiesChangedNotification: NSString; cvar; external;
44
45{$endif}
46{$endif}
47
48{$ifdef FORWARD}
49  NSHTTPCookieStorage = objcclass;
50  NSHTTPCookieStoragePointer = ^NSHTTPCookieStorage;
51  NSHTTPCookieStoragePtr = NSHTTPCookieStoragePointer;
52
53{$endif}
54
55{$ifdef CLASSES}
56{$ifndef NSHTTPCOOKIESTORAGE_PAS_C}
57{$define NSHTTPCOOKIESTORAGE_PAS_C}
58
59{ NSHTTPCookieStorage }
60  NSHTTPCookieStorage = objcclass external (NSObject)
61  private
62    _internal: NSHTTPCookieStorageInternal;
63    
64  public
65    class function sharedHTTPCookieStorage: NSHTTPCookieStorage; message 'sharedHTTPCookieStorage';
66    function initWithStorageLocation(storageFileURL: NSURL): id; message 'initWithStorageLocation:';
67    function cookies: NSArray; message 'cookies';
68    procedure setCookie(cookie: NSHTTPCookie); message 'setCookie:';
69    procedure deleteCookie(cookie: NSHTTPCookie); message 'deleteCookie:';
70    function cookiesForURL(URL: NSURL): NSArray; message 'cookiesForURL:';
71    procedure setCookies_forURL_mainDocumentURL(cookies_: NSArray; URL: NSURL; mainDocumentURL: NSURL); message 'setCookies:forURL:mainDocumentURL:';
72    function cookieAcceptPolicy: NSHTTPCookieAcceptPolicy; message 'cookieAcceptPolicy';
73    procedure setCookieAcceptPolicy(cookieAcceptPolicy_: NSHTTPCookieAcceptPolicy); message 'setCookieAcceptPolicy:';
74  end;
75
76{$endif}
77{$endif}