Package apple.fileprovider
Class NSFileProviderManager
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.fileprovider.NSFileProviderManager
-
- All Implemented Interfaces:
NSObject
public class NSFileProviderManager extends NSObject
The file provider manager allows you to communicate with the file provider framework for purposes that may be relevant from both the extension and the containing application (or sibling extensions). The file provider framework will invoke your file provider extension in response to those calls if appropriate. The class also provides methods to manage provider domains. Each domain has a corresponding manager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSFileProviderManager.Block_addDomainCompletionHandlerstatic interfaceNSFileProviderManager.Block_getDomainsWithCompletionHandlerstatic interfaceNSFileProviderManager.Block_registerURLSessionTaskForItemWithIdentifierCompletionHandlerstatic interfaceNSFileProviderManager.Block_removeAllDomainsWithCompletionHandlerstatic interfaceNSFileProviderManager.Block_removeDomainCompletionHandlerstatic interfaceNSFileProviderManager.Block_signalEnumeratorForContainerItemIdentifierCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSFileProviderManager(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static voidaddDomainCompletionHandler(NSFileProviderDomain domain, NSFileProviderManager.Block_addDomainCompletionHandler completionHandler)Register a domain in which items can be stored.static NSFileProviderManageralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static NSFileProviderManagerdefaultManager()Return the manager responsible for the default domain.static java.lang.Stringdescription_static()NSURLdocumentStorageURL()The root URL for provided documents.static voidgetDomainsWithCompletionHandler(NSFileProviderManager.Block_getDomainsWithCompletionHandler completionHandler)Get all registered domains.static longhash_static()NSFileProviderManagerinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static NSFileProviderManagermanagerForDomain(NSFileProviderDomain domain)Return the manager for the specified domain.static java.lang.Objectnew_objc()static NSURLplaceholderURLForURL(NSURL url)Returns the designated placeholder URL for a given file URL.java.lang.StringproviderIdentifier()The purpose identifier of your file provider extension.voidregisterURLSessionTaskForItemWithIdentifierCompletionHandler(NSURLSessionTask task, java.lang.String identifier, NSFileProviderManager.Block_registerURLSessionTaskForItemWithIdentifierCompletionHandler completion)Registers the given NSURLSessionTask to be responsible for the specified item.static voidremoveAllDomainsWithCompletionHandler(NSFileProviderManager.Block_removeAllDomainsWithCompletionHandler completionHandler)Remove all registered domains.static voidremoveDomainCompletionHandler(NSFileProviderDomain domain, NSFileProviderManager.Block_removeDomainCompletionHandler completionHandler)Remove a domain.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)voidsignalEnumeratorForContainerItemIdentifierCompletionHandler(java.lang.String containerItemIdentifier, NSFileProviderManager.Block_signalEnumeratorForContainerItemIdentifierCompletionHandler completion)Call this method either in the app or in the extension to trigger an enumeration, typically in response to a push.static org.moe.natj.objc.Classsuperclass_static()static longversion_static()static booleanwritePlaceholderAtURLWithMetadataError(NSURL placeholderURL, NSFileProviderItem metadata, org.moe.natj.general.ptr.Ptr<NSError> error)Writes out a placeholder at the specified URL.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
addDomainCompletionHandler
public static void addDomainCompletionHandler(NSFileProviderDomain domain, NSFileProviderManager.Block_addDomainCompletionHandler completionHandler)
Register a domain in which items can be stored.
-
alloc
public static NSFileProviderManager alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
defaultManager
public static NSFileProviderManager defaultManager()
Return the manager responsible for the default domain.
-
description_static
public static java.lang.String description_static()
-
documentStorageURL
public NSURL documentStorageURL()
The root URL for provided documents. This URL is derived by consulting the NSExtensionFileProviderDocumentGroup property on your extension. The document storage URL is the folder "File Provider Storage" in the corresponding container. If the NSExtensionFileProviderDocumentGroup property is not set, calling this method will result in an error.
-
getDomainsWithCompletionHandler
public static void getDomainsWithCompletionHandler(NSFileProviderManager.Block_getDomainsWithCompletionHandler completionHandler)
Get all registered domains.
-
hash_static
public static long hash_static()
-
init
public NSFileProviderManager init()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
managerForDomain
public static NSFileProviderManager managerForDomain(NSFileProviderDomain domain)
Return the manager for the specified domain.
-
new_objc
public static java.lang.Object new_objc()
-
placeholderURLForURL
public static NSURL placeholderURLForURL(NSURL url)
Returns the designated placeholder URL for a given file URL. Used in conjunction with writePlaceholderAtURL.
-
providerIdentifier
public java.lang.String providerIdentifier()
The purpose identifier of your file provider extension. A coordination using a file coordinator with this purpose identifier set will not trigger your file provider extension. You can use this to e.g. perform speculative work on behalf of the file provider from the main app.
-
registerURLSessionTaskForItemWithIdentifierCompletionHandler
public void registerURLSessionTaskForItemWithIdentifierCompletionHandler(NSURLSessionTask task, java.lang.String identifier, NSFileProviderManager.Block_registerURLSessionTaskForItemWithIdentifierCompletionHandler completion)
Registers the given NSURLSessionTask to be responsible for the specified item. A given item can only have one task registered at a time. The task must be suspended at the time of calling. The task's progress is displayed on the item when the task is executed.
-
removeAllDomainsWithCompletionHandler
public static void removeAllDomainsWithCompletionHandler(NSFileProviderManager.Block_removeAllDomainsWithCompletionHandler completionHandler)
Remove all registered domains.
-
removeDomainCompletionHandler
public static void removeDomainCompletionHandler(NSFileProviderDomain domain, NSFileProviderManager.Block_removeDomainCompletionHandler completionHandler)
Remove a domain.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
signalEnumeratorForContainerItemIdentifierCompletionHandler
public void signalEnumeratorForContainerItemIdentifierCompletionHandler(java.lang.String containerItemIdentifier, NSFileProviderManager.Block_signalEnumeratorForContainerItemIdentifierCompletionHandler completion)Call this method either in the app or in the extension to trigger an enumeration, typically in response to a push. Set the containerItemIdentifier to the identifier of the enumerated container that was specified in -[NSFileProviderExtension enumeratorForContainerItemIdentifier:error:] This will trigger another call to -[NSFileProviderEnumerator enumerateChangesForObserver:fromSyncAnchor:] and the UI will be refreshed, giving the user live updates on the presented enumeration. If you have a change in the working set, call this method with containerItemIdentifier set to NSFileProviderWorkingSetContainerItemIdentifier, even if there is no live enumeration for this item. The working set is cached on the device and it's important to keep the cache in sync. In addition to using this method, your application/extension can register for pushes using the PKPushTypeFileProvider push type. Pushes of the form { container-identifier = "" domain = " " } with a topic of " .pushkit.fileprovider" will be translated into a call to signalEnumeratorForContainerItemIdentifier:completionHandler:.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
writePlaceholderAtURLWithMetadataError
public static boolean writePlaceholderAtURLWithMetadataError(NSURL placeholderURL, NSFileProviderItem metadata, org.moe.natj.general.ptr.Ptr<NSError> error)
Writes out a placeholder at the specified URL. The placeholder is used in place of the actual file for operations that do not require the file's actual data to be on disk: - if attributes are requested by an application via the getPromisedItemResourceValue: method on NSURL - or via a coordination with the NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly flag set - to verify whether an application has access to a file Your extension should provide placeholders by implementing the providePlaceholderAtURL: method, but your application may choose to proactively write out placeholders to facilitate access to files. This is especially useful if your application wants to actively hand out a file URL, e.g. using UIActivityViewController, in which case it should ensure that either the file or a placeholder is present on disk first. The path of the placeholder is fixed and must be determined in advance by calling the placeholderURLForURL: method.
-
-