Infinity.Discovery¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
This signal is detailed. |
|
This signal is emitted if a previously discovered service is no longer available. |
Fields¶
None
Class Details¶
- class Infinity.Discovery¶
- Bases:
- Structure:
Infinity.Discovery
is an opaque data type. You should only access it via the public API functions.- discover(type)¶
- Parameters:
type (
str
) – The service type to discover.
Starts the discovery of the given service type. Whenever a service of this type is discovered, the “discovered” signal is emitted. If the service disappears, the “undiscovered” signal is emitted. This can be called more than once for the same type, but only the first call has an effect.
Note also that implementations of
Infinity.Discovery
might restrict the service types that can be discovered.
- discovered(info)¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – The discoveredInfinity.DiscoveryInfo
.
Emits the “discovered” signal on self.
- get_discovered(type)¶
- Parameters:
type (
str
) – The service type of which to get discovered infos for.- Returns:
A newly allocated list that needs to be freed with g_slist_free().
- Return type:
Returns a list of discovered
Infinity.DiscoveryInfo
for the given type.
- info_get_service_name(info)¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by self.- Returns:
A newly allocated string. Free with
GLib.free
().- Return type:
Returns the service name of the discovered info.
- info_get_service_type(info)¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by self.- Returns:
A string owned by self.
- Return type:
Returns the service type of the discovered info.
- resolve(info, complete_func, *user_data)¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by self.complete_func (
Infinity.DiscoveryResolvCompleteFunc
) – A callback that will be called when the resolving process has completed.user_data (
object
orNone
) – Extra data to pass to complete_func and error_func.
Attempts to resolve info. Resolving a
Infinity.DiscoveryInfo
means creating aInfinity.XmlConnection
to the publisher. The connection might not be open when complete_func runs.
- undiscovered(info)¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – The undiscovered InfDiscoveryInfo.
Emits the “undiscovered” signal on self.
- do_discover(type) virtual¶
- Parameters:
type (
str
) – The service type to discover.
Starts the discovery of the given service type. Whenever a service of this type is discovered, the “discovered” signal is emitted. If the service disappears, the “undiscovered” signal is emitted. This can be called more than once for the same type, but only the first call has an effect.
Note also that implementations of
Infinity.Discovery
might restrict the service types that can be discovered.
- do_discovered(info) virtual¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – The discoveredInfinity.DiscoveryInfo
.
Emits the “discovered” signal on discovery.
- do_get_discovered(type) virtual¶
- Parameters:
type (
str
) – The service type of which to get discovered infos for.- Returns:
A newly allocated list that needs to be freed with g_slist_free().
- Return type:
Returns a list of discovered
Infinity.DiscoveryInfo
for the given type.
- do_info_get_service_name(info) virtual¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by discovery.- Returns:
A newly allocated string. Free with
GLib.free
().- Return type:
Returns the service name of the discovered info.
- do_info_get_service_type(info) virtual¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by discovery.- Returns:
A string owned by discovery.
- Return type:
Returns the service type of the discovered info.
- do_resolve(info, complete_func, *user_data) virtual¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – AInfinity.DiscoveryInfo
discovered by discovery.complete_func (
Infinity.DiscoveryResolvCompleteFunc
) – A callback that will be called when the resolving process has completed.user_data (
object
orNone
) – Extra data to pass to complete_func and error_func.
Attempts to resolve info. Resolving a
Infinity.DiscoveryInfo
means creating aInfinity.XmlConnection
to the publisher. The connection might not be open when complete_func runs.
- do_undiscovered(info) virtual¶
- Parameters:
info (
Infinity.DiscoveryInfo
) – The undiscovered InfDiscoveryInfo.
Emits the “undiscovered” signal on discovery.
Signal Details¶
- Infinity.Discovery.signals.discovered(discovery, info)¶
- Signal Name:
discovered
- Flags:
- Parameters:
discovery (
Infinity.Discovery
) – The object which received the signalinfo (
object
orNone
) – TheInfinity.DiscoveryInfo
describing the discovered service
This signal is detailed. The detail is the name of the service that has been discovered, so you can connect to “discovered::my-service-name” if you are only interested in a particular service.
- Infinity.Discovery.signals.undiscovered(discovery, info)¶
- Signal Name:
undiscovered
- Flags:
- Parameters:
discovery (
Infinity.Discovery
) – The object which received the signalinfo (
object
orNone
) – TheInfinity.DiscoveryInfo
describing the undiscovered service
This signal is emitted if a previously discovered service is no longer available.
This signal is detailed. The detail is the name of the service that has been undiscovered, so you can connect to “undiscovered::my-service-name” if you are only interested in a particular service.