Next: , Up: Network Discovery: mDNS and Service Location   [Contents]


B.6.1 STMDNSService: Service Representation

Function: STMDNSService * st_mdns_service_new (const gchar *name, const gchar *type, const gchar *host, const gchar *address, const guint16 port, const gint proto, const gint iface)

Builds a descriptor for a discovered or to-be-published mDNS service. Properties (name, mdns-type, host, address, port, proto, iface) notify on the affinity context like I/O.

name

Service instance name (e.g. ST:MyService).

type

mDNS type (typically "_dbus._tcp").

host

Hostname string, or NULL if unknown.

address

Numeric address string, or NULL if unknown.

port

TCP/UDP port.

proto

Avahi protocol constant (IPv4/IPv6/unspecified).

iface

Network interface index, or Avahi unspecified.

Returns: New STMDNSService (floating / constructor transfer).

Function: void st_mdns_service_set_notify_context (STMDNSService *self, GMainContext *context)

Sets notify affinity for property changes.

self

Service object.

context

Affinity context, or NULL for default.

Returns: Nothing.