alarmclock

package
v0.0.0-...-d57ea70 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package alarmclock is a generated AlarmClock package.

Index

Constants

View Source
const (
	ServiceURN     = "urn:schemas-upnp-org:service:AlarmClock:1"
	EncodingSchema = "http://schemas.xmlsoap.org/soap/encoding/"
	EnvelopeSchema = "http://schemas.xmlsoap.org/soap/envelope/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlarmListVersion

type AlarmListVersion string

type AlarmPlayModeEnum

type AlarmPlayModeEnum string
const (
	AlarmPlayMode_NORMAL           AlarmPlayModeEnum = "NORMAL"
	AlarmPlayMode_REPEAT_ALL       AlarmPlayModeEnum = "REPEAT_ALL"
	AlarmPlayMode_SHUFFLE_NOREPEAT AlarmPlayModeEnum = "SHUFFLE_NOREPEAT"
	AlarmPlayMode_SHUFFLE          AlarmPlayModeEnum = "SHUFFLE"
)

type CreateAlarmArgs

type CreateAlarmArgs struct {
	Xmlns              string            `xml:"xmlns:u,attr"`
	StartLocalTime     string            `xml:"StartLocalTime"`
	Duration           string            `xml:"Duration"`
	Recurrence         RecurrenceEnum    `xml:"Recurrence"`
	Enabled            bool              `xml:"Enabled"`
	RoomUUID           string            `xml:"RoomUUID"`
	ProgramURI         string            `xml:"ProgramURI"`
	ProgramMetaData    string            `xml:"ProgramMetaData"`
	PlayMode           AlarmPlayModeEnum `xml:"PlayMode"`
	Volume             uint16            `xml:"Volume"`
	IncludeLinkedZones bool              `xml:"IncludeLinkedZones"`
}

CreateAlarm Argument type.

type CreateAlarmResponse

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

CreateAlarm Response type.

type DailyIndexRefreshTime

type DailyIndexRefreshTime string

type DateFormat

type DateFormat string

type DestroyAlarmArgs

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

DestroyAlarm Argument type.

type DestroyAlarmResponse

type DestroyAlarmResponse struct {
}

DestroyAlarm Response type.

type GetDailyIndexRefreshTimeArgs

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

GetDailyIndexRefreshTime Argument type.

type GetDailyIndexRefreshTimeResponse

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

GetDailyIndexRefreshTime Response type.

type GetFormatArgs

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

GetFormat Argument type.

type GetFormatResponse

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

GetFormat Response type.

type GetHouseholdTimeAtStampArgs

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

GetHouseholdTimeAtStamp Argument type.

type GetHouseholdTimeAtStampResponse

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

GetHouseholdTimeAtStamp Response type.

type GetTimeNowArgs

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

GetTimeNow Argument type.

type GetTimeNowResponse

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

GetTimeNow Response type.

type GetTimeServerArgs

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

GetTimeServer Argument type.

type GetTimeServerResponse

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

GetTimeServer Response type.

type GetTimeZoneAndRuleArgs

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

GetTimeZoneAndRule Argument type.

type GetTimeZoneAndRuleResponse

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

GetTimeZoneAndRule Response type.

type GetTimeZoneArgs

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

GetTimeZone Argument type.

type GetTimeZoneResponse

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

GetTimeZone Response type.

type GetTimeZoneRuleArgs

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

GetTimeZoneRule Argument type.

type GetTimeZoneRuleResponse

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

GetTimeZoneRule Response type.

type ListAlarmsArgs

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

ListAlarms Argument type.

type ListAlarmsResponse

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

ListAlarms Response type.

type Property

type Property struct {
	XMLName               xml.Name               `xml:"property"`
	TimeZone              *TimeZone              `xml:"TimeZone"`
	TimeServer            *TimeServer            `xml:"TimeServer"`
	TimeGeneration        *TimeGeneration        `xml:"TimeGeneration"`
	AlarmListVersion      *AlarmListVersion      `xml:"AlarmListVersion"`
	DailyIndexRefreshTime *DailyIndexRefreshTime `xml:"DailyIndexRefreshTime"`
	TimeFormat            *TimeFormat            `xml:"TimeFormat"`
	DateFormat            *DateFormat            `xml:"DateFormat"`
}

Property represents a single property in a UPnP event notification.

type RecurrenceEnum

type RecurrenceEnum string

Enumerations

const (
	Recurrence_ONCE     RecurrenceEnum = "ONCE"
	Recurrence_WEEKDAYS RecurrenceEnum = "WEEKDAYS"
	Recurrence_WEEKENDS RecurrenceEnum = "WEEKENDS"
	Recurrence_DAILY    RecurrenceEnum = "DAILY"
)

type Service

type Service struct {
	TimeZone              *TimeZone
	TimeServer            *TimeServer
	TimeGeneration        *TimeGeneration
	AlarmListVersion      *AlarmListVersion
	DailyIndexRefreshTime *DailyIndexRefreshTime
	TimeFormat            *TimeFormat
	DateFormat            *DateFormat
	// contains filtered or unexported fields
}

Service represents AlarmClock service.

func NewService

func NewService(opts ...ServiceOption) *Service

NewService creates a new instance of the AlarmClock service. You must provide at least a location URL and an HTTP client using the options.

func (*Service) Client

func (s *Service) Client() *http.Client

Client returns the HTTP client used to communicate with the service.

func (*Service) ControlEndpoint

func (s *Service) ControlEndpoint() *url.URL

ControlEndpoint returns the control endpoint URL of the service. This is usually a URL relative to the device's base URL.

func (*Service) CreateAlarm

func (s *Service) CreateAlarm(args *CreateAlarmArgs) (*CreateAlarmResponse, error)

CreateAlarm calls the CreateAlarm action on the service.

func (*Service) DestroyAlarm

func (s *Service) DestroyAlarm(args *DestroyAlarmArgs) (*DestroyAlarmResponse, error)

DestroyAlarm calls the DestroyAlarm action on the service.

func (*Service) EventEndpoint

func (s *Service) EventEndpoint() *url.URL

EventEndpoint returns the event endpoint URL of the service. This is usually a URL relative to the device's base URL.

func (*Service) GetDailyIndexRefreshTime

func (s *Service) GetDailyIndexRefreshTime(args *GetDailyIndexRefreshTimeArgs) (*GetDailyIndexRefreshTimeResponse, error)

GetDailyIndexRefreshTime calls the GetDailyIndexRefreshTime action on the service.

func (*Service) GetFormat

func (s *Service) GetFormat(args *GetFormatArgs) (*GetFormatResponse, error)

GetFormat calls the GetFormat action on the service.

func (*Service) GetHouseholdTimeAtStamp

func (s *Service) GetHouseholdTimeAtStamp(args *GetHouseholdTimeAtStampArgs) (*GetHouseholdTimeAtStampResponse, error)

GetHouseholdTimeAtStamp calls the GetHouseholdTimeAtStamp action on the service.

func (*Service) GetTimeNow

func (s *Service) GetTimeNow(args *GetTimeNowArgs) (*GetTimeNowResponse, error)

GetTimeNow calls the GetTimeNow action on the service.

func (*Service) GetTimeServer

func (s *Service) GetTimeServer(args *GetTimeServerArgs) (*GetTimeServerResponse, error)

GetTimeServer calls the GetTimeServer action on the service.

func (*Service) GetTimeZone

func (s *Service) GetTimeZone(args *GetTimeZoneArgs) (*GetTimeZoneResponse, error)

GetTimeZone calls the GetTimeZone action on the service.

func (*Service) GetTimeZoneAndRule

func (s *Service) GetTimeZoneAndRule(args *GetTimeZoneAndRuleArgs) (*GetTimeZoneAndRuleResponse, error)

GetTimeZoneAndRule calls the GetTimeZoneAndRule action on the service.

func (*Service) GetTimeZoneRule

func (s *Service) GetTimeZoneRule(args *GetTimeZoneRuleArgs) (*GetTimeZoneRuleResponse, error)

GetTimeZoneRule calls the GetTimeZoneRule action on the service.

func (*Service) ListAlarms

func (s *Service) ListAlarms(args *ListAlarmsArgs) (*ListAlarmsResponse, error)

ListAlarms calls the ListAlarms action on the service.

func (*Service) Location

func (s *Service) Location() *url.URL

Location returns the base URL of the device hosting the service.

func (*Service) ParseEvent

func (zp *Service) ParseEvent(body []byte) []interface{}

ParseEvent parses a UPnP event notification and updates the service's state variables accordingly. It returns a slice of updated state variable values.

func (*Service) SetDailyIndexRefreshTime

func (s *Service) SetDailyIndexRefreshTime(args *SetDailyIndexRefreshTimeArgs) (*SetDailyIndexRefreshTimeResponse, error)

SetDailyIndexRefreshTime calls the SetDailyIndexRefreshTime action on the service.

func (*Service) SetFormat

func (s *Service) SetFormat(args *SetFormatArgs) (*SetFormatResponse, error)

SetFormat calls the SetFormat action on the service.

func (*Service) SetTimeNow

func (s *Service) SetTimeNow(args *SetTimeNowArgs) (*SetTimeNowResponse, error)

SetTimeNow calls the SetTimeNow action on the service.

func (*Service) SetTimeServer

func (s *Service) SetTimeServer(args *SetTimeServerArgs) (*SetTimeServerResponse, error)

SetTimeServer calls the SetTimeServer action on the service.

func (*Service) SetTimeZone

func (s *Service) SetTimeZone(args *SetTimeZoneArgs) (*SetTimeZoneResponse, error)

SetTimeZone calls the SetTimeZone action on the service.

func (*Service) UpdateAlarm

func (s *Service) UpdateAlarm(args *UpdateAlarmArgs) (*UpdateAlarmResponse, error)

UpdateAlarm calls the UpdateAlarm action on the service.

type ServiceOption

type ServiceOption func(*Service)

func WithClient

func WithClient(c *http.Client) ServiceOption

func WithLocation

func WithLocation(u *url.URL) ServiceOption

type SetDailyIndexRefreshTimeArgs

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

SetDailyIndexRefreshTime Argument type.

type SetDailyIndexRefreshTimeResponse

type SetDailyIndexRefreshTimeResponse struct {
}

SetDailyIndexRefreshTime Response type.

type SetFormatArgs

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

SetFormat Argument type.

type SetFormatResponse

type SetFormatResponse struct {
}

SetFormat Response type.

type SetTimeNowArgs

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

SetTimeNow Argument type.

type SetTimeNowResponse

type SetTimeNowResponse struct {
}

SetTimeNow Response type.

type SetTimeServerArgs

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

SetTimeServer Argument type.

type SetTimeServerResponse

type SetTimeServerResponse struct {
}

SetTimeServer Response type.

type SetTimeZoneArgs

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

SetTimeZone Argument type.

type SetTimeZoneResponse

type SetTimeZoneResponse struct {
}

SetTimeZone Response type.

type TimeFormat

type TimeFormat string

type TimeGeneration

type TimeGeneration uint32

type TimeServer

type TimeServer string

type TimeZone

type TimeZone string

State Variables

type UpdateAlarmArgs

type UpdateAlarmArgs struct {
	Xmlns              string            `xml:"xmlns:u,attr"`
	ID                 uint32            `xml:"ID"`
	StartLocalTime     string            `xml:"StartLocalTime"`
	Duration           string            `xml:"Duration"`
	Recurrence         RecurrenceEnum    `xml:"Recurrence"`
	Enabled            bool              `xml:"Enabled"`
	RoomUUID           string            `xml:"RoomUUID"`
	ProgramURI         string            `xml:"ProgramURI"`
	ProgramMetaData    string            `xml:"ProgramMetaData"`
	PlayMode           AlarmPlayModeEnum `xml:"PlayMode"`
	Volume             uint16            `xml:"Volume"`
	IncludeLinkedZones bool              `xml:"IncludeLinkedZones"`
}

UpdateAlarm Argument type.

type UpdateAlarmResponse

type UpdateAlarmResponse struct {
}

UpdateAlarm Response type.

type UpnpEvent

type UpnpEvent struct {
	XMLName      xml.Name   `xml:"propertyset"`
	XMLNameSpace string     `xml:"xmlns:e,attr"`
	Properties   []Property `xml:"property"`
}

UpnpEvent represents a UPnP event notification.

Jump to

Keyboard shortcuts

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