Documentation
¶
Overview ¶
Package contentdirectory is a generated ContentDirectory package.
Index ¶
- Constants
- type BrowseArgs
- type BrowseFlagEnum
- type BrowseResponse
- type Browseable
- type ContainerUpdateIDs
- type CreateObjectArgs
- type CreateObjectResponse
- type DestroyObjectArgs
- type DestroyObjectResponse
- type FavoritePresetsUpdateID
- type FavoritesUpdateID
- type FindPrefixArgs
- type FindPrefixResponse
- type GetAlbumArtistDisplayOptionArgs
- type GetAlbumArtistDisplayOptionResponse
- type GetAllPrefixLocationsArgs
- type GetAllPrefixLocationsResponse
- type GetBrowseableArgs
- type GetBrowseableResponse
- type GetLastIndexChangeArgs
- type GetLastIndexChangeResponse
- type GetSearchCapabilitiesArgs
- type GetSearchCapabilitiesResponse
- type GetShareIndexInProgressArgs
- type GetShareIndexInProgressResponse
- type GetSortCapabilitiesArgs
- type GetSortCapabilitiesResponse
- type GetSystemUpdateIDArgs
- type GetSystemUpdateIDResponse
- type Property
- type RadioFavoritesUpdateID
- type RadioLocationUpdateID
- type RecentlyPlayedUpdateID
- type RefreshShareIndexArgs
- type RefreshShareIndexResponse
- type RequestResortArgs
- type RequestResortResponse
- type SavedQueuesUpdateID
- type Service
- func (s *Service) Browse(args *BrowseArgs) (*BrowseResponse, error)
- func (s *Service) Client() *http.Client
- func (s *Service) ControlEndpoint() *url.URL
- func (s *Service) CreateObject(args *CreateObjectArgs) (*CreateObjectResponse, error)
- func (s *Service) DestroyObject(args *DestroyObjectArgs) (*DestroyObjectResponse, error)
- func (s *Service) EventEndpoint() *url.URL
- func (s *Service) FindPrefix(args *FindPrefixArgs) (*FindPrefixResponse, error)
- func (s *Service) GetAlbumArtistDisplayOption(args *GetAlbumArtistDisplayOptionArgs) (*GetAlbumArtistDisplayOptionResponse, error)
- func (s *Service) GetAllPrefixLocations(args *GetAllPrefixLocationsArgs) (*GetAllPrefixLocationsResponse, error)
- func (s *Service) GetBrowseable(args *GetBrowseableArgs) (*GetBrowseableResponse, error)
- func (s *Service) GetLastIndexChange(args *GetLastIndexChangeArgs) (*GetLastIndexChangeResponse, error)
- func (s *Service) GetSearchCapabilities(args *GetSearchCapabilitiesArgs) (*GetSearchCapabilitiesResponse, error)
- func (s *Service) GetShareIndexInProgress(args *GetShareIndexInProgressArgs) (*GetShareIndexInProgressResponse, error)
- func (s *Service) GetSortCapabilities(args *GetSortCapabilitiesArgs) (*GetSortCapabilitiesResponse, error)
- func (s *Service) GetSystemUpdateID(args *GetSystemUpdateIDArgs) (*GetSystemUpdateIDResponse, error)
- func (s *Service) Location() *url.URL
- func (zp *Service) ParseEvent(body []byte) []interface{}
- func (s *Service) RefreshShareIndex(args *RefreshShareIndexArgs) (*RefreshShareIndexResponse, error)
- func (s *Service) RequestResort(args *RequestResortArgs) (*RequestResortResponse, error)
- func (s *Service) SetBrowseable(args *SetBrowseableArgs) (*SetBrowseableResponse, error)
- func (s *Service) UpdateObject(args *UpdateObjectArgs) (*UpdateObjectResponse, error)
- type ServiceOption
- type SetBrowseableArgs
- type SetBrowseableResponse
- type ShareIndexInProgress
- type ShareIndexLastError
- type ShareListUpdateID
- type SystemUpdateID
- type UpdateObjectArgs
- type UpdateObjectResponse
- type UpnpEvent
- type UserRadioUpdateID
Constants ¶
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 ¶
CreateObject Response type.
type DestroyObjectArgs ¶
type DestroyObjectArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
ObjectID string `xml:"ObjectID"`
}
DestroyObject Argument 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 {
}
GetShareIndexInProgress Argument type.
type GetShareIndexInProgressResponse ¶
type GetShareIndexInProgressResponse struct {
}
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"`
UserRadioUpdateID *UserRadioUpdateID `xml:"UserRadioUpdateID"`
SavedQueuesUpdateID *SavedQueuesUpdateID `xml:"SavedQueuesUpdateID"`
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 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 SavedQueuesUpdateID ¶
type SavedQueuesUpdateID string
type Service ¶
type Service struct {
SystemUpdateID *SystemUpdateID
ContainerUpdateIDs *ContainerUpdateIDs
UserRadioUpdateID *UserRadioUpdateID
SavedQueuesUpdateID *SavedQueuesUpdateID
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) ControlEndpoint ¶
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 ¶
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) ParseEvent ¶
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 ShareIndexInProgress ¶
type ShareIndexInProgress bool
type ShareIndexLastError ¶
type ShareIndexLastError string
type ShareListUpdateID ¶
type ShareListUpdateID string
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 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