diff --git a/src/imagecapturecore.cs b/src/imagecapturecore.cs index faa0ad5afb..cf60b9587d 100644 --- a/src/imagecapturecore.cs +++ b/src/imagecapturecore.cs @@ -214,7 +214,7 @@ namespace ImageCaptureCore { [Export ("modulePath")] string ModulePath { get; } - [Export ("moduleVersion")] + [NullAllowed, Export ("moduleVersion")] string ModuleVersion { get; } [Export ("moduleExecutableArchitecture")] @@ -353,16 +353,16 @@ namespace ImageCaptureCore { [BaseType (typeof(NSObject))] interface ICCameraItem { - [Export ("device")] + [NullAllowed, Export ("device")] ICCameraDevice Device { get; } - [Export ("parentFolder")] + [NullAllowed, Export ("parentFolder")] ICCameraFolder ParentFolder { get; } - [Export ("name")] + [NullAllowed, Export ("name")] string Name { get; } - [Export ("UTI")] + [NullAllowed, Export ("UTI")] string Uti { get; } [NullAllowed, Export ("fileSystemPath")] @@ -406,7 +406,7 @@ namespace ImageCaptureCore { [BaseType (typeof(ICCameraItem))] interface ICCameraFolder { - [Export ("contents")] + [NullAllowed, Export ("contents")] ICCameraItem[] Contents { get; } } @@ -423,7 +423,7 @@ namespace ImageCaptureCore { [Export ("duration")] double Duration { get; } - [Export ("sidecarFiles")] + [NullAllowed, Export ("sidecarFiles")] ICCameraItem[] SidecarFiles { get; } } @@ -495,7 +495,7 @@ namespace ImageCaptureCore { interface ICCameraDeviceDownloadDelegate { [Export ("didDownloadFile:error:options:contextInfo:")] - void DidDownloadFile (ICCameraFile file, [NullAllowed] NSError error, [NullAllowed] NSDictionary options, [NullAllowed] IntPtr contextInfo); + void DidDownloadFile (ICCameraFile file, [NullAllowed] NSError error, NSDictionary options, [NullAllowed] IntPtr contextInfo); [Export ("didReceiveDownloadProgressForFile:downloadedBytes:maxBytes:")] void DidReceiveDownloadProgress (ICCameraFile file, long downloadedBytes, long maxBytes); @@ -555,13 +555,13 @@ namespace ImageCaptureCore { void CancelDelete (); [Export ("requestDownloadFile:options:downloadDelegate:didDownloadSelector:contextInfo:")] - void RequestDownloadFile (ICCameraFile file, [NullAllowed] NSDictionary options, IICCameraDeviceDownloadDelegate downloadDelegate, Selector didDownloadSelector, [NullAllowed] IntPtr contextInfo); + void RequestDownloadFile (ICCameraFile file, NSDictionary options, IICCameraDeviceDownloadDelegate downloadDelegate, Selector didDownloadSelector, [NullAllowed] IntPtr contextInfo); [Export ("cancelDownload")] void CancelDownload (); [Export ("requestUploadFile:options:uploadDelegate:didUploadSelector:contextInfo:")] - void RequestUploadFile (NSUrl fileUrl, [NullAllowed] NSDictionary options, NSObject uploadDelegate, Selector didUploadSelector, [NullAllowed] IntPtr contextInfo); + void RequestUploadFile (NSUrl fileUrl, NSDictionary options, NSObject uploadDelegate, Selector didUploadSelector, [NullAllowed] IntPtr contextInfo); [Export ("requestReadDataFromFile:atOffset:length:readDelegate:didReadDataSelector:contextInfo:")] void RequestReadDataFromFile (ICCameraFile file, long offset, long length, NSObject readDelegate, Selector didReadDataSelector, [NullAllowed] IntPtr contextInfo); diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ImageCaptureCore.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ImageCaptureCore.ignore index ad42b1334b..d2d98f9175 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ImageCaptureCore.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ImageCaptureCore.ignore @@ -1,15 +1,3 @@ - -# Initial result from new rule extra-null-allowed -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSDictionary`2,ImageCaptureCore.IICCameraDeviceDownloadDelegate,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestUploadFile(Foundation.NSUrl,Foundation.NSDictionary`2,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDeviceDownloadDelegate::DidDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSError,Foundation.NSDictionary`2,System.IntPtr)' has a extraneous [NullAllowed] on parameter #2 - -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'ImageCaptureCore.ICCameraDevice ImageCaptureCore.ICCameraItem::get_Device()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraFolder ImageCaptureCore.ICCameraItem::get_ParentFolder()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFile::get_SidecarFiles()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFolder::get_Contents()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Name()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Uti()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICDevice::get_ModuleVersion()' is missing an [NullAllowed] on return type +# Xcode headers say `NSData* _Nullable` the but the web docs say `outData:(NSData *)data` +# since this is an "out" variable that is NOT `NSData **`, let's leave this one here for now. !missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1 diff --git a/tests/xtro-sharpie/macOS-ImageCaptureCore.ignore b/tests/xtro-sharpie/macOS-ImageCaptureCore.ignore index ad42b1334b..d2d98f9175 100644 --- a/tests/xtro-sharpie/macOS-ImageCaptureCore.ignore +++ b/tests/xtro-sharpie/macOS-ImageCaptureCore.ignore @@ -1,15 +1,3 @@ - -# Initial result from new rule extra-null-allowed -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSDictionary`2,ImageCaptureCore.IICCameraDeviceDownloadDelegate,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestUploadFile(Foundation.NSUrl,Foundation.NSDictionary`2,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' has a extraneous [NullAllowed] on parameter #1 -!extra-null-allowed! 'System.Void ImageCaptureCore.ICCameraDeviceDownloadDelegate::DidDownloadFile(ImageCaptureCore.ICCameraFile,Foundation.NSError,Foundation.NSDictionary`2,System.IntPtr)' has a extraneous [NullAllowed] on parameter #2 - -# Initial result from new rule missing-null-allowed -!missing-null-allowed! 'ImageCaptureCore.ICCameraDevice ImageCaptureCore.ICCameraItem::get_Device()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraFolder ImageCaptureCore.ICCameraItem::get_ParentFolder()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFile::get_SidecarFiles()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ImageCaptureCore.ICCameraItem[] ImageCaptureCore.ICCameraFolder::get_Contents()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Name()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICCameraItem::get_Uti()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String ImageCaptureCore.ICDevice::get_ModuleVersion()' is missing an [NullAllowed] on return type +# Xcode headers say `NSData* _Nullable` the but the web docs say `outData:(NSData *)data` +# since this is an "out" variable that is NOT `NSData **`, let's leave this one here for now. !missing-null-allowed! 'System.Void ImageCaptureCore.ICCameraDevice::RequestSendPtpCommand(Foundation.NSData,Foundation.NSData,Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr)' is missing an [NullAllowed] on parameter #1