| Top |
| InfCertificateCredentials * | credentials | Read / Write |
| InfIo * | io | Read / Write / Construct Only |
| InfKeepalive * | keepalive | Read / Write |
| InfSaslContext * | sasl-context | Read / Write |
| gchar * | sasl-mechanisms | Read / Write |
| InfXmppConnectionSecurityPolicy | security-policy | Read / Write |
| InfXmppManager * | xmpp-manager | Read / Write / Construct Only |
InfDiscoveryAvahi implements the InfDiscovery and InfLocalPublisher interfaces on top of avahi. It resolves services to client-side InfXmppConnections.
This class is only available if the macro
LIBINFINITY_HAVE_AVAHI is defined.
InfDiscoveryAvahi * inf_discovery_avahi_new (InfIo *io,InfXmppManager *manager,InfCertificateCredentials *creds,InfSaslContext *sasl_context,const gchar *sasl_mechanisms);
Created a new InfDiscoveryAvahi object which can be used to publish and
discovery Infinote services on the local network. When resolving a
InfDiscoveryInfo (which means obtaining a InfXmlConnection for the
discovered service) a new InfXmppConnection needs to be created if there
is not already one for the destination host in manager
. Such
connections are created with the creds
and sasl_context
parameters.
These may be NULL in which case InfXmppConnection uses builtin
credentials or a builtin context, respectively.
If this InfDiscoveryAvahi is not used to discover services but only to
publish any, then creds
, sasl_context
and sasl_mechanisms
are ignored
and can safely set to be NULL.
sasl_mechanisms
specifies allowed mechanisms used for authentication with
the server. It can be NULL, in which case all available mechanisms are
accepted.
void inf_discovery_avahi_set_security_policy (InfDiscoveryAvahi *discovery,InfXmppConnectionSecurityPolicy plcy);
Sets the InfXmppConnectionSecurityPolicy for newly created InfXmppConnections. It does not affect already existing connections.
InfXmppConnectionSecurityPolicy
inf_discovery_avahi_get_security_policy
(InfDiscoveryAvahi *discovery);
Returns the current security policy used for new InfXmppConnections.
struct InfDiscoveryAvahi;
InfDiscoveryAvahi is an opaque data type. You should only access it via the public API functions.
“credentials” property“credentials” InfCertificateCredentials *
The GnuTLS certificate credentials used for encrypting XMPP streams.
Flags: Read / Write
“io” property“io” InfIo *
The IO object used for watching sockets and timeouts.
Flags: Read / Write / Construct Only
“keepalive” property “keepalive” InfKeepalive *
The keepalive settings for new connections.
Flags: Read / Write
“sasl-context” property“sasl-context” InfSaslContext *
The SASL context used for authentication.
Flags: Read / Write
“sasl-mechanisms” property“sasl-mechanisms” gchar *
The accepted SASL mechanisms for authentication.
Flags: Read / Write
Default value: NULL
“security-policy” property“security-policy” InfXmppConnectionSecurityPolicy
How to decide whether to use TLS.
Flags: Read / Write
Default value: INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS
“xmpp-manager” property“xmpp-manager” InfXmppManager *
The XMPP manager to register resolved XMPP connections.
Flags: Read / Write / Construct Only