![]() |
![]() |
![]() |
libinfinity-0.3 Reference Manual | ![]() |
---|---|---|---|---|
InfdXmppServer; InfdXmppServerClass; InfdXmppServer* infd_xmpp_server_new (InfdTcpServer *tcp, InfXmppConnectionSecurityPolicy policy, gnutls_certificate_credentials_t cred, Gsasl *sasl_context, const gchar *sasl_mechanisms); void infd_xmpp_server_set_security_policy (InfdXmppServer *server, InfXmppConnectionSecurityPolicy policy); InfXmppConnectionSecurityPolicy infd_xmpp_server_get_security_policy (InfdXmppServer *server);
"credentials" gpointer : Read / Write / Construct Only "local-hostname" gchar* : Read / Write / Construct Only "sasl-context" gpointer : Read / Write / Construct Only "sasl-mechanisms" gchar* : Read / Write / Construct Only "security-policy" InfXmppConnectionSecurityPolicy : Read / Write / Construct "tcp-server" InfdTcpServer* : Read / Write / Construct Only
typedef struct { GObjectClass parent_class; /* Signals */ void (*error)(InfdXmppServer* server, GError* error); } InfdXmppServerClass;
InfdXmppServer* infd_xmpp_server_new (InfdTcpServer *tcp, InfXmppConnectionSecurityPolicy policy, gnutls_certificate_credentials_t cred, Gsasl *sasl_context, const gchar *sasl_mechanisms);
Creates a new InfdXmppServer with tcp
as underlaying TCP server object.
No attempt is being made to open tcp
, if it is not already open. When a
new connection comes in, the XMPP server creates a XMPP connection that
may be used to communicate with the client. Note however that the
resulting connection will be in status OPENING until authentication has
completed.
If policy
is INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED
, then cred
may
be NULL
. If cred
is non-NULL
nevertheless, then it is possible to change
the security policy later using infd_xmpp_server_set_security_policy()
.
If sasl_context
is NULL
, the server uses a built-in context that only
supports ANONYMOUS authentication. If sasl_context
is not NULL
, then
sasl_mechanisms
specifies the mechanisms offered to clients. If
sasl_mechanisms
is NULL
, then all available mechanims will be offered.
If sasl_context
is NULL
, then this parameter is ignored.
|
A InfdTcpServer. |
|
The initial security policy. |
|
Certificate credentials used to secure any communication. |
|
A SASL context used for authentication. |
|
A whitespace-sparated list of SASL mechanisms. |
Returns : |
A new InfdXmppServer. |
void infd_xmpp_server_set_security_policy (InfdXmppServer *server, InfXmppConnectionSecurityPolicy policy);
Sets the security policy for newly accepted InfXmppConnections. Does not already established connections.
|
A InfdXmppServer. |
|
The new security policy. |
InfXmppConnectionSecurityPolicy infd_xmpp_server_get_security_policy (InfdXmppServer *server);
Returns the current security policy for newly accepted InfXmppConnections.
|
A InfdXmppServer. |
Returns : |
The current security policy. |
"credentials"
property"credentials" gpointer : Read / Write / Construct Only
The certificate credentials for GnuTLS.
"local-hostname"
property"local-hostname" gchar* : Read / Write / Construct Only
Hostname of the server.
Default value: NULL
"sasl-context"
property"sasl-context" gpointer : Read / Write / Construct Only
The GnuSASL context used for authentaction.
"sasl-mechanisms"
property"sasl-mechanisms" gchar* : Read / Write / Construct Only
The SASL mechanisms offered to the client for authentication.
Default value: NULL
"security-policy"
property"security-policy" InfXmppConnectionSecurityPolicy : Read / Write / Construct
Whether to offer or require TLS.
Default value: INF_XMPP_CONNECTION_SECURITY_BOTH_PREFER_TLS
"tcp-server"
property"tcp-server" InfdTcpServer* : Read / Write / Construct Only
Underlaying TCP server.
"error"
signalvoid user_function (InfdXmppServer *infdxmppserver, gpointer arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |