![]() |
![]() |
![]() |
libinfinity-0.5 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <libinfinity/common/inf-discovery-avahi.h> InfDiscoveryAvahi; struct InfDiscoveryAvahiClass; InfDiscoveryAvahi * inf_discovery_avahi_new (InfIo *io
,InfXmppManager *manager
,InfCertificateCredentials *creds
,InfSaslContext *sasl_context
,const gchar *sasl_mechanisms
); void inf_discovery_avahi_set_security_policy (InfDiscoveryAvahi *discovery
,InfXmppConnectionSecurityPolicy plcy
); InfXmppConnectionSecurityPolicy inf_discovery_avahi_get_security_policy (InfDiscoveryAvahi *discovery
);
"credentials" InfCertificateCredentials* : Read / Write / Construct "io" InfIo* : Read / Write / Construct Only "sasl-context" InfSaslContext* : Read / Write / Construct "sasl-mechanisms" gchar* : Read / Write / Construct "security-policy" InfXmppConnectionSecurityPolicy : Read / Write "xmpp-manager" InfXmppManager* : 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.
typedef struct _InfDiscoveryAvahi InfDiscoveryAvahi;
InfDiscoveryAvahi is an opaque data type. You should only access it via the public API functions.
struct InfDiscoveryAvahiClass { };
This structure does not contain any public fields.
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.
|
A InfIo object used for watching sockets and timeouts. |
|
A InfXmppManager. |
|
The certificate credentials used for GnuTLS encryption. |
|
A SASL context used for authentication. |
|
A whitespace-separated list of accepted SASL mechanisms,
or NULL . |
Returns : |
A new InfDiscoveryAvahi. |
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.
|
A InfDiscoveryAvahi. |
|
The new security policy. |
InfXmppConnectionSecurityPolicy inf_discovery_avahi_get_security_policy
(InfDiscoveryAvahi *discovery
);
Returns the current security policy used for new InfXmppConnections.
|
A InfDiscoveryAvahi. |
Returns : |
The current security policy. |
"credentials"
property"credentials" InfCertificateCredentials* : Read / Write / Construct
The GnuTLS certificate credentials used for encrypting XMPP streams.
"io"
property"io" InfIo* : Read / Write / Construct Only
The IO object used for watching sockets and timeouts.
"sasl-context"
property"sasl-context" InfSaslContext* : Read / Write / Construct
The SASL context used for authentication.
"sasl-mechanisms"
property"sasl-mechanisms" gchar* : Read / Write / Construct
The accepted SASL mechanisms for authentication.
Default value: NULL
"security-policy"
property"security-policy" InfXmppConnectionSecurityPolicy : Read / Write
How to decide whether to use TLS.
Default value: INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS
"xmpp-manager"
property"xmpp-manager" InfXmppManager* : Read / Write / Construct Only
The XMPP manager to register resolved XMPP connections.