-
Notifications
You must be signed in to change notification settings - Fork 8
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
[feature/avatar] Avatar support #81
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ion data is changed - OCCore: listen for bookmark-authdata-chnaged notifications (both local & IPC) and reattempt authentication or connection if a change occurs
…ortFileNamed:…] and [OCCore reportLocalModificationOfItem:…], allowing to specify a custom NSDate as last modified date to use during upload
…ad based on UUIDs rather than the NSThread pointer - OCSQLiteDB: use OCRunLoopThread.isCurrentThread for OCSQLiteDB.isOnSQLiteThread - OCDatabase: add additional error logging
… property to indicate when authentication has last failed using the current .authenticationData - OCAuthenticationMethodBasicAuth: add support for .authenticationDataKnownInvalidDate - OCAuthenticationMethodOAuth2: adopt .authenticationDataKnownInvalidDate property to avoid unnecessary token refreshes - OCCore: throttle connection attempts to at most once every three seconds if invalid authentication data is to be expected - OCCore+ConnectionStatus: add new OCCoreConnectionStatusSignalConnecting and OCCoreConnectionStatusConnecting - OCCoreConnectionStatusConnecting indicates the OCCore is in the process of connecting - improved status change debug log messages - NSError+OCDAVError: avoid "(null)" in error descriptions
…ously in the cache but are targeted directly by an OCQuery regardless could be returned with a nil .parentLocalID - OCCore+Sharing: move "else" into its own line
…s into OCDAVErrorNotFound error code
- OCLogger: - support for "force" logging, that is, to log a message even if its logLevel would normally exclude it from logging - new logging methods, keeping "old" methods for compatibility with existing app sources - major macro consolidation / cleanup of existing macros - addition of new parametrized forced logging macros - addition of new OCLoggingEnabled() macro - OCHTTPPipeline - HTTP requests and responses are now force-logged if HTTP request/response logging is enabled
- OCHTTPRequest: new .avoidCellular property controlling whether a request should not be sent over cellular (utilizing NSURLRequest.allowsCellularAccess) - OCConnection: new OCConnectionOptionAllowCellularKey option for up- and downloads to control cellular usage for these - OCCore: new OCCoreOptionAllowCellular option for up- and downloads to control cellular usage for these, to be passed to the import/localModification/download methods via the dictionary passed to the options parameter
- OCCellularSwitch - represents features, areas and/or categories of transfer types - provides localizedName for rich representation - transparently stores/retrieves settings in/from user defaults - supports providing a maximum transfer size for each switch - OCCellularManager - provides convenient access to switches and helps determine if a transfer of a certain size is allowed for a switch - adds master switch to turns off all switches and/or set a maximum transfer size for all switches - OCItemPolicyProcessorAvailableOffline - adds support for new OCCellularSwitchIdentifierAvailableOffline cellular switch
…p-/download's usage of cellular data conditional on the status of a particular cellular switch at the time of scheduling - OCItemPolicyProcessorAvailableOffline: adopt OCCoreOptionDependsOnCellularSwitch - OCSyncActionDownload + OCSyncActionUpload: add support for OCCoreOptionDependsOnCellularSwitch and default to OCCellularSwitchIdentifierMaster if none is provided, fall back on OCCoreOptionAllowCellular instead if it is provided and no OCCoreOptionDependsOnCellularSwitch is provided - OCHTTPRequest: add additional logging to indicate when a request has been set to avoid cellular transfer
…sAllowedFor:transferSize: (falls back to master switch in that case) - OCCore: - new sync action categories for wifi-only and wifi-and-cellular uploads and downloads respectively - adapted concurrency budgets based on new wifi-only and wifi-and-cellular categories to ensure at least one cellular up- and download can run respectively
…i-lined log messages into single lines (on by default) - OCHTTP: add new option `http.prefixed-http-logging` that prefixes each line of the different parts of a HTTP request with `[info]`, `[head]` or `[body]` (on by default) - adjust tests to use extended request/response composition methods
- remove `http.prefixed-http-logging` option and control that behaviour via `log.log-single-lined` instead - log `[header]` instead of `[head]` to allow for easier human "parsing" - OCLogger - add new `log.log-maximum-message-size` option to limit the size of a log message to a maximum size (off by default) - OCLogWriter - new OCLogLineFlags: provide additional contextual information so writers can better present multi-line log messages saved as single line log messages - replace the separator with box drawing characters to visually group split multi line log messages
…ompletionHandler parameter - fix typo in code comment
…o remove UIWebView from standard versions - add documentation to doc/CONFIGURATION.md on how to re-enable UIWebView support via preprocessor flags
…e in OCItem as UInt64 bitfield
- NSString+TUSMetadata: conversion from dictionary to Upload-Metadata - and back - OCTUSHeader: new class to simplify parsing, building and conversion of TUS-related headers - OCTUSJob: new class to manage the current status of a TUS upload - OCTUSJobSegment: new class to abstract away file segmentation details for TUS uploads - OCConnection: - add new OCConnectionDelegate method to inject/modify TUS capabilities / settings - add new OCConnectionOptionTemporarySegmentFolderURLKey option key to provide a temporary folder to store file segments in when performing uploads via TUS - add code to upload files via TUS where available - OCSyncActionUpload: add OCConnectionOptionTemporarySegmentFolderURLKey option to ensure persistence of temporary segment files - OCEvent: - add OCTUSHeader, OCTUSJob and OCTUSJobSegment to .safeClasses - modernize initWithCoder - OCHTTP: - add OCHTTPStaticHeaderFields type and switch OCHTTPResponse over - add OCHTTPMethodPATCH method
- add support for TUS capabilities information provided via the capabilities endpoint - OCConnection - apply OCCapabilities.tusMaxChunkSize to TUS uploads if available - OCTUSHeader - clarify .maximumSize is the maximum file size and add new .maximumChunkSize to supply a maximum chunk size - add new OCTUSCapabilityKey and OCTUSCapability types as needed by OCCapabilities
- move upload code to OCConnection+Upload (Upload category) - extend TUS support with: - support for creation-with-upload - (currently disabled) differentiation between "small" and "large" files (OCConnection.tusSmallFileThreshold) where small files (below the threshold) are uploaded with creation-with-upload, while files above the threshold are uploaded with creation + PATCH - improved log messages showing upload progress by including file size in addition to upload offset
…s an authentication error - OCConnection+Compatibility: improve error handling, adding handling for "Unauthorised" errors - OCConnection: remove authenticated WebDAV request asking root WebDAV endpoint for D:supported-method-set, instead rely on capabilities to respond with an authentication error if auth credentials are not valid. - AuthenticationTests: adjust for latest changes in OAuth2 and OCConnection connect
…ame with new property userDisplayName - OCConnection: update .bookmark.userDisplayName (and save it unless it is a working copy with in-memory credentials storage) on every connect, if it was changed - OCBookmarkManager: fix possible deadlock
# Conflicts: # ownCloudSDK/Connection/OCConnection.m
1ff8d6f
to
00e01d2
Compare
…cessingSecurityScopedResource as an error, as that may indicate the inputFileURL is not actually security scoped, not that the file can't be accessed. Fixes enterprise#4934.
- overhaul of Resources concept - implementation of OCResourceManager, addition of OCResourceManagerJob - support for automatic (by deallocation) and manual removal and cancellation of OCResourceRequests - add serialization/deserialization support to OCResource - OCHTTP: extend documentation, fix sorting bug, add missing status code description
…working - OCBookmarkManager deadlock bugfix
- add OCViewProvider + OCViewProviderContext - add OCBookmark.avatar property serialized/deserializing to/from data, utilizing OCViewProvider for maximum flexibility, but ensuring OCBookmark can always be serialized/deserialized even if avatar can't be deserialized - make OCAvatar a subclass of OCImage - cleanup designed OCAvatar usages - making progress, thumbnails and avatars now functional through OCResourceManager
- add new OCResourceSourceAvatarPlaceholders - add new OCResourceTextPlaceholder - add per-session and expiry triggers for avatars - add new error code OCErrorResourceDoesNotExist that forces clearing the cache and restart a resource manager job - add missing parts - OCUser: add localizedInitials accessor and class method - OCBookmark: - add .user property with a full copy of the OCUser instance from OCConnection.loggedInUser - provide fallback OCResourceTextPlaceholder for .avatar if none is set - OCBookmarkManager: preserve existing OCBookmark instances on reload whenever possible - OCConnection: keep bookmark.user up-to-date
…userName - OCConnection: build WebDAV root URL using loggedInUser, bookmark.user, only then bookmark.userName, addressing owncloud/enterprise#4924
10 tasks
- Schemas: delete existing thumbnails from old thumbnails table - Versions: bump database version number to block repopulation of thumbnails table when using old versions - remove old thumbnails API - OCCore: remove old thumbnails code
- OCDatabase: remove thumbnail API - OCItem: remove unused .thumbnail property - OCResourceSourceAvatarPlaceholders: upgrade priority from local fallback to instant - OCResourceManager: detect duplicate resource source additions - OCResourceSourceItemThumbnails: utilize item.thumbnailAvailability information to avoid unnecessary requests
Merged as part of #92. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds avatar support to the SDK, as part of a new universal resource retrieval, caching and version management subsystem that also shall encompass other resource types such as local + remote thumbnails.
Related Issue
owncloud/ios-app#408
Types of changes