libpurple/sslconn.h

branch
soc.2013.gobjectification.plugins
changeset 37072
b4d3e353c563
parent 37061
77a5c789fff1
parent 35466
e259e75f1c6f
child 37074
1e7b4b3741a0
--- a/libpurple/sslconn.h	Wed Feb 05 21:42:07 2014 +0530
+++ b/libpurple/sslconn.h	Thu Feb 06 03:09:33 2014 +0530
@@ -46,6 +46,7 @@
 #define PURPLE_SSL_DEFAULT_PORT 443
 
 typedef struct _PurpleSslConnection PurpleSslConnection;
+typedef struct _PurpleSslOps PurpleSslOps;
 
 typedef void (*PurpleSslInputFunction)(gpointer, PurpleSslConnection *,
 									 PurpleInputCondition);
@@ -90,60 +91,51 @@
 
 /**
  * PurpleSslOps:
+ * @init: Initializes the SSL system provided. See purple_ssl_init().
+ *        <sbr/>Returns: %TRUE if initialization succeeded
+ * @uninit: Unloads the SSL system. Inverse of PurpleSslOps::init.
+ *          See purple_ssl_uninit().
+ * @connectfunc: Sets up the SSL connection for a #PurpleSslConnection once the
+ *               TCP connection has been established. See purple_ssl_connect().
+ * @close: Destroys the internal data of the SSL connection provided. Freeing
+ *         @gsc itself is left to purple_ssl_close().
+ * @read: Reads data from a connection (like POSIX read()).
+ *        See purple_ssl_read().
+ *        <sbr/>@gsc:    Connection context
+ *        <sbr/>@data:   Pointer to buffer to drop data into
+ *        <sbr/>@len:    Maximum number of bytes to read
+ *        <sbr/>Returns: Number of bytes actually written into @data
+ *                       (which may be less than @len), or <0 on error
+ * @write: Writes data to a connection (like POSIX send()).
+ *         See purple_ssl_write().
+ *         <sbr/>@gsc:    Connection context
+ *         <sbr/>@data:   Data buffer to send data from
+ *         <sbr/>@len:    Number of bytes to send from buffer
+ *         <sbr/>Returns: The number of bytes written to @data (may be less than
+ *                        @len) or <0 on error
+ * @get_peer_certificates: Obtains the certificate chain provided by the peer.
+ *                         See #PurpleCertificate.
+ *                         <sbr/>@gsc:    Connection context
+ *                         <sbr/>Returns: A newly allocated list containing the
+ *                                        certificates the peer provided.
  *
  * SSL implementation operations structure.
  *
- * Every SSL implementation must provide all of these and register it via purple_ssl_set_ops()
+ * Every SSL implementation must provide all of these and register it via
+ * purple_ssl_set_ops().
  * These should not be called directly! Instead, use the purple_ssl_* functions.
  */
-typedef struct
+struct _PurpleSslOps
 {
-	/** Initializes the SSL system provided.
-	 *  Returns: %TRUE if initialization succeeded
-	 *  @see purple_ssl_init
-	 */
 	gboolean (*init)(void);
-	/** Unloads the SSL system. Inverse of PurpleSslOps::init.
-	 *  @see purple_ssl_uninit
-	 */
 	void (*uninit)(void);
-	/** Sets up the SSL connection for a #PurpleSslConnection once
-	 *  the TCP connection has been established
-	 *  @see purple_ssl_connect
-	 */
 	void (*connectfunc)(PurpleSslConnection *gsc);
-	/** Destroys the internal data of the SSL connection provided.
-	 *  Freeing gsc itself is left to purple_ssl_close()
-	 *  @see purple_ssl_close
-	 */
 	void (*close)(PurpleSslConnection *gsc);
-	/** Reads data from a connection (like POSIX read())
-	 * @gsc:   Connection context
-	 * @data:  Pointer to buffer to drop data into
-	 * @len:   Maximum number of bytes to read
-	 * Returns:      Number of bytes actually written into @data (which may be
-	 *              less than @len), or <0 on error
-	 * @see purple_ssl_read
-	*/
 	size_t (*read)(PurpleSslConnection *gsc, void *data, size_t len);
-	/** Writes data to a connection (like POSIX send())
-	* @gsc:    Connection context
-	* @data:   Data buffer to send data from
-	* @len:    Number of bytes to send from buffer
-	* Returns:       The number of bytes written to @data (may be less than
-	*               @len) or <0 on error
-	* @see purple_ssl_write
-	*/
 	size_t (*write)(PurpleSslConnection *gsc, const void *data, size_t len);
-	/** Obtains the certificate chain provided by the peer
-	 *
-	 * @gsc:   Connection context
-	 * Returns:      A newly allocated list containing the certificates
-	 *              the peer provided.
-	 * @see PurpleCertificate
-	 * @todo        Decide whether the ordering of certificates in this
-	 *              list can be guaranteed.
-	 */
+
+	/* TODO Decide whether the ordering of certificates in this list can be
+	        guaranteed. */
 	GList * (* get_peer_certificates)(PurpleSslConnection * gsc);
 
 	/*< private >*/
@@ -151,7 +143,7 @@
 	void (*_purple_reserved2)(void);
 	void (*_purple_reserved3)(void);
 	void (*_purple_reserved4)(void);
-} PurpleSslOps;
+};
 
 G_BEGIN_DECLS
 

mercurial