| libinfinity-0.4 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
InfdXmppServer;
InfdXmppServerClass;
InfdXmppServer * infd_xmpp_server_new (InfdTcpServer *tcp,
InfXmppConnectionSecurityPolicy policy,
InfCertificateCredentials *creds,
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" InfCertificateCredentials* : Read / Write / Construct "local-hostname" gchar* : Read / Write / Construct Only "sasl-context" gpointer : Read / Write / Construct "sasl-mechanisms" gchar* : Read / Write / Construct "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, InfCertificateCredentials *creds, 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 creds may
be NULL. If creds is non-NULL nevertheless, then it is possible to change
the security policy later using infd_xmpp_server_set_security_policy().
creds can also be changed later while the server is running. So just set
valid credentials before changing policy to allow TLS.
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" InfCertificateCredentials* : Read / Write / Construct
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
The GnuSASL context used for authentaction.
"sasl-mechanisms" property"sasl-mechanisms" gchar* : Read / Write / Construct
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_ONLY_UNSECURED
"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. |