-
Notifications
You must be signed in to change notification settings - Fork 369
Remote PR Set #3 #488
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
Merged
ps2
merged 7 commits into
LoopKit:dev
from
gestrich:feature/2023/06/bg/remote-command-service-refactor
Jul 2, 2023
Merged
Remote PR Set #3 #488
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cb3f748
Remote handling rearchitecture
gestrich 61f7934
Rename method
gestrich 0bac3c2
Update names
gestrich 3f28fa8
Update names
gestrich 584bc98
Update comment
gestrich 997b600
Remove Remote 2.0 parts
gestrich a0c797d
Update enact override method name
gestrich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// RemoteActionDelegate.swift | ||
// LoopKit | ||
// | ||
// Created by Bill Gestrich on 3/19/23. | ||
// Copyright © 2023 LoopKit Authors. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol RemoteActionDelegate: AnyObject { | ||
func enactRemoteOverride(name: String, durationTime: TimeInterval?, remoteAddress: String) async throws | ||
func cancelRemoteOverride() async throws | ||
func deliverRemoteCarbs(amountInGrams: Double, absorptionTime: TimeInterval?, foodType: String?, startDate: Date?) async throws | ||
func deliverRemoteBolus(amountInUnits: Double) async throws | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
RemoteActionDelegate
is conformed to both by the ServiceManager and DeviceDataManager to propogate actions to where they are delivered.I'm using "handleRemote" in the method names to help disambiguate from existing APIs in DeviceDataManaager, like "enactBolus". I can drop the prefix if desired though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, "handle" is very vague. This API is exposing dosing functionality and settings change functionality. So it would be more descriptive to have the verbs describe actually enacting or delivering. I think it's fine to keep the "remote" in there, as that's the main foreseeable use for this API, but an API like this could theoretically be used by Services for other things, like maybe they have some kind of other trigger to change dosing, like a timer, or other notification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done but let me know if feedback on the names below.