/packages/cocoaint/src/foundation/NSError.inc

https://github.com/slibre/freepascal · Pascal · 93 lines · 44 code · 17 blank · 32 comment · 0 complexity · d7b3e152d468e8ae545711d561ece8e4 MD5 · raw file

  1. { Parsed from Foundation.framework NSError.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSERROR_PAS_T}
  4. {$define NSERROR_PAS_T}
  5. {$endif}
  6. {$endif}
  7. {$ifdef RECORDS}
  8. {$ifndef NSERROR_PAS_R}
  9. {$define NSERROR_PAS_R}
  10. {$endif}
  11. {$endif}
  12. {$ifdef FUNCTIONS}
  13. {$ifndef NSERROR_PAS_F}
  14. {$define NSERROR_PAS_F}
  15. {$endif}
  16. {$endif}
  17. {$ifdef EXTERNAL_SYMBOLS}
  18. {$ifndef NSERROR_PAS_S}
  19. {$define NSERROR_PAS_S}
  20. { External string constants }
  21. var
  22. NSCocoaErrorDomain: NSString; cvar; external;
  23. NSPOSIXErrorDomain: NSString; cvar; external;
  24. NSOSStatusErrorDomain: NSString; cvar; external;
  25. NSMachErrorDomain: NSString; cvar; external;
  26. NSUnderlyingErrorKey: NSString; cvar; external;
  27. NSLocalizedDescriptionKey: NSString; cvar; external;
  28. NSLocalizedFailureReasonErrorKey: NSString; cvar; external;
  29. NSLocalizedRecoverySuggestionErrorKey: NSString; cvar; external;
  30. NSLocalizedRecoveryOptionsErrorKey: NSString; cvar; external;
  31. NSRecoveryAttempterErrorKey: NSString; cvar; external;
  32. NSHelpAnchorErrorKey: NSString; cvar; external;
  33. NSStringEncodingErrorKey: NSString; cvar; external;
  34. NSURLErrorKey: NSString; cvar; external;
  35. NSFilePathErrorKey: NSString; cvar; external;
  36. {$endif}
  37. {$endif}
  38. {$ifdef FORWARD}
  39. NSError = objcclass;
  40. NSErrorPointer = ^NSError;
  41. NSErrorPtr = NSErrorPointer;
  42. {$endif}
  43. {$ifdef CLASSES}
  44. {$ifndef NSERROR_PAS_C}
  45. {$define NSERROR_PAS_C}
  46. { NSError }
  47. NSError = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  48. private
  49. _reserved: Pointer;
  50. _code: NSInteger;
  51. _domain: NSString;
  52. _userInfo: NSDictionary;
  53. public
  54. function initWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'initWithDomain:code:userInfo:';
  55. class function errorWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'errorWithDomain:code:userInfo:';
  56. function domain: NSString; message 'domain';
  57. function code: NSInteger; message 'code';
  58. function userInfo: NSDictionary; message 'userInfo';
  59. function localizedDescription: NSString; message 'localizedDescription';
  60. function localizedFailureReason: NSString; message 'localizedFailureReason';
  61. function localizedRecoverySuggestion: NSString; message 'localizedRecoverySuggestion';
  62. function localizedRecoveryOptions: NSArray; message 'localizedRecoveryOptions';
  63. function recoveryAttempter: id; message 'recoveryAttempter';
  64. function helpAnchor: NSString; message 'helpAnchor';
  65. { Adopted Protocols }
  66. function copyWithZone(zone_: NSZonePtr): id;
  67. procedure encodeWithCoder(aCoder: NSCoder);
  68. function initWithCoder(aDecoder: NSCoder): id;
  69. end;
  70. { NSErrorRecoveryAttemptingCategory }
  71. NSErrorRecoveryAttemptingCategory = objccategory external (NSObject)
  72. procedure attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo(error: NSError; recoveryOptionIndex: NSUInteger; delegate: id; didRecoverSelector: SEL; contextInfo: Pointer); message 'attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:';
  73. function attemptRecoveryFromError_optionIndex(error: NSError; recoveryOptionIndex: NSUInteger): Boolean; message 'attemptRecoveryFromError:optionIndex:';
  74. end;
  75. {$endif}
  76. {$endif}