package rpcs

import (
	"sparrow/pkg/deviceAlarm"
	"sparrow/pkg/online"
	"sparrow/pkg/scene"
	"time"
)

type ArgsGenerateDeviceAccessToken ArgsDeviceId
type ReplyGenerateDeviceAccessToken struct {
	AccessToken []byte
}

type ArgsValidateDeviceAccessToken struct {
	Id          string
	AccessToken []byte
}
type ReplyValidateDeviceAccessToken ReplyEmptyResult

type ArgsGetOnline struct {
	Id                string
	ClientIP          string
	AccessRPCHost     string
	HeartbeatInterval uint32
}
type ReplyGetOnline ReplyEmptyResult

type ArgsGetOffline struct {
	Id       string
	VendorId string
}
type ReplyGetOffline ReplyEmptyResult

type ArgsHeartBeat struct {
	Id string
}
type ReplyHeartBeat ReplyEmptyResult

type ArgsGetDeviceOnlineStatus ArgsDeviceId
type ReplyGetDeviceOnlineStatus online.Status

type ArgsOtaFile struct {
	FileId   int
	FileData []byte
}

type ReplyOtaFile struct {
	File []byte
}

type ArgsOtaProgress struct {
	DeviceId string
	Progress int
}

type ReplyOtaProgress struct {
	Progress int
}

type ReplyDeviceStatus struct {
	Status interface{}
}

type ArgsAlarmInfo deviceAlarm.AlarmParams

type ArgsGetAlarm struct {
	DeviceCode string
}

type ReplayAlarm struct {
	AlarmParams *deviceAlarm.AlarmParams
}

type ArgsScene struct {
	SceneType     string
	Key           string
	SceneId       string
	Name          string
	ConditionDesc string
	ActionDesc    string
	Config        string
	Status        int
	Time          time.Time
}

type ArgsGetAllScene struct {
	Code string
	Pi   int
	Ps   int
}

type ReplyScene struct {
	Config string
}

type ReplyScenes struct {
	Total  int
	Result []*scene.InfoScene
}
