Top | ![]() |
![]() |
![]() |
![]() |
InfCertificateCredentials * | credentials | Read / Write |
InfIo * | io | Read / Write / Construct Only |
InfKeepalive * | keepalive | Read / Write |
InfSaslContext * | sasl-context | Read / Write |
char * | 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.
[constructor]
io |
A InfIo object used for watching sockets and timeouts. |
|
manager |
||
creds |
The certificate credentials used for GnuTLS encryption. |
|
sasl_context |
A SASL context used for authentication. |
|
sasl_mechanisms |
A whitespace-separated list of accepted SASL mechanisms,
or |
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.
void inf_discovery_avahi_set_keepalive (InfDiscoveryAvahi *discovery
,const InfKeepalive *keepalive
);
Sets the keepalive settings for newly created connections. It does not affect already existing connections.
const InfKeepalive *
inf_discovery_avahi_get_keepalive (InfDiscoveryAvahi *discovery
);
Returns the keepalive settings that will be used for new connections.
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.
Owner: InfDiscoveryAvahi
Flags: Read / Write
“io”
property“io” InfIo *
The IO object used for watching sockets and timeouts.
Owner: InfDiscoveryAvahi
Flags: Read / Write / Construct Only
“keepalive”
property“keepalive” InfKeepalive *
The keepalive settings for new connections.
Owner: InfDiscoveryAvahi
Flags: Read / Write
“sasl-context”
property“sasl-context” InfSaslContext *
The SASL context used for authentication.
Owner: InfDiscoveryAvahi
Flags: Read / Write
“sasl-mechanisms”
property “sasl-mechanisms” char *
The accepted SASL mechanisms for authentication.
Owner: InfDiscoveryAvahi
Flags: Read / Write
Default value: NULL
“security-policy”
property“security-policy” InfXmppConnectionSecurityPolicy
How to decide whether to use TLS.
Owner: InfDiscoveryAvahi
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.
Owner: InfDiscoveryAvahi
Flags: Read / Write / Construct Only