gupnp

package
v0.0.0-...-366e4d7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2016 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package gupnp provides the low level binding for the C gupnp-av library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	*glib.Object
}

ContextManager is a representation of GUPnP's GUPnPContext.

func WrapContext

func WrapContext(obj *glib.Object) *Context

func (*Context) Native

func (v *Context) Native() *C.GUPnPContext

Native() returns a pointer to the underlying GUPnPContext.

type ContextManager

type ContextManager struct {
	*glib.Object
}

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

type DeviceInfo struct {
	*glib.Object
}

func WrapDeviceInfo

func WrapDeviceInfo(obj *glib.Object) *DeviceInfo

func (*DeviceInfo) GetFriendlyName

func (v *DeviceInfo) GetFriendlyName() string

func (*DeviceInfo) GetIconUrl

func (v *DeviceInfo) GetIconUrl(requestedMimeType string, requestedDepth, requestedWidth, requestedHeight int, preferBigger bool) (string, string, int, int, int)

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

type List struct {
	GList *C.GList
}

func ListFromNative

func ListFromNative(l unsafe.Pointer) *List

func (List) Append

func (v List) Append(data unsafe.Pointer) *List
func (v List) Data() interface{} {
    return v.GList.data
}

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

func (v List) Length() uint

func (List) NthData

func (v List) NthData(n uint) interface{}

//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

type SSDPResourceBrowser struct {
	*glib.Object
}

SSDPResourceBrowser is a representation of GUPnP's GSSDPResourceBrowser.

func (*SSDPResourceBrowser) Native

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

type ServiceInfo struct {
	*glib.Object
}

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

func (v *ServiceProxy) AddNotify(variable string, typ glib.Type, callback func(string)) bool

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)

Jump to

Keyboard shortcuts

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