![]() |
![]() |
![]() |
GSSDP Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct GSSDPResourceBrowser; #define GSSDP_ALL_RESOURCES GSSDPResourceBrowser * gssdp_resource_browser_new (GSSDPClient *client
,const char *target
); GSSDPClient * gssdp_resource_browser_get_client (GSSDPResourceBrowser *resource_browser
); void gssdp_resource_browser_set_target (GSSDPResourceBrowser *resource_browser
,const char *target
); const char * gssdp_resource_browser_get_target (GSSDPResourceBrowser *resource_browser
); void gssdp_resource_browser_set_mx (GSSDPResourceBrowser *resource_browser
,gushort mx
); gushort gssdp_resource_browser_get_mx (GSSDPResourceBrowser *resource_browser
); void gssdp_resource_browser_set_active (GSSDPResourceBrowser *resource_browser
,gboolean active
); gboolean gssdp_resource_browser_get_active (GSSDPResourceBrowser *resource_browser
); gboolean gssdp_resource_browser_rescan (GSSDPResourceBrowser *resource_browser
);
"active" gboolean : Read / Write "client" GSSDPClient* : Read / Write / Construct Only "mx" guint : Read / Write "target" gchar* : Read / Write
GSSDPResourceBrowser handles resource discovery. After creating a browser and activating it, the ::resource-available and ::resource-unavailable signals will be emitted whenever the availability of a resource matching the specified discovery target changes. A discovery request is sent out automatically when activating the browser.
#define GSSDP_ALL_RESOURCES "ssdp:all"
SSDP search target for finding all possible resources.
GSSDPResourceBrowser * gssdp_resource_browser_new (GSSDPClient *client
,const char *target
);
|
The GSSDPClient to associate with |
Returns : |
A new GSSDPResourceBrowser object. |
GSSDPClient * gssdp_resource_browser_get_client (GSSDPResourceBrowser *resource_browser
);
|
A GSSDPResourceBrowser |
Returns : |
The GSSDPClient resource_browser is associated with. [transfer none]
|
void gssdp_resource_browser_set_target (GSSDPResourceBrowser *resource_browser
,const char *target
);
Sets the browser target of resource_browser
to target
.
|
A GSSDPResourceBrowser |
|
The browser target |
const char * gssdp_resource_browser_get_target (GSSDPResourceBrowser *resource_browser
);
|
A GSSDPResourceBrowser |
Returns : |
The browser target. |
void gssdp_resource_browser_set_mx (GSSDPResourceBrowser *resource_browser
,gushort mx
);
Sets the used MX value of resource_browser
to mx
.
|
A GSSDPResourceBrowser |
|
The to be used MX value |
gushort gssdp_resource_browser_get_mx (GSSDPResourceBrowser *resource_browser
);
|
A GSSDPResourceBrowser |
Returns : |
The used MX value. |
void gssdp_resource_browser_set_active (GSSDPResourceBrowser *resource_browser
,gboolean active
);
(De)activates resource_browser
.
|
A GSSDPResourceBrowser |
|
TRUE to activate resource_browser
|
gboolean gssdp_resource_browser_get_active (GSSDPResourceBrowser *resource_browser
);
|
A GSSDPResourceBrowser |
Returns : |
TRUE if resource_browser is active. |
gboolean gssdp_resource_browser_rescan (GSSDPResourceBrowser *resource_browser
);
Begins discovery if resource_browser
is active and no discovery is
performed. Otherwise does nothing.
|
A GSSDPResourceBrowser |
Returns : |
TRUE if rescaning has been started. |
"active"
property"active" gboolean : Read / Write
Whether this browser is active or not.
Default value: FALSE
"mx"
property"mx" guint : Read / Write
The maximum number of seconds in which to request other parties to respond.
Allowed values: [1,65535]
Default value: 3
"resource-available"
signalvoid user_function (GSSDPResourceBrowser *resource_browser,
gchar *usn,
gpointer locations,
gpointer user_data) : Run Last
The ::resource-available signal is emitted whenever a new resource has become available.
|
The GSSDPResourceBrowser that received the signal |
|
The USN of the discovered resource |
|
A GList of strings describing the locations of the discovered resource. [type GList*][transfer none][element-type utf8] |
|
user data set when the signal handler was connected. |
"resource-unavailable"
signalvoid user_function (GSSDPResourceBrowser *resource_browser,
gchar *usn,
gpointer user_data) : Run Last
The ::resource-unavailable signal is emitted whenever a resource is not available any more.
|
The GSSDPResourceBrowser that received the signal |
|
The USN of the resource |
|
user data set when the signal handler was connected. |