Yamaha MusicCast™ v0.2.0 MusicCast.UPnP.Service
A module for working with UPnP compliant services.
- It can automatically generate UPnP compliant clients from XML specifications.
- It provides pub/sub cababilities to subscribe and forward UPnP event notifcations.
Example
defmodule AVTransport do
use MusicCast.UPnP.Service, type: "AVTransport:1"
end
By default, the service will be generated from the priv/<av_transport_1.xml>
file of the current application
but it can be configured to be any subdirectory of priv by specifying the :priv
option.
Summary
Functions
Calls an action on a UPnP service
Returns a map representing the UPnP service
Returns a service struct from the given XML service notification event
Subscribes to a UPnP service
Unsubscribes from a UPnP service
Types
t()
t() :: %MusicCast.UPnP.Service{device: %{device_type: String.t, device_type: String.t, friendly_name: String.t, manufacturer: String.t, manufacturer_url: String.t, model_description: String.t, model_name: String.t, model_number: String.t, model_url: String.t, udn: String.t, presentation_url: String.t, icon_list: %{width: Integer.t, height: Integer.t, depth: Integer.t, mime_type: String.t, url: String.t}, service_list: %{service_type: String.t, service_id: String.t, scpd_url: String.t, control_url: String.t, event_sub_url: String.t}}, url: String.t, version: %{major: Integer.t, minor: Integer.t}}
Functions
Returns a map representing the UPnP service.
Returns a service struct from the given XML service notification event.
subscribe(event_url, callback_url_or_session_id, timeout \\ 300)
subscribe(String.t, String.t, Integer.t) :: {:ok, subscription} | {:error, term}
Subscribes to a UPnP service.