Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prefix use in public APIs and respell Upload as DirectUpload #84

Merged
merged 19 commits into from
Jul 31, 2023

Conversation

andrewjl-mux
Copy link
Contributor

@andrewjl-mux andrewjl-mux commented Jul 31, 2023

In order to prevent prefix name confusion when we add an Obj-C wrapper module remove the Mux prefix from those types that have it.

Make more apparent the difference between the Upload returned in the Mux API response from the direct upload type in the SDK by using DirectUpload instead of Upload. (Also slightly reduces the chance use of a fully disambiguated type name MuxUploadSDK.DirectUpload will be required.)

API Changes

  • Rename MuxUpload -> DirectUpload
  • Rename UploadManager -> DirectUploadManager
    • DirectUploadManager.allManagedUploads() -> DirectUploadManager.allManagedDirectUploads()
    • DirectUploadManager.findStartedUpload(ofFile:) -> DirectUploadManager.startedDirectUpload(ofFile:)
    • DirectUploadManager.resumeUpload(ofFile:) -> DirectUploadManager.resumeDirectUpload(ofFile:)
    • DirectUploadManager.resumeUpload(ofFile:completion:) -> DirectUploadManager.resumeDirectUpload(ofFile:completion:)
    • DirectUploadManager.resumeAllUploads() ->
      DirectUploadManager.resumeAllDirectUploads()
  • Rename UploadsUpdateDelegate -> DirectUploadManagerDelegate
    • Rename DirectUploadManagerDelegate.uploadListUpdated(with:) -> DirectUploadManagerDelegate.didUpdate(managedDirectUploads:)
  • Rename MuxUpload.UploadError -> DirectUploadError
  • Rename MuxErrorCase -> DirectUploadError.Kind
  • Rename DirectUpload.UploadError.code -> DirectUploadError.kind
  • Remove Error.asMuxUploadError
  • Remove Error.parseAsUploadError(lastSeenUploadStatus:)
  • Rename MuxUploadSDK -> SDKLogger (This only deals with logging)
  • Rename UploadOptions -> DirectUploadOptions
  • Rename and recombine DirectUpload.InputStatus
    • DirectUpload.InputStatus.uploadSucceeded and DirectUpload.InputStatus.uploadFailed to DirectUpload.InputStatus.finished
    • DirectUpload.InputStatus.awaitingUploadConfirmation to DirectUpload.InputStatus.awaitingConfirmation
    • DirectUpload.InputStatus.uploadInProgress to DirectUpload.InputStatus.transportInProgress
    • DirectUpload.InputStatus.uploadPaused to DirectUpload.InputStatus.paused
  • Rename DirectUpload.Success -> DirectUpload.SuccessDetails
  • Rename UploadResult -> DirectUploadResult

DirectUploadManagerDelegate.uploadListUpdated(with:) ->
DirectUploadManagerDelegate.didUpdate(managedDirectUploads:)

DirectUploadManager.allManagedUploads() ->
DirectUploadManager.allManagedDirectUploads()

DirectUploadManager.findStartedUpload(ofFile:) ->
DirectUploadManager.startedDirectUpload(ofFile:)

DirectUploadManager.resumeUpload(ofFile:) ->
DirectUploadManager.resumeDirectUpload(ofFile:)

DirectUploadManager.resumeUpload(ofFile:completion:) ->
DirectUploadManager.resumeDirectUpload(ofFile:completion:)

DirectUploadManager.resumeAllUploads() ->
DirectUploadManager.resumeAllDirectUploads()
@andrewjl-mux andrewjl-mux changed the title Remove prefix use in public APIs Remove prefix use in public APIs and respell Upload as DirectUpload Jul 31, 2023
@andrewjl-mux andrewjl-mux marked this pull request as ready for review July 31, 2023 19:00
Remove Error.parseAsUploadError(lastSeenUploadStatus:)
uploadSucceeded -> finished, wraps DirectUploadResult
uploadFailed -> finished, wraps DirectUploadResult
awaitingUploadConfirmation -> awaitingConfirmation
uploadInProgress -> transportInProgress
uploadPaused -> paused
To distinguish from DirectUploadResult.success
@andrewjl-mux andrewjl-mux requested review from daytime-em and a team July 31, 2023 19:37
@andrewjl-mux andrewjl-mux merged commit 3af8e48 into releases/v0.5.0 Jul 31, 2023
@andrewjl-mux andrewjl-mux deleted the ajlb/remove-mux-prefix branch July 31, 2023 19:55
@github-actions github-actions bot mentioned this pull request Jul 31, 2023
andrewjl-mux added a commit that referenced this pull request Jul 31, 2023
* Add an overload initializer for UploadOptions (#81)

* Bump version to v0.5.0

* Remove prefix use in public APIs and respell Upload as DirectUpload (#84)
tomkordic pushed a commit that referenced this pull request Mar 1, 2024
* Add an overload initializer for UploadOptions (#81)

* Bump version to v0.5.0

* Remove prefix use in public APIs and respell Upload as DirectUpload (#84)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants