From 31a1811323c6782c241e87ab25eb25ec4bea1b67 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 18 Oct 2017 19:26:10 +0200 Subject: [PATCH] Add pairing methods. --- .../java/de/jotomo/ruffy/spi/RuffyCommands.java | 6 ++++++ .../jotomo/ruffyscripter/RuffyCommandsV1Impl.java | 15 +++++++++++++++ .../de/jotomo/ruffyscripter/RuffyScripter.java | 15 +++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/ruffy-spi/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java b/ruffy-spi/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java index 213fc0fccd..de030a1a40 100644 --- a/ruffy-spi/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java +++ b/ruffy-spi/src/main/java/de/jotomo/ruffy/spi/RuffyCommands.java @@ -26,5 +26,11 @@ public interface RuffyCommands { CommandResult setBasalProfile(BasalProfile basalProfile); CommandResult setDateAndTime(Date date); + + void requestPairing(); + + void sendAuthKey(String key); + + void unpair(); } diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java index eb13f51a1d..6f29433dd5 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyCommandsV1Impl.java @@ -76,4 +76,19 @@ public class RuffyCommandsV1Impl implements RuffyCommands { public CommandResult setDateAndTime(Date date) { return delegate.setDateAndTime(date); } + + @Override + public void requestPairing() { + delegate.requestPairing(); + } + + @Override + public void sendAuthKey(String key) { + delegate.sendAuthKey(key); + } + + @Override + public void unpair() { + delegate.unpair(); + } } diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index f543968f2f..6eb00670b6 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -784,4 +784,19 @@ public class RuffyScripter implements RuffyCommands { // TODO I'm a faker! return new CommandResult().success(true).enacted(false); } + + @Override + public void requestPairing() { + throw new UnsupportedOperationException(); + } + + @Override + public void sendAuthKey(String key) { + throw new UnsupportedOperationException(); + } + + @Override + public void unpair() { + throw new UnsupportedOperationException(); + } }