Add pairing methods.

This commit is contained in:
Johannes Mockenhaupt 2017-10-18 19:26:10 +02:00
parent ab4f46471b
commit 31a1811323
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 36 additions and 0 deletions

View file

@ -26,5 +26,11 @@ public interface RuffyCommands {
CommandResult setBasalProfile(BasalProfile basalProfile);
CommandResult setDateAndTime(Date date);
void requestPairing();
void sendAuthKey(String key);
void unpair();
}

View file

@ -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();
}
}

View file

@ -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();
}
}