/
IntegrationRepository.kt
57 lines (35 loc) · 1.98 KB
/
IntegrationRepository.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package io.homeassistant.companion.android.common.data.integration
import io.homeassistant.companion.android.common.data.integration.impl.entities.RateLimitResponse
interface IntegrationRepository {
suspend fun registerDevice(deviceRegistration: DeviceRegistration)
suspend fun updateRegistration(deviceRegistration: DeviceRegistration)
suspend fun getRegistration(): DeviceRegistration
suspend fun isRegistered(): Boolean
suspend fun getNotificationRateLimits(): RateLimitResponse
suspend fun renderTemplate(template: String, variables: Map<String, String>): String
suspend fun updateLocation(updateLocation: UpdateLocation)
suspend fun getZones(): Array<Entity<ZoneAttributes>>
suspend fun setFullScreenEnabled(enabled: Boolean)
suspend fun isFullScreenEnabled(): Boolean
suspend fun setKeepScreenOnEnabled(enabled: Boolean)
suspend fun isKeepScreenOnEnabled(): Boolean
suspend fun setAutoPlayVideo(enabled: Boolean)
suspend fun isAutoPlayVideoEnabled(): Boolean
suspend fun sessionTimeOut(value: Int)
suspend fun getSessionTimeOut(): Int
suspend fun setSessionExpireMillis(value: Long)
suspend fun getSessionExpireMillis(): Long
suspend fun setWearHomeFavorites(favorites: Set<String>)
suspend fun getWearHomeFavorites(): Set<String>
suspend fun getThemeColor(): String
suspend fun getHomeAssistantVersion(): String
suspend fun getServices(): Array<Service>
suspend fun getEntities(): Array<Entity<Any>>
suspend fun getEntity(entityId: String): Entity<Map<String, Any>>
suspend fun callService(domain: String, service: String, serviceData: HashMap<String, Any>)
suspend fun scanTag(data: HashMap<String, Any>)
suspend fun fireEvent(eventType: String, eventData: Map<String, Any>)
suspend fun registerSensor(sensorRegistration: SensorRegistration<Any>)
suspend fun updateSensors(sensors: Array<SensorRegistration<Any>>): Boolean
suspend fun shouldNotifySecurityWarning(): Boolean
}