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

[WIP] Developer API Enhancements Phase 1 #298

Merged
merged 308 commits into from Aug 8, 2016

Conversation

adein
Copy link

@adein adein commented Sep 9, 2015

@joeljfischer has taken over this post 😄

Fixes #223, #241

This post was last rewritten on 2016/07/27.

Not Ready For Merge

This adds a new high-level abstraction layer on top of the current SDL layers such as SDLProxy. When 5.0 rolls around, many of those old layers will be removed and the functionality will be hidden behind the new high level layers being added here. Additional functionality will be built on top of the new developer api for quicker and more intuitive SDL use.

Features included:

  • Quicker and easier initial setup with ahead of time configuration.
  • RPC request/response bookkeeping (linking a handler block to a correlation ID).
  • Commands and button subscription handler bookkeeping.
  • Automatic correlation ID management.
  • Lifecycle manager to do most of the startup / shutdown bookkeeping for you. Define your configuration and the manager takes care of everything else.
  • A file manager to keep track of what's on the head unit and manage adding and deleting files.
  • A permissions manager to help keep track of what you're allowed to do and when permissions change.
  • A lock screen manager to automatically show and hide a lock screen with additional options.

To-Do:

  • Add and Improve Documentation, example apps, and guides
  • Add a subscribable state object for keeping track of the RAIR data, HMI status, etc.
  • Deprecate the objects that will be removed in the next major version (which is pretty much all of them). However, they will not be replaced immediately, which will cause un-fixable warnings for developers. We need to decide if this is better, or just replacing them in 5.0 is better.
  • Group files by public / private to make clearer which Dev API classes are to be interacted with and which will cause version changes by altering.
  • SDLFile store data to RAM instead of disk, or, store data to disk asynchronously when needed.
  • Localize lock screen text
  • Localize errors (?)
  • Handle ChangeRegistration automatically as needed (need more definition around use cases)
  • Logging Improvements: Configuration to turn on / off some logging such as Siphon, file logging. Filtering? Integrate a library such as SuperLogger?
  • Consider removing publicly facing state strings in order to avoid potential minor / major version changes to update them.
  • Handle manager startup error cases
  • Make sure all TODOs are accounted for

To Test:

  • LifecycleManager hash resumption use cases are accounted for
  • PermissionManager
  • FileManager under load

@adein
Copy link
Author

adein commented Sep 9, 2015

Oops, it looks like there's some unnecessary autorelease pools that I forgot to remove. I'll fix them in another commit.

@justinjdickow
Copy link
Contributor

Notes from Aaron from our previous convo:

  • Manage lock screen within proxy
  • Find a way to not have to cast the RPCResponse in the response handler blocks
  • Have 1 protocol for notifications, with all of them optional. check respondsTo before callbacks
  • Make SDLProxyBase a singleton, not using inheritance, & change the name to SDLManager or SDLController
  • Deprecate SDLProxy
  • 2 handler blocks for sendRPC: success and failure
  • remove strongSelf/weakSelf stuff for methods that don't store a block

@joeljfischer joeljfischer added this to the 4.X milestone Oct 5, 2015
* Configuration options for lock screen
* Configuration options for TCP debug
* SDLManager implement the lock screen icon callback and store the image
* Import SDLNotificationConstants to SDLManager.h so that when sending RPCs, you get correct Xcode completion
* Added delete and upload methods with completion handlers
* Add a file wrapper "struct" to contain a file and it's completion handler
* Remote files array is now mutable
* Add a currentFileUploadOffset property for large file uploads
* Upload queue now has a constraint
* State is now handled a little differently and affects a few parts
* Fix not doing weak/strongself where necessary
* SDLLifecycleManager fixed “lastCorrelationId” actually giving the next correlation id
* SDLLifecycleManager fixed sometimes dispatching delegates on main queue, sometimes not. Now where the delegate is called is arbitrary
* Another batch of SDLLifecycleManagerSpec tests
* Add asserts in notification handlers if the object isn’t what we expect, just return out in production
* Add white and black sdl logos
* Add code to use the correct white / black logo on the right background color
* Alter the default lock screen background color to SDL Dark Grey.
* Add documentation around the lock screen configuration
* “voiceRecognitionSynonyms” -> “voiceRecognitionCommandNames”
* Some properties are now readonly
* Remove initial display layout since that will be the domain of a different set of code eventually
* Fix not connecting again because of VR synonyms being sent empty
* Fix default background color not being used because Obj-C
* SDLLifecycleConfiguration’s voiceRecognitionCommandNames can now be sent empty, and will be sent empty by default
* Changed the name of the SDL Example app so that it won’t be truncated
* Removed an unused property from the example app’s ProxyManager class
* Add FBSnapshotTests via Carthage, add license to DEPENDENCIES.md
* Example app now sets its app icon
* SiphonServer analysis failures commented out
@joeljfischer joeljfischer modified the milestones: 4.2, 4.X, 4.3 Jul 27, 2016
* Add a registerAppInterface property on SDLManager for now I guess ugh
* Fix SDLRPCRequestFactory tests throwing warnings because they’re testing deprecated methods.
* Fix SDLLifecycleManager tests erroring on no longer extant properties.
* Work around SDLLifecycleManager tests erroring because the RAI response comes inline instead of on a method callback.
* Fix SmartDeviceLink.h erroring because some files don’t exist publicly and some do that did and did not before, respectively.
* SDLLifecycleManager now manually imports each class it uses instead of all classes.
* Removed old properties on SDLLifecycleManager and fix a public / private mismatch on hmiLevel probably causing them not to fire delegate callbacks.
* Stub the hmiLevel delegate callback on the example project.
* Add new tests for calling the hmiLevel SDLManagerDelegate callback
@joeljfischer joeljfischer merged commit 075000b into develop Aug 8, 2016
@joeljfischer joeljfischer deleted the feature/enhanced_framework branch August 17, 2016 18:23
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.

None yet

5 participants