alarmclock

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName                  xml.Name                      `xml:"s:Body"`
	SetFormat                *SetFormatArgs                `xml:"u:SetFormat,omitempty"`
	GetFormat                *GetFormatArgs                `xml:"u:GetFormat,omitempty"`
	SetTimeZone              *SetTimeZoneArgs              `xml:"u:SetTimeZone,omitempty"`
	GetTimeZone              *GetTimeZoneArgs              `xml:"u:GetTimeZone,omitempty"`
	GetTimeZoneAndRule       *GetTimeZoneAndRuleArgs       `xml:"u:GetTimeZoneAndRule,omitempty"`
	GetTimeZoneRule          *GetTimeZoneRuleArgs          `xml:"u:GetTimeZoneRule,omitempty"`
	SetTimeServer            *SetTimeServerArgs            `xml:"u:SetTimeServer,omitempty"`
	GetTimeServer            *GetTimeServerArgs            `xml:"u:GetTimeServer,omitempty"`
	SetTimeNow               *SetTimeNowArgs               `xml:"u:SetTimeNow,omitempty"`
	GetHouseholdTimeAtStamp  *GetHouseholdTimeAtStampArgs  `xml:"u:GetHouseholdTimeAtStamp,omitempty"`
	GetTimeNow               *GetTimeNowArgs               `xml:"u:GetTimeNow,omitempty"`
	CreateAlarm              *CreateAlarmArgs              `xml:"u:CreateAlarm,omitempty"`
	UpdateAlarm              *UpdateAlarmArgs              `xml:"u:UpdateAlarm,omitempty"`
	DestroyAlarm             *DestroyAlarmArgs             `xml:"u:DestroyAlarm,omitempty"`
	ListAlarms               *ListAlarmsArgs               `xml:"u:ListAlarms,omitempty"`
	SetDailyIndexRefreshTime *SetDailyIndexRefreshTimeArgs `xml:"u:SetDailyIndexRefreshTime,omitempty"`
	GetDailyIndexRefreshTime *GetDailyIndexRefreshTimeArgs `xml:"u:GetDailyIndexRefreshTime,omitempty"`
}

type BodyResponse

type BodyResponse struct {
	XMLName                  xml.Name                          `xml:"Body"`
	SetFormat                *SetFormatResponse                `xml:"SetFormatResponse,omitempty"`
	GetFormat                *GetFormatResponse                `xml:"GetFormatResponse,omitempty"`
	SetTimeZone              *SetTimeZoneResponse              `xml:"SetTimeZoneResponse,omitempty"`
	GetTimeZone              *GetTimeZoneResponse              `xml:"GetTimeZoneResponse,omitempty"`
	GetTimeZoneAndRule       *GetTimeZoneAndRuleResponse       `xml:"GetTimeZoneAndRuleResponse,omitempty"`
	GetTimeZoneRule          *GetTimeZoneRuleResponse          `xml:"GetTimeZoneRuleResponse,omitempty"`
	SetTimeServer            *SetTimeServerResponse            `xml:"SetTimeServerResponse,omitempty"`
	GetTimeServer            *GetTimeServerResponse            `xml:"GetTimeServerResponse,omitempty"`
	SetTimeNow               *SetTimeNowResponse               `xml:"SetTimeNowResponse,omitempty"`
	GetHouseholdTimeAtStamp  *GetHouseholdTimeAtStampResponse  `xml:"GetHouseholdTimeAtStampResponse,omitempty"`
	GetTimeNow               *GetTimeNowResponse               `xml:"GetTimeNowResponse,omitempty"`
	CreateAlarm              *CreateAlarmResponse              `xml:"CreateAlarmResponse,omitempty"`
	UpdateAlarm              *UpdateAlarmResponse              `xml:"UpdateAlarmResponse,omitempty"`
	DestroyAlarm             *DestroyAlarmResponse             `xml:"DestroyAlarmResponse,omitempty"`
	ListAlarms               *ListAlarmsResponse               `xml:"ListAlarmsResponse,omitempty"`
	SetDailyIndexRefreshTime *SetDailyIndexRefreshTimeResponse `xml:"SetDailyIndexRefreshTimeResponse,omitempty"`
	GetDailyIndexRefreshTime *GetDailyIndexRefreshTimeResponse `xml:"GetDailyIndexRefreshTimeResponse,omitempty"`
}

type CreateAlarmArgs

type CreateAlarmArgs struct {
	Xmlns          string `xml:"xmlns:u,attr"`
	StartLocalTime string `xml:"StartLocalTime"`
	Duration       string `xml:"Duration"`
	// Allowed Value: ONCE
	// Allowed Value: WEEKDAYS
	// Allowed Value: WEEKENDS
	// Allowed Value: DAILY
	Recurrence      string `xml:"Recurrence"`
	Enabled         bool   `xml:"Enabled"`
	RoomUUID        string `xml:"RoomUUID"`
	ProgramURI      string `xml:"ProgramURI"`
	ProgramMetaData string `xml:"ProgramMetaData"`
	// Allowed Value: NORMAL
	// Allowed Value: REPEAT_ALL
	// Allowed Value: SHUFFLE_NOREPEAT
	// Allowed Value: SHUFFLE
	PlayMode           string `xml:"PlayMode"`
	Volume             uint16 `xml:"Volume"`
	IncludeLinkedZones bool   `xml:"IncludeLinkedZones"`
}

type CreateAlarmResponse

type CreateAlarmResponse struct {
	AssignedID uint32 `xml:"AssignedID"`
}

type DestroyAlarmArgs

type DestroyAlarmArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
	ID    uint32 `xml:"ID"`
}

type DestroyAlarmResponse

type DestroyAlarmResponse struct {
}

type Envelope

type Envelope struct {
	XMLName       xml.Name `xml:"s:Envelope"`
	Xmlns         string   `xml:"xmlns:s,attr"`
	EncodingStyle string   `xml:"s:encodingStyle,attr"`
	Body          Body     `xml:"s:Body"`
}

type EnvelopeResponse

type EnvelopeResponse struct {
	XMLName       xml.Name     `xml:"Envelope"`
	Xmlns         string       `xml:"xmlns:s,attr"`
	EncodingStyle string       `xml:"encodingStyle,attr"`
	Body          BodyResponse `xml:"Body"`
}

type GetDailyIndexRefreshTimeArgs

type GetDailyIndexRefreshTimeArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetDailyIndexRefreshTimeResponse

type GetDailyIndexRefreshTimeResponse struct {
	CurrentDailyIndexRefreshTime string `xml:"CurrentDailyIndexRefreshTime"`
}

type GetFormatArgs

type GetFormatArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetFormatResponse

type GetFormatResponse struct {
	CurrentTimeFormat string `xml:"CurrentTimeFormat"`
	CurrentDateFormat string `xml:"CurrentDateFormat"`
}

type GetHouseholdTimeAtStampArgs

type GetHouseholdTimeAtStampArgs struct {
	Xmlns     string `xml:"xmlns:u,attr"`
	TimeStamp string `xml:"TimeStamp"`
}

type GetHouseholdTimeAtStampResponse

type GetHouseholdTimeAtStampResponse struct {
	HouseholdUTCTime string `xml:"HouseholdUTCTime"`
}

type GetTimeNowArgs

type GetTimeNowArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetTimeNowResponse

type GetTimeNowResponse struct {
	CurrentUTCTime        string `xml:"CurrentUTCTime"`
	CurrentLocalTime      string `xml:"CurrentLocalTime"`
	CurrentTimeZone       string `xml:"CurrentTimeZone"`
	CurrentTimeGeneration uint32 `xml:"CurrentTimeGeneration"`
}

type GetTimeServerArgs

type GetTimeServerArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetTimeServerResponse

type GetTimeServerResponse struct {
	CurrentTimeServer string `xml:"CurrentTimeServer"`
}

type GetTimeZoneAndRuleArgs

type GetTimeZoneAndRuleArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetTimeZoneAndRuleResponse

type GetTimeZoneAndRuleResponse struct {
	Index           int32  `xml:"Index"`
	AutoAdjustDst   bool   `xml:"AutoAdjustDst"`
	CurrentTimeZone string `xml:"CurrentTimeZone"`
}

type GetTimeZoneArgs

type GetTimeZoneArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type GetTimeZoneResponse

type GetTimeZoneResponse struct {
	Index         int32 `xml:"Index"`
	AutoAdjustDst bool  `xml:"AutoAdjustDst"`
}

type GetTimeZoneRuleArgs

type GetTimeZoneRuleArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
	Index int32  `xml:"Index"`
}

type GetTimeZoneRuleResponse

type GetTimeZoneRuleResponse struct {
	TimeZone string `xml:"TimeZone"`
}

type ListAlarmsArgs

type ListAlarmsArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

type ListAlarmsResponse

type ListAlarmsResponse struct {
	CurrentAlarmList        string `xml:"CurrentAlarmList"`
	CurrentAlarmListVersion string `xml:"CurrentAlarmListVersion"`
}

type Service

type Service struct {
	ControlEndpoint *url.URL
	EventEndpoint   *url.URL
}

func NewService

func NewService(deviceUrl *url.URL) *Service

func (*Service) CreateAlarm

func (s *Service) CreateAlarm(httpClient *http.Client, args *CreateAlarmArgs) (*CreateAlarmResponse, error)

func (*Service) DestroyAlarm

func (s *Service) DestroyAlarm(httpClient *http.Client, args *DestroyAlarmArgs) (*DestroyAlarmResponse, error)

func (*Service) GetDailyIndexRefreshTime

func (s *Service) GetDailyIndexRefreshTime(httpClient *http.Client, args *GetDailyIndexRefreshTimeArgs) (*GetDailyIndexRefreshTimeResponse, error)

func (*Service) GetFormat

func (s *Service) GetFormat(httpClient *http.Client, args *GetFormatArgs) (*GetFormatResponse, error)

func (*Service) GetHouseholdTimeAtStamp

func (s *Service) GetHouseholdTimeAtStamp(httpClient *http.Client, args *GetHouseholdTimeAtStampArgs) (*GetHouseholdTimeAtStampResponse, error)

func (*Service) GetTimeNow

func (s *Service) GetTimeNow(httpClient *http.Client, args *GetTimeNowArgs) (*GetTimeNowResponse, error)

func (*Service) GetTimeServer

func (s *Service) GetTimeServer(httpClient *http.Client, args *GetTimeServerArgs) (*GetTimeServerResponse, error)

func (*Service) GetTimeZone

func (s *Service) GetTimeZone(httpClient *http.Client, args *GetTimeZoneArgs) (*GetTimeZoneResponse, error)

func (*Service) GetTimeZoneAndRule

func (s *Service) GetTimeZoneAndRule(httpClient *http.Client, args *GetTimeZoneAndRuleArgs) (*GetTimeZoneAndRuleResponse, error)

func (*Service) GetTimeZoneRule

func (s *Service) GetTimeZoneRule(httpClient *http.Client, args *GetTimeZoneRuleArgs) (*GetTimeZoneRuleResponse, error)

func (*Service) ListAlarms

func (s *Service) ListAlarms(httpClient *http.Client, args *ListAlarmsArgs) (*ListAlarmsResponse, error)

func (*Service) SetDailyIndexRefreshTime

func (s *Service) SetDailyIndexRefreshTime(httpClient *http.Client, args *SetDailyIndexRefreshTimeArgs) (*SetDailyIndexRefreshTimeResponse, error)

func (*Service) SetFormat

func (s *Service) SetFormat(httpClient *http.Client, args *SetFormatArgs) (*SetFormatResponse, error)

func (*Service) SetTimeNow

func (s *Service) SetTimeNow(httpClient *http.Client, args *SetTimeNowArgs) (*SetTimeNowResponse, error)

func (*Service) SetTimeServer

func (s *Service) SetTimeServer(httpClient *http.Client, args *SetTimeServerArgs) (*SetTimeServerResponse, error)

func (*Service) SetTimeZone

func (s *Service) SetTimeZone(httpClient *http.Client, args *SetTimeZoneArgs) (*SetTimeZoneResponse, error)

func (*Service) UpdateAlarm

func (s *Service) UpdateAlarm(httpClient *http.Client, args *UpdateAlarmArgs) (*UpdateAlarmResponse, error)

type SetDailyIndexRefreshTimeArgs

type SetDailyIndexRefreshTimeArgs struct {
	Xmlns                        string `xml:"xmlns:u,attr"`
	DesiredDailyIndexRefreshTime string `xml:"DesiredDailyIndexRefreshTime"`
}

type SetDailyIndexRefreshTimeResponse

type SetDailyIndexRefreshTimeResponse struct {
}

type SetFormatArgs

type SetFormatArgs struct {
	Xmlns             string `xml:"xmlns:u,attr"`
	DesiredTimeFormat string `xml:"DesiredTimeFormat"`
	DesiredDateFormat string `xml:"DesiredDateFormat"`
}

type SetFormatResponse

type SetFormatResponse struct {
}

type SetTimeNowArgs

type SetTimeNowArgs struct {
	Xmlns                  string `xml:"xmlns:u,attr"`
	DesiredTime            string `xml:"DesiredTime"`
	TimeZoneForDesiredTime string `xml:"TimeZoneForDesiredTime"`
}

type SetTimeNowResponse

type SetTimeNowResponse struct {
}

type SetTimeServerArgs

type SetTimeServerArgs struct {
	Xmlns             string `xml:"xmlns:u,attr"`
	DesiredTimeServer string `xml:"DesiredTimeServer"`
}

type SetTimeServerResponse

type SetTimeServerResponse struct {
}

type SetTimeZoneArgs

type SetTimeZoneArgs struct {
	Xmlns         string `xml:"xmlns:u,attr"`
	Index         int32  `xml:"Index"`
	AutoAdjustDst bool   `xml:"AutoAdjustDst"`
}

type SetTimeZoneResponse

type SetTimeZoneResponse struct {
}

type UpdateAlarmArgs

type UpdateAlarmArgs struct {
	Xmlns          string `xml:"xmlns:u,attr"`
	ID             uint32 `xml:"ID"`
	StartLocalTime string `xml:"StartLocalTime"`
	Duration       string `xml:"Duration"`
	// Allowed Value: ONCE
	// Allowed Value: WEEKDAYS
	// Allowed Value: WEEKENDS
	// Allowed Value: DAILY
	Recurrence      string `xml:"Recurrence"`
	Enabled         bool   `xml:"Enabled"`
	RoomUUID        string `xml:"RoomUUID"`
	ProgramURI      string `xml:"ProgramURI"`
	ProgramMetaData string `xml:"ProgramMetaData"`
	// Allowed Value: NORMAL
	// Allowed Value: REPEAT_ALL
	// Allowed Value: SHUFFLE_NOREPEAT
	// Allowed Value: SHUFFLE
	PlayMode           string `xml:"PlayMode"`
	Volume             uint16 `xml:"Volume"`
	IncludeLinkedZones bool   `xml:"IncludeLinkedZones"`
}

type UpdateAlarmResponse

type UpdateAlarmResponse struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL