summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSHTTPCookieStorage.inc
blob: 03972ba81eb555492cae527af3aa78ac68fd06d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ Parsed from Foundation.framework NSHTTPCookieStorage.h }

{$ifdef TYPES}
{$ifndef NSHTTPCOOKIESTORAGE_PAS_T}
{$define NSHTTPCOOKIESTORAGE_PAS_T}

{ Constants }

const
  NSHTTPCookieAcceptPolicyAlways = 0;
  NSHTTPCookieAcceptPolicyNever = 1;
  NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2;

{ Types }
type
  NSHTTPCookieAcceptPolicy = NSUInteger;
  NSHTTPCookieAcceptPolicyPtr = ^NSHTTPCookieAcceptPolicy;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSHTTPCOOKIESTORAGE_PAS_R}
{$define NSHTTPCOOKIESTORAGE_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSHTTPCOOKIESTORAGE_PAS_F}
{$define NSHTTPCOOKIESTORAGE_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSHTTPCOOKIESTORAGE_PAS_S}
{$define NSHTTPCOOKIESTORAGE_PAS_S}

{ External string constants }
var
  NSHTTPCookieManagerAcceptPolicyChangedNotification: NSString; cvar; external;
  NSHTTPCookieManagerCookiesChangedNotification: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSHTTPCookieStorage = objcclass;
  NSHTTPCookieStoragePointer = ^NSHTTPCookieStorage;
  NSHTTPCookieStoragePtr = NSHTTPCookieStoragePointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSHTTPCOOKIESTORAGE_PAS_C}
{$define NSHTTPCOOKIESTORAGE_PAS_C}

{ NSHTTPCookieStorage }
  NSHTTPCookieStorage = objcclass external (NSObject)
  private
    _internal: NSHTTPCookieStorageInternal;
    
  public
    class function sharedHTTPCookieStorage: NSHTTPCookieStorage; message 'sharedHTTPCookieStorage';
    function initWithStorageLocation(storageFileURL: NSURL): id; message 'initWithStorageLocation:';
    function cookies: NSArray; message 'cookies';
    procedure setCookie(cookie: NSHTTPCookie); message 'setCookie:';
    procedure deleteCookie(cookie: NSHTTPCookie); message 'deleteCookie:';
    function cookiesForURL(URL: NSURL): NSArray; message 'cookiesForURL:';
    procedure setCookies_forURL_mainDocumentURL(cookies_: NSArray; URL: NSURL; mainDocumentURL: NSURL); message 'setCookies:forURL:mainDocumentURL:';
    function cookieAcceptPolicy: NSHTTPCookieAcceptPolicy; message 'cookieAcceptPolicy';
    procedure setCookieAcceptPolicy(cookieAcceptPolicy_: NSHTTPCookieAcceptPolicy); message 'setCookieAcceptPolicy:';
  end;

{$endif}
{$endif}