NSURLRequest.inc 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. { Parsed from Foundation.framework NSURLRequest.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSURLREQUEST_PAS_T}
  4. {$define NSURLREQUEST_PAS_T}
  5. { Constants }
  6. const
  7. NSURLRequestUseProtocolCachePolicy = 0;
  8. NSURLRequestReloadIgnoringLocalCacheData = 1;
  9. NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4;
  10. NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData;
  11. NSURLRequestReturnCacheDataElseLoad = 2;
  12. NSURLRequestReturnCacheDataDontLoad = 3;
  13. NSURLRequestReloadRevalidatingCacheData = 5;
  14. { Types }
  15. type
  16. NSURLRequestCachePolicy = NSUInteger;
  17. NSURLRequestCachePolicyPtr = ^NSURLRequestCachePolicy;
  18. {$endif}
  19. {$endif}
  20. {$ifdef RECORDS}
  21. {$ifndef NSURLREQUEST_PAS_R}
  22. {$define NSURLREQUEST_PAS_R}
  23. {$endif}
  24. {$endif}
  25. {$ifdef FUNCTIONS}
  26. {$ifndef NSURLREQUEST_PAS_F}
  27. {$define NSURLREQUEST_PAS_F}
  28. {$endif}
  29. {$endif}
  30. {$ifdef EXTERNAL_SYMBOLS}
  31. {$ifndef NSURLREQUEST_PAS_S}
  32. {$define NSURLREQUEST_PAS_S}
  33. {$endif}
  34. {$endif}
  35. {$ifdef FORWARD}
  36. NSURLRequest = objcclass;
  37. NSURLRequestPointer = ^NSURLRequest;
  38. NSURLRequestPtr = NSURLRequestPointer;
  39. NSMutableURLRequest = objcclass;
  40. NSMutableURLRequestPointer = ^NSMutableURLRequest;
  41. NSMutableURLRequestPtr = NSMutableURLRequestPointer;
  42. {$endif}
  43. {$ifdef CLASSES}
  44. {$ifndef NSURLREQUEST_PAS_C}
  45. {$define NSURLREQUEST_PAS_C}
  46. { NSURLRequest }
  47. NSURLRequest = objcclass external (NSObject, NSCodingProtocol, NSCopyingProtocol, NSMutableCopyingProtocol)
  48. private
  49. _internal: NSURLRequestInternal;
  50. public
  51. class function requestWithURL(URL_: NSURL): id; message 'requestWithURL:';
  52. class function requestWithURL_cachePolicy_timeoutInterval(URL_: NSURL; cachePolicy_: NSURLRequestCachePolicy; timeoutInterval_: NSTimeInterval): id; message 'requestWithURL:cachePolicy:timeoutInterval:';
  53. function initWithURL(URL_: NSURL): id; message 'initWithURL:';
  54. function initWithURL_cachePolicy_timeoutInterval(URL_: NSURL; cachePolicy_: NSURLRequestCachePolicy; timeoutInterval_: NSTimeInterval): id; message 'initWithURL:cachePolicy:timeoutInterval:';
  55. function URL: NSURL; message 'URL';
  56. function cachePolicy: NSURLRequestCachePolicy; message 'cachePolicy';
  57. function timeoutInterval: NSTimeInterval; message 'timeoutInterval';
  58. function mainDocumentURL: NSURL; message 'mainDocumentURL';
  59. { Adopted Protocols }
  60. procedure encodeWithCoder(aCoder: NSCoder);
  61. function initWithCoder(aDecoder: NSCoder): id;
  62. function copyWithZone(zone_: NSZonePtr): id;
  63. function mutableCopyWithZone(zone_: NSZonePtr): id;
  64. end;
  65. { NSMutableURLRequest }
  66. NSMutableURLRequest = objcclass external (NSURLRequest)
  67. public
  68. procedure setURL(URL_: NSURL); message 'setURL:';
  69. procedure setCachePolicy(policy: NSURLRequestCachePolicy); message 'setCachePolicy:';
  70. procedure setTimeoutInterval(seconds: NSTimeInterval); message 'setTimeoutInterval:';
  71. procedure setMainDocumentURL(URL_: NSURL); message 'setMainDocumentURL:';
  72. end;
  73. { NSHTTPURLRequestCategory }
  74. NSHTTPURLRequestCategory = objccategory external (NSURLRequest)
  75. function HTTPMethod: NSString; message 'HTTPMethod';
  76. function allHTTPHeaderFields: NSDictionary; message 'allHTTPHeaderFields';
  77. function valueForHTTPHeaderField(field: NSString): NSString; message 'valueForHTTPHeaderField:';
  78. function HTTPBody: NSData; message 'HTTPBody';
  79. function HTTPBodyStream: NSInputStream; message 'HTTPBodyStream';
  80. function HTTPShouldHandleCookies: Boolean; message 'HTTPShouldHandleCookies';
  81. end;
  82. { NSMutableHTTPURLRequestCategory }
  83. NSMutableHTTPURLRequestCategory = objccategory external (NSMutableURLRequest)
  84. procedure setHTTPMethod(method: NSString); message 'setHTTPMethod:';
  85. procedure setAllHTTPHeaderFields(headerFields: NSDictionary); message 'setAllHTTPHeaderFields:';
  86. procedure setValue_forHTTPHeaderField(value: NSString; field: NSString); message 'setValue:forHTTPHeaderField:';
  87. procedure addValue_forHTTPHeaderField(value: NSString; field: NSString); message 'addValue:forHTTPHeaderField:';
  88. procedure setHTTPBody(data: NSData); message 'setHTTPBody:';
  89. procedure setHTTPBodyStream(inputStream: NSInputStream); message 'setHTTPBodyStream:';
  90. procedure setHTTPShouldHandleCookies(should: Boolean); message 'setHTTPShouldHandleCookies:';
  91. end;
  92. {$endif}
  93. {$endif}