Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions src/photos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,21 @@ interface PHAssetResourceUploadJob {
[Export ("state")]
PHAssetResourceUploadJobState State { get; }

[iOS (26, 4)]
[Export ("type")]
PHAssetResourceUploadJobType Type { get; }

[iOS (26, 4)]
[Export ("error")]
[NullAllowed]
NSError Error { get; }

/// <summary>Gets the response header fields returned from the upload destination.</summary>
[iOS (26, 4)]
[Export ("responseHeaderFields", ArgumentSemantic.Copy)]
[NullAllowed]
NSDictionary<NSString, NSString> ResponseHeaderFields { get; }

[Static]
[Export ("fetchJobsWithAction:options:")]
PHFetchResult FetchJobs (PHAssetResourceUploadJobAction action, [NullAllowed] PHFetchOptions options);
Expand All @@ -1935,6 +1950,32 @@ interface PHAssetResourceUploadJobChangeRequest {

[Export ("retryWithDestination:")]
void Retry ([NullAllowed] NSUrlRequest destination);

/// <summary>Creates a change request for an upload job with the specified destination and asset resource.</summary>
/// <param name="destination">The URL request that specifies the upload destination.</param>
/// <param name="resource">The asset resource to upload.</param>
/// <returns>A new change request for the upload job.</returns>
[iOS (26, 4)]
[Static]
[Export ("creationRequestForJobWithDestination:resource:")]
PHAssetResourceUploadJobChangeRequest CreateJobRequest (NSUrlRequest destination, PHAssetResource resource);

/// <summary>Creates a change request for a download-only job for the specified asset resource.</summary>
/// <param name="resource">The asset resource to download.</param>
/// <returns>A new change request for the download-only job.</returns>
[iOS (26, 4)]
[Static]
[Export ("creationRequestForDownloadJobWithResource:")]
PHAssetResourceUploadJobChangeRequest CreateDownloadJobRequest (PHAssetResource resource);

/// <summary>Gets a placeholder object for the upload job that will be created by this change request.</summary>
[NullAllowed]
[Export ("placeholderForCreatedAssetResourceUploadJob", ArgumentSemantic.Strong)]
PHObjectPlaceholder PlaceholderForCreatedAssetResourceUploadJob { get; }

[iOS (26, 4)]
[Export ("cancel")]
void Cancel ();
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 1)]
Expand All @@ -1944,6 +1985,9 @@ public enum PHAssetResourceUploadJobState : long {
Pending = 2,
Failed = 3,
Succeeded = 4,
/// <summary>The upload job has been cancelled.</summary>
[iOS (26, 4)]
Cancelled = 5,
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 1)]
Expand All @@ -1952,4 +1996,13 @@ public enum PHAssetResourceUploadJobAction : long {
Acknowledge = 1,
Retry = 2,
}

/// <summary>Enumerates the types of <see cref="PHAssetResourceUploadJob" />.</summary>
[NoTV, NoMacCatalyst, NoMac, iOS (26, 4)]
public enum PHAssetResourceUploadJobType : short {
/// <summary>A standard upload job that uploads an asset resource to a destination.</summary>
Upload = 0,
/// <summary>A download-only job that downloads an asset resource without uploading.</summary>
DownloadOnly = 1,
}
}
9 changes: 0 additions & 9 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo

This file was deleted.

Loading