contentdirectory

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 contentdirectory is a generated ContentDirectory package.

Index

Constants

View Source
const (
	ServiceURN     = "urn:schemas-upnp-org:service:ContentDirectory: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 BrowseArgs

type BrowseArgs struct {
	Xmlns          string         `xml:"xmlns:u,attr"`
	ObjectID       string         `xml:"ObjectID"`
	BrowseFlag     BrowseFlagEnum `xml:"BrowseFlag"`
	Filter         string         `xml:"Filter"`
	StartingIndex  uint32         `xml:"StartingIndex"`
	RequestedCount uint32         `xml:"RequestedCount"`
	SortCriteria   string         `xml:"SortCriteria"`
}

Browse Argument type.

type BrowseFlagEnum

type BrowseFlagEnum string

Enumerations

const (
	BrowseFlag_BrowseMetadata       BrowseFlagEnum = "BrowseMetadata"
	BrowseFlag_BrowseDirectChildren BrowseFlagEnum = "BrowseDirectChildren"
)

type BrowseResponse

type BrowseResponse struct {
	Result         string `xml:"Result"`
	NumberReturned uint32 `xml:"NumberReturned"`
	TotalMatches   uint32 `xml:"TotalMatches"`
	UpdateID       uint32 `xml:"UpdateID"`
}

Browse Response type.

type Browseable

type Browseable bool

type ContainerUpdateIDs

type ContainerUpdateIDs string

type CreateObjectArgs

type CreateObjectArgs struct {
	Xmlns       string `xml:"xmlns:u,attr"`
	ContainerID string `xml:"ContainerID"`
	Elements    string `xml:"Elements"`
}

CreateObject Argument type.

type CreateObjectResponse

type CreateObjectResponse struct {
	ObjectID string `xml:"ObjectID"`
	Result   string `xml:"Result"`
}

CreateObject Response type.

type DestroyObjectArgs

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

DestroyObject Argument type.

type DestroyObjectResponse

type DestroyObjectResponse struct {
}

DestroyObject Response type.

type FavoritePresetsUpdateID

type FavoritePresetsUpdateID string

type FavoritesUpdateID

type FavoritesUpdateID string

type FindPrefixArgs

type FindPrefixArgs struct {
	Xmlns    string `xml:"xmlns:u,attr"`
	ObjectID string `xml:"ObjectID"`
	Prefix   string `xml:"Prefix"`
}

FindPrefix Argument type.

type FindPrefixResponse

type FindPrefixResponse struct {
	StartingIndex uint32 `xml:"StartingIndex"`
	UpdateID      uint32 `xml:"UpdateID"`
}

FindPrefix Response type.

type GetAlbumArtistDisplayOptionArgs

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

GetAlbumArtistDisplayOption Argument type.

type GetAlbumArtistDisplayOptionResponse

type GetAlbumArtistDisplayOptionResponse struct {
	AlbumArtistDisplayOption string `xml:"AlbumArtistDisplayOption"`
}

GetAlbumArtistDisplayOption Response type.

type GetAllPrefixLocationsArgs

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

GetAllPrefixLocations Argument type.

type GetAllPrefixLocationsResponse

type GetAllPrefixLocationsResponse struct {
	TotalPrefixes     uint32 `xml:"TotalPrefixes"`
	PrefixAndIndexCSV string `xml:"PrefixAndIndexCSV"`
	UpdateID          uint32 `xml:"UpdateID"`
}

GetAllPrefixLocations Response type.

type GetBrowseableArgs

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

GetBrowseable Argument type.

type GetBrowseableResponse

type GetBrowseableResponse struct {
	IsBrowseable bool `xml:"IsBrowseable"`
}

GetBrowseable Response type.

type GetLastIndexChangeArgs

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

GetLastIndexChange Argument type.

type GetLastIndexChangeResponse

type GetLastIndexChangeResponse struct {
	LastIndexChange string `xml:"LastIndexChange"`
}

GetLastIndexChange Response type.

type GetSearchCapabilitiesArgs

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

GetSearchCapabilities Argument type.

type GetSearchCapabilitiesResponse

type GetSearchCapabilitiesResponse struct {
	SearchCaps string `xml:"SearchCaps"`
}

GetSearchCapabilities Response type.

type GetShareIndexInProgressArgs

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

GetShareIndexInProgress Argument type.

type GetShareIndexInProgressResponse

type GetShareIndexInProgressResponse struct {
	IsIndexing bool `xml:"IsIndexing"`
}

GetShareIndexInProgress Response type.

type GetSortCapabilitiesArgs

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

GetSortCapabilities Argument type.

type GetSortCapabilitiesResponse

type GetSortCapabilitiesResponse struct {
	SortCaps string `xml:"SortCaps"`
}

GetSortCapabilities Response type.

type GetSystemUpdateIDArgs

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

GetSystemUpdateID Argument type.

type GetSystemUpdateIDResponse

type GetSystemUpdateIDResponse struct {
	Id uint32 `xml:"Id"`
}

GetSystemUpdateID Response type.

type Property

type Property struct {
	XMLName                 xml.Name                 `xml:"property"`
	SystemUpdateID          *SystemUpdateID          `xml:"SystemUpdateID"`
	ContainerUpdateIDs      *ContainerUpdateIDs      `xml:"ContainerUpdateIDs"`
	ShareIndexInProgress    *ShareIndexInProgress    `xml:"ShareIndexInProgress"`
	ShareIndexLastError     *ShareIndexLastError     `xml:"ShareIndexLastError"`
	UserRadioUpdateID       *UserRadioUpdateID       `xml:"UserRadioUpdateID"`
	SavedQueuesUpdateID     *SavedQueuesUpdateID     `xml:"SavedQueuesUpdateID"`
	ShareListUpdateID       *ShareListUpdateID       `xml:"ShareListUpdateID"`
	RecentlyPlayedUpdateID  *RecentlyPlayedUpdateID  `xml:"RecentlyPlayedUpdateID"`
	Browseable              *Browseable              `xml:"Browseable"`
	RadioFavoritesUpdateID  *RadioFavoritesUpdateID  `xml:"RadioFavoritesUpdateID"`
	RadioLocationUpdateID   *RadioLocationUpdateID   `xml:"RadioLocationUpdateID"`
	FavoritesUpdateID       *FavoritesUpdateID       `xml:"FavoritesUpdateID"`
	FavoritePresetsUpdateID *FavoritePresetsUpdateID `xml:"FavoritePresetsUpdateID"`
}

Property represents a single property in a UPnP event notification.

type RadioFavoritesUpdateID

type RadioFavoritesUpdateID uint32

type RadioLocationUpdateID

type RadioLocationUpdateID uint32

type RecentlyPlayedUpdateID

type RecentlyPlayedUpdateID string

type RefreshShareIndexArgs

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

RefreshShareIndex Argument type.

type RefreshShareIndexResponse

type RefreshShareIndexResponse struct {
}

RefreshShareIndex Response type.

type RequestResortArgs

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

RequestResort Argument type.

type RequestResortResponse

type RequestResortResponse struct {
}

RequestResort Response type.

type SavedQueuesUpdateID

type SavedQueuesUpdateID string

type Service

type Service struct {
	SystemUpdateID          *SystemUpdateID
	ContainerUpdateIDs      *ContainerUpdateIDs
	ShareIndexInProgress    *ShareIndexInProgress
	ShareIndexLastError     *ShareIndexLastError
	UserRadioUpdateID       *UserRadioUpdateID
	SavedQueuesUpdateID     *SavedQueuesUpdateID
	ShareListUpdateID       *ShareListUpdateID
	RecentlyPlayedUpdateID  *RecentlyPlayedUpdateID
	Browseable              *Browseable
	RadioFavoritesUpdateID  *RadioFavoritesUpdateID
	RadioLocationUpdateID   *RadioLocationUpdateID
	FavoritesUpdateID       *FavoritesUpdateID
	FavoritePresetsUpdateID *FavoritePresetsUpdateID
	// contains filtered or unexported fields
}

Service represents ContentDirectory service.

func NewService

func NewService(opts ...ServiceOption) *Service

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

func (*Service) Browse

func (s *Service) Browse(args *BrowseArgs) (*BrowseResponse, error)

Browse calls the Browse action on the service.

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) CreateObject

func (s *Service) CreateObject(args *CreateObjectArgs) (*CreateObjectResponse, error)

CreateObject calls the CreateObject action on the service.

func (*Service) DestroyObject

func (s *Service) DestroyObject(args *DestroyObjectArgs) (*DestroyObjectResponse, error)

DestroyObject calls the DestroyObject 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) FindPrefix

func (s *Service) FindPrefix(args *FindPrefixArgs) (*FindPrefixResponse, error)

FindPrefix calls the FindPrefix action on the service.

func (*Service) GetAlbumArtistDisplayOption

func (s *Service) GetAlbumArtistDisplayOption(args *GetAlbumArtistDisplayOptionArgs) (*GetAlbumArtistDisplayOptionResponse, error)

GetAlbumArtistDisplayOption calls the GetAlbumArtistDisplayOption action on the service.

func (*Service) GetAllPrefixLocations

func (s *Service) GetAllPrefixLocations(args *GetAllPrefixLocationsArgs) (*GetAllPrefixLocationsResponse, error)

GetAllPrefixLocations calls the GetAllPrefixLocations action on the service.

func (*Service) GetBrowseable

func (s *Service) GetBrowseable(args *GetBrowseableArgs) (*GetBrowseableResponse, error)

GetBrowseable calls the GetBrowseable action on the service.

func (*Service) GetLastIndexChange

func (s *Service) GetLastIndexChange(args *GetLastIndexChangeArgs) (*GetLastIndexChangeResponse, error)

GetLastIndexChange calls the GetLastIndexChange action on the service.

func (*Service) GetSearchCapabilities

func (s *Service) GetSearchCapabilities(args *GetSearchCapabilitiesArgs) (*GetSearchCapabilitiesResponse, error)

GetSearchCapabilities calls the GetSearchCapabilities action on the service.

func (*Service) GetShareIndexInProgress

func (s *Service) GetShareIndexInProgress(args *GetShareIndexInProgressArgs) (*GetShareIndexInProgressResponse, error)

GetShareIndexInProgress calls the GetShareIndexInProgress action on the service.

func (*Service) GetSortCapabilities

func (s *Service) GetSortCapabilities(args *GetSortCapabilitiesArgs) (*GetSortCapabilitiesResponse, error)

GetSortCapabilities calls the GetSortCapabilities action on the service.

func (*Service) GetSystemUpdateID

func (s *Service) GetSystemUpdateID(args *GetSystemUpdateIDArgs) (*GetSystemUpdateIDResponse, error)

GetSystemUpdateID calls the GetSystemUpdateID 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) RefreshShareIndex

func (s *Service) RefreshShareIndex(args *RefreshShareIndexArgs) (*RefreshShareIndexResponse, error)

RefreshShareIndex calls the RefreshShareIndex action on the service.

func (*Service) RequestResort

func (s *Service) RequestResort(args *RequestResortArgs) (*RequestResortResponse, error)

RequestResort calls the RequestResort action on the service.

func (*Service) SetBrowseable

func (s *Service) SetBrowseable(args *SetBrowseableArgs) (*SetBrowseableResponse, error)

SetBrowseable calls the SetBrowseable action on the service.

func (*Service) UpdateObject

func (s *Service) UpdateObject(args *UpdateObjectArgs) (*UpdateObjectResponse, error)

UpdateObject calls the UpdateObject 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 SetBrowseableArgs

type SetBrowseableArgs struct {
	Xmlns      string `xml:"xmlns:u,attr"`
	Browseable bool   `xml:"Browseable"`
}

SetBrowseable Argument type.

type SetBrowseableResponse

type SetBrowseableResponse struct {
}

SetBrowseable Response type.

type ShareIndexInProgress

type ShareIndexInProgress bool

type ShareIndexLastError

type ShareIndexLastError string

type ShareListUpdateID

type ShareListUpdateID string

type SystemUpdateID

type SystemUpdateID uint32

State Variables

type UpdateObjectArgs

type UpdateObjectArgs struct {
	Xmlns           string `xml:"xmlns:u,attr"`
	ObjectID        string `xml:"ObjectID"`
	CurrentTagValue string `xml:"CurrentTagValue"`
	NewTagValue     string `xml:"NewTagValue"`
}

UpdateObject Argument type.

type UpdateObjectResponse

type UpdateObjectResponse struct {
}

UpdateObject 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.

type UserRadioUpdateID

type UserRadioUpdateID string

Jump to

Keyboard shortcuts

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