Infinity.Discovery¶
| Implementations: | |
|---|---|
| Infinity.DiscoveryAvahi | |
Methods¶
| discover(type) | |
| discovered(info) | |
| get_discovered(type) | |
| info_get_service_name(info) | |
| info_get_service_type(info) | |
| resolve(info, complete_func, *user_data) | |
| undiscovered(info) | 
Virtual Methods¶
| do_discover(type) | |
| do_discovered(info) | |
| do_get_discovered(type) | |
| do_info_get_service_name(info) | |
| do_info_get_service_type(info) | |
| do_resolve(info, complete_func, *user_data) | |
| do_undiscovered(info) | 
Properties¶
None
Signals¶
| Name | Short Description | 
|---|---|
| discovered | This signal is detailed. | 
| undiscovered | This signal is emitted if a previously discovered service is no longer available. | 
Fields¶
None
Class Details¶
- 
class Infinity.Discovery¶
- Bases: - GObject.GInterface- Structure: - Infinity.DiscoveryInterface- Infinity.Discoveryis 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.Discoverymight restrict the service types that can be discovered.
 - 
discovered(info)¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – The discovered- Infinity.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: - [ - Infinity.DiscoveryInfo]- Returns a list of discovered - Infinity.DiscoveryInfofor the given type.
 - 
info_get_service_name(info)¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – A- Infinity.DiscoveryInfodiscovered by self.- Returns: - A newly allocated string. Free with - GLib.free().- Return type: - str- Returns the service name of the discovered info. 
 - 
info_get_service_type(info)¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – A- Infinity.DiscoveryInfodiscovered by self.- Returns: - A string owned by self. - Return type: - str- Returns the service type of the discovered info. 
 - 
resolve(info, complete_func, *user_data)¶
- Parameters: - info (Infinity.DiscoveryInfo) – AInfinity.DiscoveryInfodiscovered by self.
- complete_func (Infinity.DiscoveryResolvCompleteFunc) – A callback that will be called when the resolving process has completed.
- user_data (objectorNone) – Extra data to pass to complete_func and error_func.
 - Attempts to resolve info. Resolving a - Infinity.DiscoveryInfomeans creating a- Infinity.XmlConnectionto the publisher. The connection might not be open when complete_func runs.
- info (
 - 
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.Discoverymight restrict the service types that can be discovered.
 - 
do_discovered(info) virtual¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – The discovered- Infinity.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: - [ - Infinity.DiscoveryInfo]- Returns a list of discovered - Infinity.DiscoveryInfofor the given type.
 - 
do_info_get_service_name(info) virtual¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – A- Infinity.DiscoveryInfodiscovered by discovery.- Returns: - A newly allocated string. Free with - GLib.free().- Return type: - str- Returns the service name of the discovered info. 
 - 
do_info_get_service_type(info) virtual¶
- Parameters: - info ( - Infinity.DiscoveryInfo) – A- Infinity.DiscoveryInfodiscovered by discovery.- Returns: - A string owned by discovery. - Return type: - str- Returns the service type of the discovered info. 
 - 
do_resolve(info, complete_func, *user_data) virtual¶
- Parameters: - info (Infinity.DiscoveryInfo) – AInfinity.DiscoveryInfodiscovered by discovery.
- complete_func (Infinity.DiscoveryResolvCompleteFunc) – A callback that will be called when the resolving process has completed.
- user_data (objectorNone) – Extra data to pass to complete_func and error_func.
 - Attempts to resolve info. Resolving a - Infinity.DiscoveryInfomeans creating a- Infinity.XmlConnectionto the publisher. The connection might not be open when complete_func runs.
- info (
 - 
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 signal
- info (objectorNone) – TheInfinity.DiscoveryInfodescribing 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. 
- discovery (
- 
Infinity.Discovery.signals.undiscovered(discovery, info)¶
- Signal Name: - undiscovered- Flags: - Parameters: - discovery (Infinity.Discovery) – The object which received the signal
- info (objectorNone) – TheInfinity.DiscoveryInfodescribing 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. 
- discovery (