[FileProvider] Add support for Xcode13 beta 4. (#12300)

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This commit is contained in:
Manuel de la Pena 2021-08-02 12:12:51 -04:00 коммит произвёл GitHub
Родитель d506a13466
Коммит 0f15240c9f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 71 добавлений и 21 удалений

Просмотреть файл

@ -0,0 +1,25 @@
#if MONOMAC
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
namespace FileProvider {
[NoiOS, NoMacCatalyst, Mac (12,0)]
[StructLayout (LayoutKind.Sequential)]
public struct NSFileProviderTypeAndCreator
{
public uint Type;
public uint Creator;
#if !COREBUILD
public string GetTypeAsFourCC ()
=> Runtime.ToFourCCString (Type);
public string GetCreatorAsFourCC()
=> Runtime.ToFourCCString (Creator);
#endif
}
}
#endif

Просмотреть файл

@ -182,11 +182,17 @@ namespace FileProvider {
OlderExtensionVersionRunning = -2003,
NewerExtensionVersionFound = -2004,
CannotSynchronize = -2005,
#if MONOMAC
NonEvictableChildren = -2006,
UnsyncedEdits = -2007,
NonEvictable = -2008,
#endif
}
[NoiOS, Mac (12,0), NoMacCatalyst]
[Native]
public enum NSFileProviderDomainRemovalMode : long {
RemoveAll = 0,
PreserveDirtyUserData = 1,
PreserveDownloadedUserData = 2,
}
[iOS (11,0)]
@ -203,7 +209,7 @@ namespace FileProvider {
[Field ("NSFileProviderErrorNonExistentItemIdentifierKey")]
NSString NonExistentItemIdentifierKey { get; }
[NoiOS]
[iOS (15,0)]
[Field ("NSFileProviderErrorItemKey")]
NSString ItemKey { get; }
}
@ -330,6 +336,10 @@ namespace FileProvider {
[Notification]
[Field ("NSFileProviderDomainDidChange")]
NSString DidChange { get; }
[NoWatch, NoTV, NoiOS, Mac (12, 0), NoMacCatalyst]
[NullAllowed, Export ("backingStoreIdentity")]
NSData BackingStoreIdentity { get; }
}
interface INSFileProviderEnumerationObserver { }
@ -542,6 +552,12 @@ namespace FileProvider {
[NoiOS]
[NullAllowed, Export ("symlinkTargetPath")]
string SymlinkTargetPath { get; }
#if MONOMAC
[NoiOS, Mac (12, 0), NoMacCatalyst]
[Export ("typeAndCreator")]
NSFileProviderTypeAndCreator TypeAndCreator { get; }
#endif
}
[iOS (11,0)]
@ -716,6 +732,12 @@ namespace FileProvider {
[return: NullAllowed]
NSDictionary<INSFileProviderTestingOperation, NSError> GetRunTestingOperations (INSFileProviderTestingOperation[] operations, [NullAllowed] out NSError error);
[NoiOS, Mac (12,0), NoMacCatalyst]
[Async (ResultTypeName = "NSFileProviderRemoveDomainResult")]
[Static]
[Export ("removeDomain:mode:completionHandler:")]
void RemoveDomain (NSFileProviderDomain domain, NSFileProviderDomainRemovalMode mode, Action<NSUrl, NSError> completionHandler);
}
interface INSFileProviderPendingSetEnumerator { }
@ -815,6 +837,8 @@ namespace FileProvider {
ContentModificationDate = 1uL << 7,
FileSystemFlags = 1uL << 8,
ExtendedAttributes = 1uL << 9,
[Mac (12,0)]
TypeAndCreator = 1uL << 10,
}
[Mac (11,0)]
@ -826,9 +850,8 @@ namespace FileProvider {
Temporary = 1,
}
[Mac (11,0)]
[iOS (15,0), Mac (11,0)]
[Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using Catalyst on macOS.")]
[NoiOS]
[Native][Flags]
enum NSFileProviderFileSystemFlags : ulong
{
@ -1002,9 +1025,7 @@ namespace FileProvider {
NSDictionary UserInfo { get; }
}
[Advice ("This API is not available when using UIKit on macOS.")]
[Unavailable (PlatformName.MacCatalyst)]
[NoWatch, NoTV, NoiOS, Mac (11,3)]
[NoWatch, NoTV, iOS (15,0), Mac (12,0), NoMacCatalyst]
[Flags]
[Native]
public enum NSFileProviderDomainTestingModes : ulong {
@ -1263,4 +1284,18 @@ namespace FileProvider {
[Export ("renamedItem")]
INSFileProviderItem RenamedItem { get; }
}
[NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst]
[Protocol]
interface NSFileProviderUserInteractionSuppressing
{
[Abstract]
[Export ("setInteractionSuppressed:forIdentifier:")]
void SetInteractionSuppressed (bool suppression, string suppressionIdentifier);
[Abstract]
[Export ("isInteractionSuppressedForIdentifier:")]
bool IsInteractionSuppressed (string suppressionIdentifier);
}
}

Просмотреть файл

@ -716,6 +716,9 @@ EXTERNALACCESSORY_API_SOURCES = \
# FileProvider
FILEPROVIDER_CORE_SOURCES = \
FileProvider/Structs.cs \
FILEPROVIDER_SOURCES = \
FileProvider/Compat.cs \

Просмотреть файл

@ -1,6 +0,0 @@
!missing-enum! NSFileProviderDomainTestingModes not bound
!missing-enum! NSFileProviderFileSystemFlags not bound
!missing-enum-value! NSFileProviderError native value NSFileProviderErrorNonEvictable = -2008 not bound
!missing-enum-value! NSFileProviderError native value NSFileProviderErrorNonEvictableChildren = -2006 not bound
!missing-enum-value! NSFileProviderError native value NSFileProviderErrorUnsyncedEdits = -2007 not bound
!missing-field! NSFileProviderErrorItemKey not bound

Просмотреть файл

@ -1,7 +0,0 @@
## appended from unclassified file
!missing-enum! NSFileProviderDomainRemovalMode not bound
!missing-enum-value! NSFileProviderItemFields native value NSFileProviderItemTypeAndCreator = 1024 not bound
!missing-protocol! NSFileProviderUserInteractionSuppressing not bound
!missing-protocol-member! NSFileProviderItem::typeAndCreator not found
!missing-selector! +NSFileProviderManager::removeDomain:mode:completionHandler: not bound
!missing-selector! NSFileProviderDomain::backingStoreIdentity not bound