Documentation ¶
Overview ¶
Package gupnp provides the low level binding for the C gupnp-av library.
Index ¶
- type Context
- type ContextManager
- type ControlPoint
- type DeviceInfo
- func (v *DeviceInfo) GetFriendlyName() string
- func (v *DeviceInfo) GetIconUrl(requestedMimeType string, requestedDepth, requestedWidth, requestedHeight int, ...) (string, string, int, int, int)
- func (v *DeviceInfo) GetService(typ string) *ServiceInfo
- func (v *DeviceInfo) GetUdn() string
- func (v *DeviceInfo) ListDevices() []*DeviceInfo
- func (v *DeviceInfo) Native() *C.GUPnPDeviceInfo
- type DeviceProxy
- type List
- type SSDPResourceBrowser
- type ServiceInfo
- type ServiceProxy
- func (v *ServiceProxy) AddNotify(variable string, typ glib.Type, callback func(string)) bool
- func (v *ServiceProxy) Native() *C.GUPnPServiceProxy
- func (v *ServiceProxy) SendAction(action string, args ...interface{}) error
- func (v *ServiceProxy) SendActionList(action string, innames, invalues, outnames, outtypes, outvalues *List) error
- func (v *ServiceProxy) SetSubscribed(subscribed bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
ContextManager is a representation of GUPnP's GUPnPContext.
func WrapContext ¶
func (*Context) Native ¶
func (v *Context) Native() *C.GUPnPContext
Native() returns a pointer to the underlying GUPnPContext.
type ContextManager ¶
ContextManager is a representation of GUPnP's GUPnPContextManager.
func ContextManagerCreate ¶
func ContextManagerCreate(port uint) *ContextManager
func ToContextManager ¶
func ToContextManager(cm *C.GUPnPContextManager) *ContextManager
func WrapContextManager ¶
func WrapContextManager(obj *glib.Object) *ContextManager
func (*ContextManager) ManageControlPoint ¶
func (v *ContextManager) ManageControlPoint(cp *ControlPoint)
GetActive() is a wrapper around gtk_combo_box_get_active_iter().
func (*ContextManager) Native ¶
func (v *ContextManager) Native() *C.GUPnPContextManager
Native() returns a pointer to the underlying GUPnPContextManager.
type ControlPoint ¶
type ControlPoint struct {
SSDPResourceBrowser
}
ControlPoint is a representation of GUPnP's GUPnPControlPoint.
func ControlPointNew ¶
func ControlPointNew(context *Context, target string) *ControlPoint
func (*ControlPoint) Native ¶
func (v *ControlPoint) Native() *C.GUPnPControlPoint
Native() returns a pointer to the underlying GUPnPControlPoint.
type DeviceInfo ¶
func WrapDeviceInfo ¶
func WrapDeviceInfo(obj *glib.Object) *DeviceInfo
func (*DeviceInfo) GetFriendlyName ¶
func (v *DeviceInfo) GetFriendlyName() string
func (*DeviceInfo) GetIconUrl ¶
func (*DeviceInfo) GetService ¶
func (v *DeviceInfo) GetService(typ string) *ServiceInfo
func (*DeviceInfo) GetUdn ¶
func (v *DeviceInfo) GetUdn() string
func (*DeviceInfo) ListDevices ¶
func (v *DeviceInfo) ListDevices() []*DeviceInfo
func (*DeviceInfo) Native ¶
func (v *DeviceInfo) Native() *C.GUPnPDeviceInfo
Native() returns a pointer to the underlying GUPnPDeviceProxy.
type DeviceProxy ¶
type DeviceProxy struct {
DeviceInfo
}
DeviceProxy is a representation of GUPnP's GUPnPDeviceProxy.
func WrapDeviceProxy ¶
func WrapDeviceProxy(obj *glib.Object) *DeviceProxy
func (*DeviceProxy) Native ¶
func (v *DeviceProxy) Native() *C.GUPnPDeviceProxy
Native() returns a pointer to the underlying GUPnPDeviceProxy.
type List ¶
func ListFromNative ¶
func (List) Free ¶
func (v List) Free()
//GList* g_list_insert_sorted (GList *list, // gpointer data, // GCompareFunc func);
func (v List) Remove(data unsafe.Pointer) *List { return &List{C.g_list_remove(v.GList, C.gconstpointer(data))} }
func (v List) RemoveLink(link List) *List { return &List{C.g_list_remove_link(v.GList, link.GList)} }
func (v List) DeleteLink(link List) *List { return &List{C.g_list_delete_link(v.GList, link.GList)} }
func (v List) RemoveAll(data unsafe.Pointer) *List { return &List{C.g_list_remove_all(v.GList, C.gconstpointer(data))} }
func (List) Free1 ¶
func (v List) Free1()
func GListAlloc() *List { return &List{C.g_list_alloc()} }
func (List) NthData ¶
//GList* g_list_sort (GList *list, // GCompareFunc compare_func); //gint (*GCompareFunc) (gconstpointer a, // gconstpointer b); //GList* g_list_insert_sorted_with_data (GList *list, // gpointer data, // GCompareDataFunc func, // gpointer user_data); //GList* g_list_sort_with_data (GList *list, // GCompareDataFunc compare_func, // gpointer user_data); //gint (*GCompareDataFunc) (gconstpointer a, // gconstpointer b, // gpointer user_data);
func (v List) Concat(link List) *List { return &List{C.g_list_concat(v.GList, link.GList)} }
func (v List) ForEach(callback func(interface{}, interface{}), user_datas ...interface{}) { var user_data interface{} if len(user_datas) > 0 { user_data = user_datas[0] } l := v.First() for n := uint(0); n < l.Length(); n++ { callback(l.NthData(n), user_data) } }
func (v List) First() *List { return &List{C.g_list_first(v.GList)} }
func (v List) Last() *List { return &List{C.g_list_last(v.GList)} }
func (v List) Nth(n uint) *List { return &List{C.g_list_nth(v.GList, C.guint(n))} }
type SSDPResourceBrowser ¶
SSDPResourceBrowser is a representation of GUPnP's GSSDPResourceBrowser.
func (*SSDPResourceBrowser) Native ¶
func (v *SSDPResourceBrowser) Native() *C.GSSDPResourceBrowser
Native() returns a pointer to the underlying GSSDPResourceBrowser.
func (*SSDPResourceBrowser) Rescan ¶
func (v *SSDPResourceBrowser) Rescan()
func (*SSDPResourceBrowser) SetActive ¶
func (v *SSDPResourceBrowser) SetActive(active bool)
type ServiceInfo ¶
ServiceInfo is a representation of GUPnP's GUPnPServiceInfo.
func WrapServiceInfo ¶
func WrapServiceInfo(obj *glib.Object) *ServiceInfo
type ServiceProxy ¶
type ServiceProxy struct {
ServiceInfo
}
ServiceProxy is a representation of GUPnP's GUPnPServiceProxy.
func (*ServiceProxy) Native ¶
func (v *ServiceProxy) Native() *C.GUPnPServiceProxy
Native() returns a pointer to the underlying GUPnPServiceProxy.
func (*ServiceProxy) SendAction ¶
func (v *ServiceProxy) SendAction(action string, args ...interface{}) error
func (*ServiceProxy) SendActionList ¶
func (v *ServiceProxy) SendActionList(action string, innames, invalues, outnames, outtypes, outvalues *List) error
Note that outvalues will be changed. Default GValues will be freed and new ones seem to get allocated. It's up to you to free everything.
func (*ServiceProxy) SetSubscribed ¶
func (v *ServiceProxy) SetSubscribed(subscribed bool)