:core:nssdk cleanup
This commit is contained in:
parent
e5f3545cd3
commit
e1e72bf4a9
112 changed files with 269 additions and 269 deletions
|
@ -181,7 +181,7 @@ dependencies {
|
||||||
implementation project(':core:graphview')
|
implementation project(':core:graphview')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:libraries')
|
implementation project(':core:libraries')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:validators')
|
implementation project(':core:validators')
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
package info.nightscout.sdk.mapper
|
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.Storage
|
|
||||||
import info.nightscout.sdk.remotemodel.RemoteStorage
|
|
||||||
|
|
||||||
internal fun RemoteStorage.toLocal() = Storage(storage = storage, version = version)
|
|
|
@ -10,7 +10,7 @@ apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'info.nightscout.sdk'
|
namespace 'app.aaps.core.nssdk'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
|
@ -1,8 +1,8 @@
|
||||||
package info.nightscout.sdk
|
package app.aaps.core.nssdk
|
||||||
|
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidCallbackClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidCallbackClient
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.SupervisorJob
|
import kotlinx.coroutines.SupervisorJob
|
|
@ -1,37 +1,37 @@
|
||||||
package info.nightscout.sdk
|
package app.aaps.core.nssdk
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import info.nightscout.sdk.exceptions.DateHeaderOutOfToleranceException
|
import app.aaps.core.nssdk.exceptions.DateHeaderOutOfToleranceException
|
||||||
import info.nightscout.sdk.exceptions.InvalidAccessTokenException
|
import app.aaps.core.nssdk.exceptions.InvalidAccessTokenException
|
||||||
import info.nightscout.sdk.exceptions.InvalidFormatNightscoutException
|
import app.aaps.core.nssdk.exceptions.InvalidFormatNightscoutException
|
||||||
import info.nightscout.sdk.exceptions.InvalidParameterNightscoutException
|
import app.aaps.core.nssdk.exceptions.InvalidParameterNightscoutException
|
||||||
import info.nightscout.sdk.exceptions.UnknownResponseNightscoutException
|
import app.aaps.core.nssdk.exceptions.UnknownResponseNightscoutException
|
||||||
import info.nightscout.sdk.exceptions.UnsuccessfullNightscoutException
|
import app.aaps.core.nssdk.exceptions.UnsuccessfullNightscoutException
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
import info.nightscout.sdk.localmodel.treatment.CreateUpdateResponse
|
import app.aaps.core.nssdk.localmodel.treatment.CreateUpdateResponse
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import info.nightscout.sdk.mapper.toLocal
|
import app.aaps.core.nssdk.mapper.toLocal
|
||||||
import info.nightscout.sdk.mapper.toNSDeviceStatus
|
import app.aaps.core.nssdk.mapper.toNSDeviceStatus
|
||||||
import info.nightscout.sdk.mapper.toNSFood
|
import app.aaps.core.nssdk.mapper.toNSFood
|
||||||
import info.nightscout.sdk.mapper.toRemoteDeviceStatus
|
import app.aaps.core.nssdk.mapper.toRemoteDeviceStatus
|
||||||
import info.nightscout.sdk.mapper.toRemoteEntry
|
import app.aaps.core.nssdk.mapper.toRemoteEntry
|
||||||
import info.nightscout.sdk.mapper.toRemoteFood
|
import app.aaps.core.nssdk.mapper.toRemoteFood
|
||||||
import info.nightscout.sdk.mapper.toRemoteTreatment
|
import app.aaps.core.nssdk.mapper.toRemoteTreatment
|
||||||
import info.nightscout.sdk.mapper.toSgv
|
import app.aaps.core.nssdk.mapper.toSgv
|
||||||
import info.nightscout.sdk.mapper.toTreatment
|
import app.aaps.core.nssdk.mapper.toTreatment
|
||||||
import info.nightscout.sdk.networking.NetworkStackBuilder
|
import app.aaps.core.nssdk.networking.NetworkStackBuilder
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import info.nightscout.sdk.remotemodel.RemoteDeviceStatus
|
import app.aaps.core.nssdk.remotemodel.RemoteDeviceStatus
|
||||||
import info.nightscout.sdk.remotemodel.RemoteEntry
|
import app.aaps.core.nssdk.remotemodel.RemoteEntry
|
||||||
import info.nightscout.sdk.remotemodel.RemoteFood
|
import app.aaps.core.nssdk.remotemodel.RemoteFood
|
||||||
import info.nightscout.sdk.remotemodel.RemoteTreatment
|
import app.aaps.core.nssdk.remotemodel.RemoteTreatment
|
||||||
import info.nightscout.sdk.utils.retry
|
import app.aaps.core.nssdk.utils.retry
|
||||||
import info.nightscout.sdk.utils.toNotNull
|
import app.aaps.core.nssdk.utils.toNotNull
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
|
@ -1,9 +1,9 @@
|
||||||
package info.nightscout.sdk
|
package app.aaps.core.nssdk
|
||||||
|
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidRxClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidRxClient
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import io.reactivex.rxjava3.core.Single
|
import io.reactivex.rxjava3.core.Single
|
||||||
import kotlinx.coroutines.rx3.rxSingle
|
import kotlinx.coroutines.rx3.rxSingle
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will be thrown if the server responds with 401 UNAUTHORIZED due to the Date Header being off
|
* Will be thrown if the server responds with 401 UNAUTHORIZED due to the Date Header being off
|
|
@ -1,3 +1,3 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
class InvalidAccessTokenException : NightscoutException()
|
class InvalidAccessTokenException : NightscoutException()
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class InvalidFormatNightscoutException : NightscoutException {
|
class InvalidFormatNightscoutException : NightscoutException {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class InvalidParameterNightscoutException : NightscoutException {
|
class InvalidParameterNightscoutException : NightscoutException {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
class UnknownResponseNightscoutException : NightscoutException()
|
class UnknownResponseNightscoutException : NightscoutException()
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.exceptions
|
package app.aaps.core.nssdk.exceptions
|
||||||
|
|
||||||
class UnsuccessfullNightscoutException : NightscoutException {
|
class UnsuccessfullNightscoutException : NightscoutException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.interfaces
|
package app.aaps.core.nssdk.interfaces
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
|
|
||||||
interface NSAndroidCallbackClient {
|
interface NSAndroidCallbackClient {
|
|
@ -1,12 +1,12 @@
|
||||||
package info.nightscout.sdk.interfaces
|
package app.aaps.core.nssdk.interfaces
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
import info.nightscout.sdk.localmodel.treatment.CreateUpdateResponse
|
import app.aaps.core.nssdk.localmodel.treatment.CreateUpdateResponse
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
interface NSAndroidClient {
|
interface NSAndroidClient {
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.sdk.interfaces
|
package app.aaps.core.nssdk.interfaces
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import io.reactivex.rxjava3.core.Single
|
import io.reactivex.rxjava3.core.Single
|
||||||
|
|
||||||
interface NSAndroidRxClient {
|
interface NSAndroidRxClient {
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.interfaces
|
package app.aaps.core.nssdk.interfaces
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
interface RunningConfiguration {
|
interface RunningConfiguration {
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel
|
package app.aaps.core.nssdk.localmodel
|
||||||
|
|
||||||
data class ApiPermission(
|
data class ApiPermission(
|
||||||
val create: Boolean,
|
val create: Boolean,
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel
|
package app.aaps.core.nssdk.localmodel
|
||||||
|
|
||||||
data class ApiPermissions(
|
data class ApiPermissions(
|
||||||
val deviceStatus: ApiPermission,
|
val deviceStatus: ApiPermission,
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel
|
package app.aaps.core.nssdk.localmodel
|
||||||
|
|
||||||
data class Status(
|
data class Status(
|
||||||
val version: String,
|
val version: String,
|
|
@ -1,3 +1,3 @@
|
||||||
package info.nightscout.sdk.localmodel
|
package app.aaps.core.nssdk.localmodel
|
||||||
|
|
||||||
data class Storage(val storage: String, val version: String)
|
data class Storage(val storage: String, val version: String)
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.devicestatus
|
package app.aaps.core.nssdk.localmodel.devicestatus
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import kotlinx.serialization.Contextual
|
import kotlinx.serialization.Contextual
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.entry
|
package app.aaps.core.nssdk.localmodel.entry
|
||||||
|
|
||||||
enum class Direction(val nsName: String, val txtIcon: String) {
|
enum class Direction(val nsName: String, val txtIcon: String) {
|
||||||
TRIPLE_DOWN("TripleDown", "\u290B"), // ⤋
|
TRIPLE_DOWN("TripleDown", "\u290B"), // ⤋
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.entry
|
package app.aaps.core.nssdk.localmodel.entry
|
||||||
|
|
||||||
data class NSSgvV3(
|
data class NSSgvV3(
|
||||||
var date: Long?,
|
var date: Long?,
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.entry
|
package app.aaps.core.nssdk.localmodel.entry
|
||||||
|
|
||||||
enum class NsUnits(val value: String) {
|
enum class NsUnits(val value: String) {
|
||||||
MG_DL("mg/dl"),
|
MG_DL("mg/dl"),
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.food
|
package app.aaps.core.nssdk.localmodel.food
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSFood(
|
data class NSFood(
|
||||||
val date: Long,
|
val date: Long,
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
class CreateUpdateResponse(
|
class CreateUpdateResponse(
|
||||||
val response: Int,
|
val response: Int,
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSBolus(
|
data class NSBolus(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSBolusWizard(
|
data class NSBolusWizard(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSCarbs(
|
data class NSCarbs(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
data class NSEffectiveProfileSwitch(
|
data class NSEffectiveProfileSwitch(
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSExtendedBolus(
|
data class NSExtendedBolus(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSOfflineEvent(
|
data class NSOfflineEvent(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
data class NSProfileSwitch(
|
data class NSProfileSwitch(
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSTemporaryBasal(
|
data class NSTemporaryBasal(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSTemporaryTarget(
|
data class NSTemporaryTarget(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
data class NSTherapyEvent(
|
data class NSTherapyEvent(
|
||||||
override var date: Long?,
|
override var date: Long?,
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.localmodel.treatment
|
package app.aaps.core.nssdk.localmodel.treatment
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
|
|
||||||
interface NSTreatment {
|
interface NSTreatment {
|
||||||
var date: Long?
|
var date: Long?
|
|
@ -1,10 +1,10 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.ApiPermission
|
import app.aaps.core.nssdk.localmodel.ApiPermission
|
||||||
import info.nightscout.sdk.localmodel.ApiPermissions
|
import app.aaps.core.nssdk.localmodel.ApiPermissions
|
||||||
import info.nightscout.sdk.remotemodel.RemoteApiPermission
|
import app.aaps.core.nssdk.remotemodel.RemoteApiPermission
|
||||||
import info.nightscout.sdk.remotemodel.RemoteApiPermissions
|
import app.aaps.core.nssdk.remotemodel.RemoteApiPermissions
|
||||||
import info.nightscout.sdk.remotemodel.read
|
import app.aaps.core.nssdk.remotemodel.read
|
||||||
|
|
||||||
internal fun RemoteApiPermissions.toLocal(): ApiPermissions =
|
internal fun RemoteApiPermissions.toLocal(): ApiPermissions =
|
||||||
ApiPermissions(
|
ApiPermissions(
|
|
@ -1,9 +1,9 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import info.nightscout.sdk.remotemodel.RemoteDeviceStatus
|
import app.aaps.core.nssdk.remotemodel.RemoteDeviceStatus
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
fun NSDeviceStatus.convertToRemoteAndBack(): NSDeviceStatus =
|
fun NSDeviceStatus.convertToRemoteAndBack(): NSDeviceStatus =
|
|
@ -1,8 +1,8 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
import info.nightscout.sdk.remotemodel.RemoteFood
|
import app.aaps.core.nssdk.remotemodel.RemoteFood
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert to [RemoteFood] and back to [NSFood]
|
* Convert to [RemoteFood] and back to [NSFood]
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import info.nightscout.sdk.localmodel.Status
|
import app.aaps.core.nssdk.localmodel.Status
|
||||||
import info.nightscout.sdk.remotemodel.RemoteStatusResponse
|
import app.aaps.core.nssdk.remotemodel.RemoteStatusResponse
|
||||||
|
|
||||||
internal fun RemoteStatusResponse.toLocal() = Status(
|
internal fun RemoteStatusResponse.toLocal() = Status(
|
||||||
version = version,
|
version = version,
|
|
@ -0,0 +1,6 @@
|
||||||
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
|
import app.aaps.core.nssdk.localmodel.Storage
|
||||||
|
import app.aaps.core.nssdk.remotemodel.RemoteStorage
|
||||||
|
|
||||||
|
internal fun RemoteStorage.toLocal() = Storage(storage = storage, version = version)
|
|
@ -1,10 +1,10 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import info.nightscout.sdk.localmodel.entry.Direction
|
import app.aaps.core.nssdk.localmodel.entry.Direction
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import info.nightscout.sdk.remotemodel.RemoteEntry
|
import app.aaps.core.nssdk.remotemodel.RemoteEntry
|
||||||
|
|
||||||
fun NSSgvV3.convertToRemoteAndBack(): NSSgvV3? =
|
fun NSSgvV3.convertToRemoteAndBack(): NSSgvV3? =
|
||||||
toRemoteEntry().toSgv()
|
toRemoteEntry().toSgv()
|
|
@ -1,20 +1,20 @@
|
||||||
package info.nightscout.sdk.mapper
|
package app.aaps.core.nssdk.mapper
|
||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolus
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolusWizard
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolusWizard
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
import app.aaps.core.nssdk.localmodel.treatment.NSCarbs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSEffectiveProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSEffectiveProfileSwitch
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSExtendedBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSExtendedBolus
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSOfflineEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSOfflineEvent
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSProfileSwitch
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryBasal
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryBasal
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryTarget
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryTarget
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTherapyEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSTherapyEvent
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import info.nightscout.sdk.remotemodel.RemoteTreatment
|
import app.aaps.core.nssdk.remotemodel.RemoteTreatment
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ fun String.toNSTreatment(): NSTreatment? =
|
||||||
internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
||||||
val treatmentTimestamp = timestamp()
|
val treatmentTimestamp = timestamp()
|
||||||
when {
|
when {
|
||||||
insulin != null && insulin > 0 ->
|
insulin != null && insulin > 0 ->
|
||||||
return NSBolus(
|
return NSBolus(
|
||||||
date = treatmentTimestamp,
|
date = treatmentTimestamp,
|
||||||
device = this.device,
|
device = this.device,
|
|
@ -1,9 +1,9 @@
|
||||||
package info.nightscout.sdk.networking
|
package app.aaps.core.nssdk.networking
|
||||||
|
|
||||||
import info.nightscout.sdk.exceptions.DateHeaderOutOfToleranceException
|
import app.aaps.core.nssdk.exceptions.DateHeaderOutOfToleranceException
|
||||||
import info.nightscout.sdk.exceptions.InvalidAccessTokenException
|
import app.aaps.core.nssdk.exceptions.InvalidAccessTokenException
|
||||||
import info.nightscout.sdk.networking.Status.MESSAGE_DATE_HEADER_OUT_OF_TOLERANCE
|
import app.aaps.core.nssdk.networking.Status.MESSAGE_DATE_HEADER_OUT_OF_TOLERANCE
|
||||||
import info.nightscout.sdk.remotemodel.RemoteAuthResponse
|
import app.aaps.core.nssdk.remotemodel.RemoteAuthResponse
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.networking
|
package app.aaps.core.nssdk.networking
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.sdk.networking
|
package app.aaps.core.nssdk.networking
|
||||||
|
|
||||||
import info.nightscout.sdk.remotemodel.RemoteAuthResponse
|
import app.aaps.core.nssdk.remotemodel.RemoteAuthResponse
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.Path
|
import retrofit2.http.Path
|
|
@ -1,14 +1,14 @@
|
||||||
package info.nightscout.sdk.networking
|
package app.aaps.core.nssdk.networking
|
||||||
|
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import info.nightscout.sdk.remotemodel.NSResponse
|
import app.aaps.core.nssdk.remotemodel.NSResponse
|
||||||
import info.nightscout.sdk.remotemodel.RemoteCreateUpdateResponse
|
import app.aaps.core.nssdk.remotemodel.RemoteCreateUpdateResponse
|
||||||
import info.nightscout.sdk.remotemodel.RemoteDeviceStatus
|
import app.aaps.core.nssdk.remotemodel.RemoteDeviceStatus
|
||||||
import info.nightscout.sdk.remotemodel.RemoteEntry
|
import app.aaps.core.nssdk.remotemodel.RemoteEntry
|
||||||
import info.nightscout.sdk.remotemodel.RemoteFood
|
import app.aaps.core.nssdk.remotemodel.RemoteFood
|
||||||
import info.nightscout.sdk.remotemodel.RemoteStatusResponse
|
import app.aaps.core.nssdk.remotemodel.RemoteStatusResponse
|
||||||
import info.nightscout.sdk.remotemodel.RemoteTreatment
|
import app.aaps.core.nssdk.remotemodel.RemoteTreatment
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.networking
|
package app.aaps.core.nssdk.networking
|
||||||
|
|
||||||
internal object Status {
|
internal object Status {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
|
@ -1,3 +1,3 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
internal data class RemoteAuthResponse(val token: String, val iat: Long, val exp: Long)
|
internal data class RemoteAuthResponse(val token: String, val iat: Long, val exp: Long)
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import kotlinx.serialization.Contextual
|
import kotlinx.serialization.Contextual
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.sdk.remotemodel
|
package app.aaps.core.nssdk.remotemodel
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import org.joda.time.format.ISODateTimeFormat
|
import org.joda.time.format.ISODateTimeFormat
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.utils
|
package app.aaps.core.nssdk.utils
|
||||||
|
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.sdk.utils
|
package app.aaps.core.nssdk.utils
|
||||||
|
|
||||||
@JvmSynthetic
|
@JvmSynthetic
|
||||||
internal fun <E> List<E?>?.toNotNull(): List<E> = this?.filterNotNull() ?: listOf()
|
internal fun <E> List<E?>?.toNotNull(): List<E> = this?.filterNotNull() ?: listOf()
|
|
@ -19,7 +19,7 @@ dependencies {
|
||||||
implementation project(':database:impl')
|
implementation project(':database:impl')
|
||||||
implementation project(':core:main')
|
implementation project(':core:main')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:validators')
|
implementation project(':core:validators')
|
||||||
|
|
|
@ -75,7 +75,7 @@ import info.nightscout.database.impl.transactions.InsertTherapyEventAnnouncement
|
||||||
import info.nightscout.plugins.aps.R
|
import info.nightscout.plugins.aps.R
|
||||||
import info.nightscout.plugins.aps.loop.events.EventLoopSetLastRunGui
|
import info.nightscout.plugins.aps.loop.events.EventLoopSetLastRunGui
|
||||||
import info.nightscout.plugins.aps.loop.extensions.json
|
import info.nightscout.plugins.aps.loop.extensions.json
|
||||||
import info.nightscout.sdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
|
@ -24,7 +24,7 @@ import dagger.android.AndroidInjector
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.database.impl.AppRepository
|
import info.nightscout.database.impl.AppRepository
|
||||||
import info.nightscout.pump.virtual.VirtualPumpPlugin
|
import info.nightscout.pump.virtual.VirtualPumpPlugin
|
||||||
import info.nightscout.sdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
import org.junit.jupiter.api.BeforeEach
|
import org.junit.jupiter.api.BeforeEach
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.mockito.Mock
|
import org.mockito.Mock
|
||||||
|
|
|
@ -20,7 +20,7 @@ dependencies {
|
||||||
implementation project(':database:entities')
|
implementation project(':database:entities')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:main')
|
implementation project(':core:main')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:validators')
|
implementation project(':core:validators')
|
||||||
|
|
|
@ -18,8 +18,8 @@ import app.aaps.core.interfaces.rx.events.EventNSClientNewLog
|
||||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
import app.aaps.core.interfaces.sharedPreferences.SP
|
||||||
import app.aaps.core.interfaces.smoothing.Smoothing
|
import app.aaps.core.interfaces.smoothing.Smoothing
|
||||||
import app.aaps.core.interfaces.ui.UiInteraction
|
import app.aaps.core.interfaces.ui.UiInteraction
|
||||||
import info.nightscout.sdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -19,7 +19,7 @@ import app.aaps.core.interfaces.maintenance.PrefFileListProvider
|
||||||
import dagger.Binds
|
import dagger.Binds
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.android.ContributesAndroidInjector
|
import dagger.android.ContributesAndroidInjector
|
||||||
import info.nightscout.sdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
|
|
||||||
@Module(
|
@Module(
|
||||||
includes = [
|
includes = [
|
||||||
|
|
|
@ -21,7 +21,7 @@ dependencies {
|
||||||
implementation project(':core:graphview')
|
implementation project(':core:graphview')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:main')
|
implementation project(':core:main')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':core:validators')
|
implementation project(':core:validators')
|
||||||
|
|
|
@ -21,7 +21,7 @@ dependencies {
|
||||||
implementation project(':database:impl')
|
implementation project(':database:impl')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:main')
|
implementation project(':core:main')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ dependencies {
|
||||||
implementation project(':database:impl')
|
implementation project(':database:impl')
|
||||||
implementation project(':core:main')
|
implementation project(':core:main')
|
||||||
implementation project(':core:interfaces')
|
implementation project(':core:interfaces')
|
||||||
implementation project(':core:ns-sdk')
|
implementation project(':core:nssdk')
|
||||||
implementation project(':core:ui')
|
implementation project(':core:ui')
|
||||||
implementation project(':core:utils')
|
implementation project(':core:utils')
|
||||||
implementation project(':core:validators')
|
implementation project(':core:validators')
|
||||||
|
|
|
@ -35,19 +35,19 @@ import info.nightscout.plugins.sync.nsclientV3.extensions.toTemporaryBasal
|
||||||
import info.nightscout.plugins.sync.nsclientV3.extensions.toTemporaryTarget
|
import info.nightscout.plugins.sync.nsclientV3.extensions.toTemporaryTarget
|
||||||
import info.nightscout.plugins.sync.nsclientV3.extensions.toTherapyEvent
|
import info.nightscout.plugins.sync.nsclientV3.extensions.toTherapyEvent
|
||||||
import info.nightscout.plugins.sync.nsclientV3.extensions.toTransactionGlucoseValue
|
import info.nightscout.plugins.sync.nsclientV3.extensions.toTransactionGlucoseValue
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolus
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolusWizard
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolusWizard
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
import app.aaps.core.nssdk.localmodel.treatment.NSCarbs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSEffectiveProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSEffectiveProfileSwitch
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSExtendedBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSExtendedBolus
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSOfflineEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSOfflineEvent
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSProfileSwitch
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryBasal
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryBasal
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryTarget
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryTarget
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTherapyEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSTherapyEvent
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -7,8 +7,8 @@ import app.aaps.core.interfaces.sharedPreferences.SP
|
||||||
import app.aaps.core.interfaces.utils.DateUtil
|
import app.aaps.core.interfaces.utils.DateUtil
|
||||||
import info.nightscout.core.utils.HtmlHelper
|
import info.nightscout.core.utils.HtmlHelper
|
||||||
import info.nightscout.core.utils.JsonHelper
|
import info.nightscout.core.utils.JsonHelper
|
||||||
import info.nightscout.sdk.interfaces.RunningConfiguration
|
import app.aaps.core.nssdk.interfaces.RunningConfiguration
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ import info.nightscout.plugins.sync.nsclient.data.AlarmAck
|
||||||
import info.nightscout.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
import info.nightscout.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
||||||
import info.nightscout.plugins.sync.nsclient.workers.NSClientAddUpdateWorker
|
import info.nightscout.plugins.sync.nsclient.workers.NSClientAddUpdateWorker
|
||||||
import info.nightscout.plugins.sync.nsclient.workers.NSClientMbgWorker
|
import info.nightscout.plugins.sync.nsclient.workers.NSClientMbgWorker
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
import io.socket.client.IO
|
import io.socket.client.IO
|
||||||
|
|
|
@ -84,13 +84,13 @@ import info.nightscout.plugins.sync.nsclientV3.workers.LoadLastModificationWorke
|
||||||
import info.nightscout.plugins.sync.nsclientV3.workers.LoadProfileStoreWorker
|
import info.nightscout.plugins.sync.nsclientV3.workers.LoadProfileStoreWorker
|
||||||
import info.nightscout.plugins.sync.nsclientV3.workers.LoadStatusWorker
|
import info.nightscout.plugins.sync.nsclientV3.workers.LoadStatusWorker
|
||||||
import info.nightscout.plugins.sync.nsclientV3.workers.LoadTreatmentsWorker
|
import info.nightscout.plugins.sync.nsclientV3.workers.LoadTreatmentsWorker
|
||||||
import info.nightscout.sdk.NSAndroidClientImpl
|
import app.aaps.core.nssdk.NSAndroidClientImpl
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.mapper.toNSDeviceStatus
|
import app.aaps.core.nssdk.mapper.toNSDeviceStatus
|
||||||
import info.nightscout.sdk.mapper.toNSFood
|
import app.aaps.core.nssdk.mapper.toNSFood
|
||||||
import info.nightscout.sdk.mapper.toNSSgvV3
|
import app.aaps.core.nssdk.mapper.toNSSgvV3
|
||||||
import info.nightscout.sdk.mapper.toNSTreatment
|
import app.aaps.core.nssdk.mapper.toNSTreatment
|
||||||
import info.nightscout.sdk.remotemodel.LastModified
|
import app.aaps.core.nssdk.remotemodel.LastModified
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
import io.reactivex.rxjava3.kotlin.plusAssign
|
import io.reactivex.rxjava3.kotlin.plusAssign
|
||||||
import io.socket.client.Ack
|
import io.socket.client.Ack
|
||||||
|
|
|
@ -4,9 +4,9 @@ import app.aaps.core.interfaces.utils.T
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonSyntaxException
|
import com.google.gson.JsonSyntaxException
|
||||||
import info.nightscout.database.entities.BolusCalculatorResult
|
import info.nightscout.database.entities.BolusCalculatorResult
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolusWizard
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolusWizard
|
||||||
|
|
||||||
fun NSBolusWizard.toBolusCalculatorResult(): BolusCalculatorResult? =
|
fun NSBolusWizard.toBolusCalculatorResult(): BolusCalculatorResult? =
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.Bolus
|
import info.nightscout.database.entities.Bolus
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolus
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSBolus.toBolus(): Bolus =
|
fun NSBolus.toBolus(): Bolus =
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.Carbs
|
import info.nightscout.database.entities.Carbs
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
import app.aaps.core.nssdk.localmodel.treatment.NSCarbs
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSCarbs.toCarbs(): Carbs =
|
fun NSCarbs.toCarbs(): Carbs =
|
||||||
|
|
|
@ -3,7 +3,7 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import com.google.gson.JsonDeserializer
|
import com.google.gson.JsonDeserializer
|
||||||
import info.nightscout.database.entities.DeviceStatus
|
import info.nightscout.database.entities.DeviceStatus
|
||||||
import info.nightscout.sdk.localmodel.devicestatus.NSDeviceStatus
|
import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
|
||||||
fun DeviceStatus.toNSDeviceStatus(): NSDeviceStatus {
|
fun DeviceStatus.toNSDeviceStatus(): NSDeviceStatus {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.EffectiveProfileSwitch
|
import info.nightscout.database.entities.EffectiveProfileSwitch
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.plugins.sync.nsclient.extensions.fromConstant
|
import info.nightscout.plugins.sync.nsclient.extensions.fromConstant
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSEffectiveProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSEffectiveProfileSwitch
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSEffectiveProfileSwitch.toEffectiveProfileSwitch(dateUtil: DateUtil): EffectiveProfileSwitch? {
|
fun NSEffectiveProfileSwitch.toEffectiveProfileSwitch(dateUtil: DateUtil): EffectiveProfileSwitch? {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import app.aaps.core.interfaces.profile.Profile
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.ExtendedBolus
|
import info.nightscout.database.entities.ExtendedBolus
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSExtendedBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSExtendedBolus
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSExtendedBolus.toExtendedBolus(): ExtendedBolus =
|
fun NSExtendedBolus.toExtendedBolus(): ExtendedBolus =
|
||||||
|
|
|
@ -2,7 +2,7 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
|
|
||||||
import info.nightscout.database.entities.Food
|
import info.nightscout.database.entities.Food
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
|
|
||||||
fun NSFood.toFood(): Food =
|
fun NSFood.toFood(): Food =
|
||||||
Food(
|
Food(
|
||||||
|
|
|
@ -3,9 +3,9 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.GlucoseValue
|
import info.nightscout.database.entities.GlucoseValue
|
||||||
import info.nightscout.database.transactions.TransactionGlucoseValue
|
import info.nightscout.database.transactions.TransactionGlucoseValue
|
||||||
import info.nightscout.sdk.localmodel.entry.Direction
|
import app.aaps.core.nssdk.localmodel.entry.Direction
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSSgvV3.toTransactionGlucoseValue(): TransactionGlucoseValue {
|
fun NSSgvV3.toTransactionGlucoseValue(): TransactionGlucoseValue {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.OfflineEvent
|
import info.nightscout.database.entities.OfflineEvent
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSOfflineEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSOfflineEvent
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSOfflineEvent.toOfflineEvent(): OfflineEvent =
|
fun NSOfflineEvent.toOfflineEvent(): OfflineEvent =
|
||||||
|
|
|
@ -10,8 +10,8 @@ import app.aaps.core.interfaces.utils.DecimalFormatter
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.ProfileSwitch
|
import info.nightscout.database.entities.ProfileSwitch
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSProfileSwitch
|
import app.aaps.core.nssdk.localmodel.treatment.NSProfileSwitch
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSProfileSwitch.toProfileSwitch(activePlugin: ActivePlugin, dateUtil: DateUtil): ProfileSwitch? {
|
fun NSProfileSwitch.toProfileSwitch(activePlugin: ActivePlugin, dateUtil: DateUtil): ProfileSwitch? {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import app.aaps.core.interfaces.profile.Profile
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.TemporaryBasal
|
import info.nightscout.database.entities.TemporaryBasal
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryBasal
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryBasal
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSTemporaryBasal.toTemporaryBasal(): TemporaryBasal =
|
fun NSTemporaryBasal.toTemporaryBasal(): TemporaryBasal =
|
||||||
|
|
|
@ -3,9 +3,9 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.TemporaryTarget
|
import info.nightscout.database.entities.TemporaryTarget
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTemporaryTarget
|
import app.aaps.core.nssdk.localmodel.treatment.NSTemporaryTarget
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSTemporaryTarget.toTemporaryTarget(): TemporaryTarget =
|
fun NSTemporaryTarget.toTemporaryTarget(): TemporaryTarget =
|
||||||
|
|
|
@ -3,9 +3,9 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import app.aaps.core.interfaces.utils.T
|
import app.aaps.core.interfaces.utils.T
|
||||||
import info.nightscout.database.entities.TherapyEvent
|
import info.nightscout.database.entities.TherapyEvent
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.entry.NsUnits
|
import app.aaps.core.nssdk.localmodel.entry.NsUnits
|
||||||
import info.nightscout.sdk.localmodel.treatment.EventType
|
import app.aaps.core.nssdk.localmodel.treatment.EventType
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTherapyEvent
|
import app.aaps.core.nssdk.localmodel.treatment.NSTherapyEvent
|
||||||
import java.security.InvalidParameterException
|
import java.security.InvalidParameterException
|
||||||
|
|
||||||
fun NSTherapyEvent.toTherapyEvent(): TherapyEvent =
|
fun NSTherapyEvent.toTherapyEvent(): TherapyEvent =
|
||||||
|
|
|
@ -14,8 +14,8 @@ import app.aaps.core.interfaces.sync.NsClient
|
||||||
import app.aaps.core.interfaces.utils.DateUtil
|
import app.aaps.core.interfaces.utils.DateUtil
|
||||||
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.localmodel.entry.NSSgvV3
|
import app.aaps.core.nssdk.localmodel.entry.NSSgvV3
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
|
@ -11,7 +11,7 @@ import app.aaps.core.interfaces.rx.events.EventNSClientNewLog
|
||||||
import app.aaps.core.interfaces.utils.DateUtil
|
import app.aaps.core.interfaces.utils.DateUtil
|
||||||
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.sdk.localmodel.food.NSFood
|
import app.aaps.core.nssdk.localmodel.food.NSFood
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import info.nightscout.core.utils.JsonHelper
|
||||||
import info.nightscout.core.utils.receivers.DataWorkerStorage
|
import info.nightscout.core.utils.receivers.DataWorkerStorage
|
||||||
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
|
@ -12,8 +12,8 @@ import app.aaps.core.interfaces.sync.NsClient
|
||||||
import app.aaps.core.interfaces.utils.DateUtil
|
import app.aaps.core.interfaces.utils.DateUtil
|
||||||
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
import info.nightscout.plugins.sync.nsShared.NsIncomingDataProcessor
|
||||||
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
import info.nightscout.plugins.sync.nsclientV3.NSClientV3Plugin
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTreatment
|
import app.aaps.core.nssdk.localmodel.treatment.NSTreatment
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
|
@ -34,8 +34,8 @@ import info.nightscout.plugins.sync.nsShared.StoreDataForDbImpl
|
||||||
import info.nightscout.plugins.sync.nsclient.ReceiverDelegate
|
import info.nightscout.plugins.sync.nsclient.ReceiverDelegate
|
||||||
import info.nightscout.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
import info.nightscout.plugins.sync.nsclient.data.NSDeviceStatusHandler
|
||||||
import info.nightscout.plugins.sync.nsclient.extensions.fromConstant
|
import info.nightscout.plugins.sync.nsclient.extensions.fromConstant
|
||||||
import info.nightscout.sdk.interfaces.NSAndroidClient
|
import app.aaps.core.nssdk.interfaces.NSAndroidClient
|
||||||
import info.nightscout.sdk.localmodel.treatment.CreateUpdateResponse
|
import app.aaps.core.nssdk.localmodel.treatment.CreateUpdateResponse
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import org.junit.jupiter.api.BeforeEach
|
import org.junit.jupiter.api.BeforeEach
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
import info.nightscout.database.entities.BolusCalculatorResult
|
import info.nightscout.database.entities.BolusCalculatorResult
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolusWizard
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolusWizard
|
||||||
import info.nightscout.sdk.mapper.convertToRemoteAndBack
|
import app.aaps.core.nssdk.mapper.convertToRemoteAndBack
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
@Suppress("SpellCheckingInspection")
|
@Suppress("SpellCheckingInspection")
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
import info.nightscout.database.entities.Bolus
|
import info.nightscout.database.entities.Bolus
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
import app.aaps.core.nssdk.localmodel.treatment.NSBolus
|
||||||
import info.nightscout.sdk.mapper.convertToRemoteAndBack
|
import app.aaps.core.nssdk.mapper.convertToRemoteAndBack
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
import com.google.common.truth.Truth.assertThat
|
import com.google.common.truth.Truth.assertThat
|
||||||
import info.nightscout.database.entities.Carbs
|
import info.nightscout.database.entities.Carbs
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
import app.aaps.core.nssdk.localmodel.treatment.NSCarbs
|
||||||
import info.nightscout.sdk.mapper.convertToRemoteAndBack
|
import app.aaps.core.nssdk.mapper.convertToRemoteAndBack
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
@Suppress("SpellCheckingInspection")
|
@Suppress("SpellCheckingInspection")
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue