Top | ![]() |
![]() |
![]() |
![]() |
GSSDPClient * | gssdp_client_new () |
GSSDPClient * | gssdp_client_new_with_port () |
void | gssdp_client_set_server_id () |
const char * | gssdp_client_get_server_id () |
const char * | gssdp_client_get_interface () |
const char * | gssdp_client_get_host_ip () |
void | gssdp_client_set_network () |
const char * | gssdp_client_get_network () |
gboolean | gssdp_client_get_active () |
GInetAddress * | gssdp_client_get_address () |
GSocketFamily | gssdp_client_get_family () |
guint | gssdp_client_get_index () |
GSSDPUDAVersion | gssdp_client_get_uda_version () |
void | gssdp_client_set_boot_id () |
void | gssdp_client_set_config_id () |
void | gssdp_client_append_header () |
void | gssdp_client_clear_headers () |
void | gssdp_client_remove_header () |
void | gssdp_client_add_cache_entry () |
const char * | gssdp_client_guess_user_agent () |
gboolean | active | Read / Write |
GSocketFamily | address-family | Read / Write / Construct Only |
gint | boot-id | Read / Write / Construct |
gint | config-id | Read / Write / Construct |
gchar * | host-ip | Read / Write / Construct |
GInetAddressMask * | host-mask | Write / Construct |
gchar * | interface | Read / Write / Construct Only |
guint | msearch-port | Read / Write / Construct Only |
gchar * | network | Read / Write / Construct |
gchar * | server-id | Read / Write |
guint | socket-ttl | Read / Write / Construct Only |
GSSDPUDAVersion | uda-version | Read / Write / Construct Only |
GSSDPClient wraps the SSDP "bus" as used by both GSSDPResourceBrowser and GSSDPResourceGroup.
GSSDPClient * gssdp_client_new (const char *iface
,GError **error
);
GSSDPClient * gssdp_client_new_with_port (const char *iface
,guint16 msearch_port
,GError **error
);
void gssdp_client_set_server_id (GSSDPClient *client
,const char *server_id
);
Sets the server ID of client
to server_id
.
const char *
gssdp_client_get_interface (GSSDPClient *client
);
Get the name of the network interface associated to client
.
const char *
gssdp_client_get_host_ip (GSSDPClient *client
);
Get the IP address we advertise ourselves as using.
void gssdp_client_set_network (GSSDPClient *client
,const char *network
);
Sets the network identification of client
to network
.
const char *
gssdp_client_get_network (GSSDPClient *client
);
Get the network this client is associated with.
void gssdp_client_set_boot_id (GSSDPClient *client
,gint32 boot_id
);
Will set the new boot-id for this SSDP client. Does nothing if the UDA version used by the client is UDA 1.0
The boot-id is used to signalize changes in the network configuration for multi-homed hosts
void gssdp_client_set_config_id (GSSDPClient *client
,gint32 config_id
);
The config-id is used to allow caching of the device or service description. It should be changed if that changes.
void gssdp_client_append_header (GSSDPClient *client
,const char *name
,const char *value
);
Adds a header field to the message sent by this client
. It is intended to
be used by clients requiring vendor specific header fields. (If there is an
existing header with name name , then this creates a second one).
void
gssdp_client_clear_headers (GSSDPClient *client
);
Removes all the headers for this client
.
void gssdp_client_remove_header (GSSDPClient *client
,const char *name
);
Removes name
from the list of headers . If there are multiple values for
name
, they are all removed.
void gssdp_client_add_cache_entry (GSSDPClient *client
,const char *ip_address
,const char *user_agent
);
const char * gssdp_client_guess_user_agent (GSSDPClient *client
,const char *ip_address
);
“active”
property “active” gboolean
Whether this client is active or not (passive). When active (default), the client sends messages on the network, otherwise not. In most cases, you don't want to touch this property.
Flags: Read / Write
Default value: TRUE
“address-family”
property “address-family” GSocketFamily
The IP protocol address family this client works on. When specified during construction without giving a concrete address, it will be used to determine the proper address.
If not specified, will contain the currrent address family after
the call to g_initable_init()
. Use G_SOCKET_FAMILY_INVALID
to specifiy using the default socket family (legacy IP)
Flags: Read / Write / Construct Only
Default value: G_SOCKET_FAMILY_INVALID
Since: 1.1.1
“boot-id”
property “boot-id” gint
The value of the BOOTID.UPNP.ORG header
Since 1.1.2
Flags: Read / Write / Construct
Allowed values: >= -1
Default value: -1
“config-id”
property “config-id” gint
The value of the BOOTID.UPNP.ORG header
Since 1.1.2
Flags: Read / Write / Construct
Allowed values: >= -1
Default value: -1
“host-ip”
property “host-ip” gchar *
The IP address of the assoicated network interface.
Flags: Read / Write / Construct
Default value: NULL
“host-mask”
property “host-mask” GInetAddressMask *
The network mask of the assoicated network interface.
Flags: Write / Construct
“interface”
property “interface” gchar *
The name of the network interface this client is associated with. Set to NULL to autodetect.
Flags: Read / Write / Construct Only
Default value: NULL
“msearch-port”
property “msearch-port” guint
UDP port to use for sending multicast M-SEARCH requests on the network. If not set (or set to 0) a random port will be used. This property can be only set during object construction.
Flags: Read / Write / Construct Only
Allowed values: <= 65535
Default value: 0
“network”
property “network” gchar *
The network this client is currently connected to. You could set this to anything you want to identify the network this client is associated with. If you are using GUPnPContextManager and associated interface is a WiFi interface, this property is set to the ESSID of the network. Otherwise, expect this to be the network IP address by default.
Flags: Read / Write / Construct
Default value: NULL
“server-id”
property “server-id” gchar *
The SSDP server's identifier.
Flags: Read / Write
Default value: NULL
“socket-ttl”
property “socket-ttl” guint
Time-to-live value to use for all sockets created by this client. If not set (or set to 0) the value recommended by UPnP will be used. This property can only be set during object construction.
Flags: Read / Write / Construct Only
Allowed values: <= 255
Default value: 0
“uda-version”
property“uda-version” GSSDPUDAVersion
The UPnP version the client adheres to.
Flags: Read / Write / Construct Only
Default value: GSSDP_UDA_VERSION_1_0
Since: 1.1.1
“message-received”
signalvoid user_function (GSSDPClient *client, gchar *from_ip, guint from_port, gint type, SoupMessageHeaders *headers, gpointer user_data)
Internal signal.
[skip]
client |
The GSSDPClient that received the message. |
|
from_ip |
The IP address of the source. |
|
from_port |
The UDP port used by the sender. |
|
type |
The _GSSDPMessageType. |
|
headers |
Parsed SoupMessageHeaders from the message. |
[type SoupMessageHeaders] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Stability Level: Private