2004-01-21 Mikael Hallendal <micke@imendio.com>
authorhallski <hallski>
Wed, 21 Jan 2004 21:50:42 +0000
changeset 72 95d0e86982c5
parent 71 0c87c8ed4d99
child 73 043d4594d84a
2004-01-21 Mikael Hallendal <micke@imendio.com> * docs/reference/tmpl/lm-ssl.sgml: * loudmouth/lm-ssl.c: - Added API documentation
ChangeLog
docs/reference/tmpl/lm-ssl.sgml
loudmouth/lm-ssl.c
--- a/ChangeLog	Wed Jan 21 21:34:05 2004 +0000
+++ b/ChangeLog	Wed Jan 21 21:50:42 2004 +0000
@@ -1,3 +1,9 @@
+2004-01-21  Mikael Hallendal  <micke@imendio.com>
+
+	* docs/reference/tmpl/lm-ssl.sgml:
+	* loudmouth/lm-ssl.c:
+	- Added API documentation
+
 2004-01-21  Mikael Hallendal  <micke@imendio.com>
 
 	* docs/reference/loudmouth-docs.sgml:
--- a/docs/reference/tmpl/lm-ssl.sgml	Wed Jan 21 21:34:05 2004 +0000
+++ b/docs/reference/tmpl/lm-ssl.sgml	Wed Jan 21 21:50:42 2004 +0000
@@ -1,12 +1,12 @@
 <!-- ##### SECTION Title ##### -->
-lm-ssl
+LmSSL
 
 <!-- ##### SECTION Short_Description ##### -->
-
+SSL struct for SSL support in Loudmouth
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
-
+Use this together with an #LmConnection to get the connection to use SSL.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -16,43 +16,43 @@
 
 <!-- ##### ENUM LmCertificateStatus ##### -->
 <para>
-
+Provides information of the status of a certain certificate.
 </para>
 
-@LM_CERT_INVALID: 
-@LM_CERT_ISSUER_NOT_FOUND: 
-@LM_CERT_REVOKED: 
+@LM_CERT_INVALID: The certificate is invalid.
+@LM_CERT_ISSUER_NOT_FOUND: The issuer of the certificate is not found.
+@LM_CERT_REVOKED: The certificate has been revoked.
 
 <!-- ##### ENUM LmSSLStatus ##### -->
 <para>
-
+Provides information about something gone wrong when trying to setup the SSL connection.
 </para>
 
-@LM_SSL_STATUS_NO_CERT_FOUND: 
-@LM_SSL_STATUS_UNTRUSTED_CERT: 
-@LM_SSL_STATUS_CERT_EXPIRED: 
-@LM_SSL_STATUS_CERT_NOT_ACTIVATED: 
-@LM_SSL_STATUS_CERT_HOSTNAME_MISMATCH: 
-@LM_SSL_STATUS_CERT_FINGERPRINT_MISMATCH: 
-@LM_SSL_STATUS_GENERIC_ERROR: 
+@LM_SSL_STATUS_NO_CERT_FOUND: The server doesn't provide a certificate.
+@LM_SSL_STATUS_UNTRUSTED_CERT: The certification can not be trusted.
+@LM_SSL_STATUS_CERT_EXPIRED: The certificate has expired.
+@LM_SSL_STATUS_CERT_NOT_ACTIVATED: The certificate has not been activated.
+@LM_SSL_STATUS_CERT_HOSTNAME_MISMATCH: The server hostname doesn't match the one in the certificate.
+@LM_SSL_STATUS_CERT_FINGERPRINT_MISMATCH: The fingerprint doesn't match your expected.
+@LM_SSL_STATUS_GENERIC_ERROR: Some other error.
 
 <!-- ##### ENUM LmSSLResponse ##### -->
 <para>
-
+Used to inform #LmConnection if you want to stop due to an error reported or if you want to continue to connect.
 </para>
 
-@LM_SSL_RESPONSE_CONTINUE: 
-@LM_SSL_RESPONSE_STOP: 
+@LM_SSL_RESPONSE_CONTINUE: Continue to connect.
+@LM_SSL_RESPONSE_STOP: Stop the connection.
 
 <!-- ##### USER_FUNCTION LmSSLFunction ##### -->
 <para>
-
+This function is called if something goes wrong during the connecting phase.
 </para>
 
-@ssl: 
-@status: 
-@user_data: 
-@Returns: 
+@ssl: An #LmSSL. 
+@status: The status informing what went wrong.
+@user_data: User data provided in the callback.
+@Returns: User should return #LM_SSL_RESPONSE_CONTINUE if connection should proceed and otherwise #LM_SSL_RESPONSE_STOP.
 
 
 <!-- ##### FUNCTION lm_ssl_new ##### -->
--- a/loudmouth/lm-ssl.c	Wed Jan 21 21:34:05 2004 +0000
+++ b/loudmouth/lm-ssl.c	Wed Jan 21 21:50:42 2004 +0000
@@ -262,6 +262,17 @@
 #endif
 }
 
+/**
+ * lm_ssl_new:
+ * @expected_fingerprint: The expected fingerprint. @ssl_function will be called if there is a mismatch. %NULL if you are not interested in this check.
+ * @ssl_function: Callback called to inform the user of a problem during setting up the SSL connection and how to proceed.
+ * @user_data: Data sent with the callback.
+ * @notify: Function to free @user_dataa when the connection is finished. %NULL if @user_data should not be freed.
+ *
+ * Creates a new SSL struct, call #lm_connection_set_ssl to use it. 
+ *
+ * Return value: A new #LmSSL struct.
+ **/
 LmSSL *
 lm_ssl_new (const gchar    *expected_fingerprint,
 	    LmSSLFunction   ssl_function,
@@ -303,6 +314,14 @@
 	return (unsigned char*) ssl->fingerprint;
 }
 
+/**
+ * lm_ssl_ref:
+ * @ssl: an #LmSSL
+ * 
+ * Adds a reference to @ssl.
+ * 
+ * Return value: the ssl
+ **/
 LmSSL *
 lm_ssl_ref (LmSSL *ssl)
 {
@@ -313,6 +332,13 @@
 	return ssl;
 }
 
+/**
+ * lm_ssl_unref
+ * @ssl: an #LmSSL
+ * 
+ * Removes a reference from @ssl. When no more references are present
+ * @ssl is freed.
+ **/
 void 
 lm_ssl_unref (LmSSL *ssl)
 {