diff src/protocols/novell/nmconn.h @ 9360:d77537e8bfe5

[gaim-migrate @ 10168] " This patch fixes contact list sync problem, fixes a memory leak, and includes some code cleanup." --Mike Stoddard of Novell committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 23 Jun 2004 17:27:56 +0000
parents 6663ad2386d9
children
line wrap: on
line diff
--- a/src/protocols/novell/nmconn.h	Wed Jun 23 16:58:22 2004 +0000
+++ b/src/protocols/novell/nmconn.h	Wed Jun 23 17:27:56 2004 +0000
@@ -75,6 +75,25 @@
 };
 
 /**
+ * Allocate a new NMConn struct
+ *
+ * @param 	The address of the server that we are connecting to.
+ * @param 	The port that we are connecting to.
+ *
+ * @return		A pointer to a newly allocated NMConn struct, should
+ *				be freed by calling nm_release_conn()
+ */
+NMConn *nm_create_conn(const char *addr, int port);
+
+/**
+ * Release an NMConn
+ *
+ * @param 	Pointer to the NMConn to release.
+ *
+ */
+void nm_release_conn(NMConn *conn);
+
+/**
  * Write len bytes from the given buffer.
  *
  * @param conn	The connection to write to.
@@ -135,12 +154,15 @@
  * @param conn		The connection.
  * @param cmd		The request to dispatch.
  * @param fields	The field list for the request.
+ * @param cb		The response callback for the new request object.
+ * @param data		The user defined data for the request (to be passed to the resp cb).
  * @param req		The request. Should be freed with nm_release_request.
  *
  * @return			NM_OK on success.
  */
-NMERR_T nm_send_request(NMConn * conn, char *cmd, NMField * fields,
-						NMRequest ** req);
+NMERR_T
+nm_send_request(NMConn *conn, char *cmd, NMField *fields,
+				nm_response_cb cb, gpointer data, NMRequest **request);
 
 /**
  * Write out the given field list.