package de.jotomo.ruffy.spi;

import java.util.Date;

import de.jotomo.ruffy.spi.history.PumpHistoryRequest;

public interface RuffyCommands {
    CommandResult deliverBolus(double amount, BolusProgressReporter bolusProgressReporter);

    void cancelBolus();

    CommandResult setTbr(int percent, int duration);

    CommandResult cancelTbr();

    CommandResult confirmAlert(int warningCode);

    boolean isPumpAvailable();

    boolean isPumpBusy();

    CommandResult readPumpState();

    CommandResult readReservoirLevelAndLastBolus();

    CommandResult readHistory(PumpHistoryRequest request);

    CommandResult readBasalProfile(int number);

    CommandResult setBasalProfile(BasalProfile basalProfile);

    CommandResult getDateAndTime();

    CommandResult setDateAndTime(Date date);

    void requestPairing();

    void sendAuthKey(String key);

    void unpair();
}


@@ -136,16 +136,112 @@
 mands %7B%0A
+    /** Issues a bolus issues updates on progress through via %7B@link BolusProgressReporter%7D. */%0A
     Comm
@@ -321,24 +321,89 @@
 Reporter);%0A%0A
+    /** Requests cancellation of an active bolus if possible. */%0A
     void can
@@ -509,201 +509,728 @@
     
-CommandResult confirmAlert(int warningCode);%0A%0A    boolean isPumpAvailable();%0A%0A    boolean isPumpBusy();%0A%0A    CommandResult readPumpState();%0A%0A    CommandResult readReservoirLevelAndLastBolus();%0A
+/** Confirms an active warning alert on the pump.%0A     * @see PumpWarningCodes */%0A    CommandResult confirmAlert(int warningCode);%0A%0A    /** Indicate if the pump is ready to receive commands. */%0A    boolean isPumpAvailable();%0A%0A    /** Indicate of the pump is busy processing a command. */%0A    boolean isPumpBusy();%0A%0A    /** Read the state of the pump, which encompasses all information displayed on the main menu. */%0A    CommandResult readPumpState();%0A%0A    /** Read revervoir level and last bolus via Quick Info */%0A    CommandResult readReservoirLevelAndLastBolus();%0A%0A    /** Reads pump history via the My Data menu. The %7B@link PumpHistoryRequest%7D specifies%0A     * what types of data and how far back data is returned. */
 %0A   
@@ -1489,31 +1489,138 @@
     
-void requestPairing();%0A
+// TODO below methods are drafts%0A    void requestPairing();%0A%0A    /** Send the key displayed on the pump during pairing/bonding. */
 %0A   

Add Javadoc to RuffyCommands.