Author: rhs
Date: Wed Jun 27 20:12:39 2012
New Revision: 1354706

URL: http://svn.apache.org/viewvc?rev=1354706&view=rev
Log:
added doxygen to messenger

Modified:
    qpid/proton/trunk/proton-c/include/proton/messenger.h

Modified: qpid/proton/trunk/proton-c/include/proton/messenger.h
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/include/proton/messenger.h?rev=1354706&r1=1354705&r2=1354706&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/include/proton/messenger.h (original)
+++ qpid/proton/trunk/proton-c/include/proton/messenger.h Wed Jun 27 20:12:39 
2012
@@ -24,28 +24,131 @@
 
 #include <proton/message.h>
 
-typedef struct pn_messenger_t pn_messenger_t;
-typedef int pn_source_t;
-typedef int pn_target_t;
-
+/** @file
+ * The messenger API provides a high level interface for sending and
+ * receiving AMQP messages.
+ */
+
+typedef struct pn_messenger_t pn_messenger_t; /**< Messenger*/
+
+/** Constructs a new Messenger.
+ *
+ * @return pointer to a new Messenger
+ */
 pn_messenger_t *pn_messenger();
+
+/** Frees a Messenger.
+ *
+ * @param[in] messenger the messenger to free, no longer valid on
+ *                      return
+ */
 void pn_messenger_free(pn_messenger_t *messenger);
 
+/** Returns the error code for the Messenger.
+ *
+ * @param[in] messenger the messenger to check for errors
+ *
+ * @return an error code or zero if there is no error
+ * @see error.h
+ */
 int pn_messenger_errno(pn_messenger_t *messenger);
+
+/** Returns the error info for the Messenger.
+ *
+ * @param[in] messenger the messenger to check for errors
+ *
+ * @return a descriptive error message or NULL if no error has
+ *         occurred
+ */
 const char *pn_messenger_error(pn_messenger_t *messenger);
 
+/** Starts a messenger. A messenger cannot send or recv messages until
+ * it is started.
+ *
+ * @param[in] messenger the messenger to start
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_start(pn_messenger_t *messenger);
+
+/** Stops a messenger. A messenger cannot send or recv messages when
+ *  it is stopped.
+ *
+ * @param[in] messenger the messenger to stop
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_stop(pn_messenger_t *messenger);
 
+/** Subscribes a messenger to messages from the specified source.
+ *
+ * @param[in] messenger the messenger to subscribe
+ * @param[in] source
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_subscribe(pn_messenger_t *messenger, const char *source);
 
+/** Puts a message on the outgoing message queue for a messenger.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] msg the message to put on the outgoing queue
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_put(pn_messenger_t *messenger, pn_message_t *msg);
+
+/** Sends any messages in the outgoing message queue for a messenger.
+ * This will blocks until the messages have been sent.
+ *
+ * @param[in] messenger the messager
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_send(pn_messenger_t *messenger);
 
+/** Receives up to n message into the incoming message queue of a
+ * messenger. Blocks until at least one message is available in the
+ * incoming queue.
+ *
+ * @param[in] messenger the messenger
+ * @param[in] n the maximum number of messages to receive
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_recv(pn_messenger_t *messenger, int n);
+
+/** Gets a message from the head of the incoming message queue of a
+ * messenger.
+ *
+ * @param[in] messenger the messenger
+ * @param[out] msg upon return contains the message from the head of the queue
+ *
+ * @return an error code or zero on success
+ * @see error.h
+ */
 int pn_messenger_get(pn_messenger_t *messenger, pn_message_t *msg);
 
+/** Returns the number of messages in the outgoing message queue of a 
messenger.
+ *
+ * @param[in] the messenger
+ *
+ * @return the outgoing queue depth
+ */
 int pn_messenger_outgoing(pn_messenger_t *messenger);
+
+/** Returns the number of messages in the incoming message queue of a 
messenger.
+ *
+ * @param[in] the messenger
+ *
+ * @return the incoming queue depth
+ */
 int pn_messenger_incoming(pn_messenger_t *messenger);
 
 #endif /* messenger.h */



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to