]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
some more doxygen stuff... still a LOT to go.
authorMichael Jerris <mike@jerris.com>
Mon, 2 Jan 2006 05:00:28 +0000 (05:00 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 2 Jan 2006 05:00:28 +0000 (05:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@252 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_apr.h
src/include/switch_buffer.h
src/include/switch_caller.h
src/include/switch_channel.h
src/include/switch_types.h
src/include/switch_utils.h

index b19082dc90f6c29442fb1e280211f68db4ec0545..2425719182a6da206484dcf0ccae1e4d83e1e4f8 100644 (file)
@@ -28,8 +28,8 @@
  * switch_apr.h -- APR includes header
  *
  */
-/*! \file switch_apr.h\r
-    \brief APR includes header\r
+/*! \file switch_apr.h
+    \brief APR includes header
 */
 #ifndef SWITCH_APR_H
 #define SWITCH_APR_H
@@ -66,77 +66,139 @@ extern "C" {
 */
 
 typedef enum {
-       SWITCH_MUTEX_DEFAULT = APR_THREAD_MUTEX_DEFAULT,
-       SWITCH_MUTEX_NESTED = APR_THREAD_MUTEX_NESTED,
-       SWITCH_MUTEX_UNNESTED = APR_THREAD_MUTEX_UNNESTED
+       SWITCH_MUTEX_DEFAULT = APR_THREAD_MUTEX_DEFAULT /**< platform-optimal lock behavior */,
+       SWITCH_MUTEX_NESTED = APR_THREAD_MUTEX_NESTED   /**< enable nested (recursive) locks */,
+       SWITCH_MUTEX_UNNESTED = APR_THREAD_MUTEX_UNNESTED       /**< disable nested locks */
 } switch_lock_flag;
 
+/**< descriptor refers to a socket */
 #define SWITCH_POLL_SOCKET APR_POLL_SOCKET
-#define SWITCH_THREAD_FUNC APR_THREAD_FUNC
 
+/** @def SWITCH_UNSPEC
+ * Let the system decide which address family to use
+ */
 #define SWITCH_UNSPEC APR_UNSPEC 
-#define SWITCH_POLLIN APR_POLLIN
-#define SWITCH_POLLPRI APR_POLLPRI
-#define SWITCH_POLLOUT APR_POLLOUT
-#define SWITCH_POLLERR APR_POLLERR
-#define SWITCH_POLLHUP APR_POLLHUP
-#define SWITCH_POLLNVAL APR_POLLNVAL
-#define SWITCH_READ APR_READ 
-#define SWITCH_FPROT_UREAD APR_FPROT_UREAD
-#define SWITCH_FPROT_GREAD APR_FPROT_GREAD
-
-#define SWITCH_FOPEN_READ APR_FOPEN_READ
-#define SWITCH_FOPEN_WRITE APR_FOPEN_WRITE
-#define SWITCH_FOPEN_CREATE APR_FOPEN_CREATE
-#define SWITCH_FOPEN_APPEND APR_FOPEN_APPEND
-#define SWITCH_FOPEN_TRUNCATE APR_FOPEN_TRUNCATE
-#define SWITCH_FOPEN_BINARY APR_FOPEN_BINARY
-#define SWITCH_FOPEN_EXCL APR_FOPEN_EXCL
-#define SWITCH_FOPEN_BUFFERED APR_FOPEN_BUFFERED
-#define SWITCH_FOPEN_DELONCLOSE APR_FOPEN_DELONCLOSE
-#define SWITCH_FOPEN_XTHREAD APR_FOPEN_XTHREAD
-#define SWITCH_FOPEN_SHARELOCK APR_FOPEN_SHARELOCK
-#define SWITCH_FOPEN_NOCLEANUP APR_FOPEN_NOCLEANUP
-#define SWITCH_FOPEN_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED
-#define SWITCH_FOPEN_LARGEFILE APR_FOPEN_LARGEFILE
-
-#define SWITCH_FPROT_USETID APR_FPROT_USETID
-#define SWITCH_FPROT_UREAD APR_FPROT_UREAD
-#define SWITCH_FPROT_UWRITE APR_FPROT_UWRITE
-#define SWITCH_FPROT_UEXECUTE APR_FPROT_UEXECUTE
-
-#define SWITCH_FPROT_GSETID APR_FPROT_GSETID
-#define SWITCH_FPROT_GREAD APR_FPROT_GREAD
-#define SWITCH_FPROT_GWRITE APR_FPROT_GWRITE
-#define SWITCH_FPROT_GEXECUTE APR_FPROT_GEXECUTE
+
+/**
+ * Poll options
+ */
+#define SWITCH_POLLIN APR_POLLIN                       /**< Can read without blocking */
+#define SWITCH_POLLPRI APR_POLLPRI                     /**< Priority data available */
+#define SWITCH_POLLOUT APR_POLLOUT                     /**< Can write without blocking */
+#define SWITCH_POLLERR APR_POLLERR                     /**< Pending error */
+#define SWITCH_POLLHUP APR_POLLHUP                     /**< Hangup occurred */
+#define SWITCH_POLLNVAL APR_POLLNVAL           /**< Descriptior invalid */
+
+/**
+ * @defgroup switch_file_open_flags File Open Flags/Routines
+ * @{
+ */
+#define SWITCH_FOPEN_READ APR_FOPEN_READ                                                       /**< Open the file for reading */
+#define SWITCH_FOPEN_WRITE APR_FOPEN_WRITE                                                     /**< Open the file for writing */
+#define SWITCH_FOPEN_CREATE APR_FOPEN_CREATE                                           /**< Create the file if not there */
+#define SWITCH_FOPEN_APPEND APR_FOPEN_APPEND                                           /**< Append to the end of the file */
+#define SWITCH_FOPEN_TRUNCATE APR_FOPEN_TRUNCATE                                       /**< Open the file and truncate to 0 length */
+#define SWITCH_FOPEN_BINARY APR_FOPEN_BINARY                                           /**< Open the file in binary mode */
+#define SWITCH_FOPEN_EXCL APR_FOPEN_EXCL                                                       /**< Open should fail if APR_CREATE and file exists. */
+#define SWITCH_FOPEN_BUFFERED APR_FOPEN_BUFFERED                                       /**< Open the file for buffered I/O */
+#define SWITCH_FOPEN_DELONCLOSE APR_FOPEN_DELONCLOSE                           /**< Delete the file after close */
+#define SWITCH_FOPEN_XTHREAD APR_FOPEN_XTHREAD                                         /**< Platform dependent tag to open the file for use across multiple threads */
+#define SWITCH_FOPEN_SHARELOCK APR_FOPEN_SHARELOCK                                     /**< Platform dependent support for higher level locked read/write access to support writes across process/machines */
+#define SWITCH_FOPEN_NOCLEANUP APR_FOPEN_NOCLEANUP                                     /**< Do not register a cleanup when the file is opened */
+#define SWITCH_FOPEN_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED       /**< Advisory flag that this file should support apr_socket_sendfile operation */
+#define SWITCH_FOPEN_LARGEFILE APR_FOPEN_LAREFILE                                      /**< Platform dependent flag to enable large file support */
+
+#define SWITCH_READ APR_READ                           /**< @deprecated @see SWITCH_FOPEN_READ */
+/** @} */
+
+/**
+ * @defgroup switch_file_permissions File Permissions flags 
+ * @{
+ */
+    
+#define SWITCH_FPROT_USETID APR_FPROT_USETID           /**< Set user id */
+#define SWITCH_FPROT_UREAD APR_FPROT_UREAD                     /**< Read by user */
+#define SWITCH_FPROT_UWRITE APR_FPROT_UWRITE           /**< Write by user */
+#define SWITCH_FPROT_UEXECUTE APR_FPROT_UEXECUTE       /**< Execute by user */
+
+#define SWITCH_FPROT_GSETID APR_FPROT_GSETID           /**< Set group id */
+#define SWITCH_FPROT_GREAD APR_FPROT_GREAD                     /**< Read by group */
+#define SWITCH_FPROT_GWRITE APR_FPROT_GWRITE           /**< Write by group */
+#define SWITCH_FPROT_GEXECUTE APR_FPROT_GEXECUTE       /**< Execute by group */
 
 #define SWITCH_FPROT_WSETID APR_FPROT_U WSETID
-#define SWITCH_FPROT_WREAD APR_FPROT_WREAD
-#define SWITCH_FPROT_WWRITE APR_FPROT_WWRITE
-#define SWITCH_FPROT_WEXECUTE APR_FPROT_WEXECUTE
+#define SWITCH_FPROT_WREAD APR_FPROT_WREAD                     /**< Read by others */
+#define SWITCH_FPROT_WWRITE APR_FPROT_WWRITE           /**< Write by others */
+#define SWITCH_FPROT_WEXECUTE APR_FPROT_WEXECUTE       /**< Execute by others */
+
+#define SWITCH_FPROT_OS_DEFAULT APR_FPROT_OS_DEFAULT   /**< use OS's default permissions */
 
-#define SWITCH_FPROT_OS_DEFAULT APR_FPROT_OS_DEFAULT
-#define SWITCH_FPROT_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS
+/* additional permission flags for apr_file_copy  and apr_file_append */
+#define SWITCH_FPROT_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS     /**< Copy source file's permissions */
+/** @} */
 
        
+/** Opaque Thread structure. */
+typedef apr_thread_t switch_thread;
+
+/** Opaque Thread attributes structure. */
 typedef apr_threadattr_t switch_threadattr_t;
-typedef apr_strmatch_pattern switch_strmatch_pattern;
-typedef apr_uuid_t switch_uuid_t;
-typedef apr_queue_t switch_queue_t;
+
+/** Opaque thread-local mutex structure */
+typedef apr_thread_mutex_t switch_mutex_t;
+
+/**
+ * /fn typedef void *(SWITCH_THREAD_FUNC *switch_thread_start_t)(switch_thread_t*, void*);
+ * The prototype for any APR thread worker functions.
+ */
+#define SWITCH_THREAD_FUNC APR_THREAD_FUNC
+typedef apr_thread_start_t switch_thread_start_t;
+
+/** Opaque structure for thread condition variables */
+typedef apr_thread_cond_t switch_thread_cond_t;
+
+/** Abstract type for hash tables. */
 typedef apr_hash_t switch_hash;
+
+/** Abstract type for scanning hash tables. */
+typedef apr_hash_index_t switch_hash_index_t;
+
+/** The fundamental pool type */
 typedef apr_pool_t switch_memory_pool;
-typedef apr_thread_t switch_thread;
-typedef apr_thread_mutex_t switch_mutex_t;
+
+/** number of microseconds since 00:00:00 january 1, 1970 UTC */
 typedef apr_time_t switch_time_t;
+
+/**
+ * a structure similar to ANSI struct tm with the following differences:
+ *  - tm_usec isn't an ANSI field
+ *  - tm_gmtoff isn't an ANSI field (it's a bsdism)
+ */
 typedef apr_time_exp_t switch_time_exp_t;
-typedef apr_thread_start_t switch_thread_start_t;
+
+/** Freeswitch's socket address type, used to ensure protocol independence */
 typedef apr_sockaddr_t switch_sockaddr_t;
+
+/** A structure to represent sockets */
 typedef apr_socket_t switch_socket_t;
+
+/** Poll descriptor set. */
 typedef apr_pollfd_t switch_pollfd_t;
+
+/** Opaque structure used for pollset API */
 typedef apr_pollset_t switch_pollset_t;
+
+/** Structure for referencing files. */
 typedef apr_file_t switch_file_t;
-typedef apr_thread_cond_t switch_thread_cond_t;
-typedef apr_hash_index_t switch_hash_index_t;
+
+/** Precompiled search pattern */
+typedef apr_strmatch_pattern switch_strmatch_pattern;
+
+/** we represent a UUID as a block of 16 bytes. */
+typedef apr_uuid_t switch_uuid_t;
+
+/** Opaque structure used for queue API */
+typedef apr_queue_t switch_queue_t;
 
 
 #define switch_thread_cond_create apr_thread_cond_create
index 255093e0366f9e8a763217ca87619600edf007a2..4a9ed38a6257a03bfa4a16a25d8bc97c586dd821 100644 (file)
@@ -44,53 +44,53 @@ extern "C" {
 
 struct switch_buffer;
 
-/*! \brief Allocate a new switch_buffer \r
- * \param pool Pool to allocate the buffer from\r
- * \param buffer returned pointer to the new buffer\r
- * \param max_len length required by the buffer\r
- * \return status\r
- */\r
+/*! \brief Allocate a new switch_buffer 
+ * \param pool Pool to allocate the buffer from
+ * \param buffer returned pointer to the new buffer
+ * \param max_len length required by the buffer
+ * \return status
+ */
 SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool *pool, switch_buffer **buffer, size_t max_len);
 
-/*! \brief Get the length of a switch_buffer \r
- * \param buffer any buffer of type switch_buffer\r
- * \return int size of the buffer.\r
- */\r
+/*! \brief Get the length of a switch_buffer 
+ * \param buffer any buffer of type switch_buffer
+ * \return int size of the buffer.
+ */
 SWITCH_DECLARE(int) switch_buffer_len(switch_buffer *buffer);
 
-/*! \brief Get the freespace of a switch_buffer \r
- * \param buffer any buffer of type switch_buffer\r
- * \return int freespace in the buffer.\r
- */\r
+/*! \brief Get the freespace of a switch_buffer 
+ * \param buffer any buffer of type switch_buffer
+ * \return int freespace in the buffer.
+ */
 SWITCH_DECLARE(int) switch_buffer_freespace(switch_buffer *buffer);
 
-/*! \brief Get the in use amount of a switch_buffer \r
- * \param buffer any buffer of type switch_buffer\r
- * \return int size of buffer curently in use\r
- */\r
+/*! \brief Get the in use amount of a switch_buffer 
+ * \param buffer any buffer of type switch_buffer
+ * \return int size of buffer curently in use
+ */
 SWITCH_DECLARE(int) switch_buffer_inuse(switch_buffer *buffer);
 
-/*! \brief Read data from a switch_buffer up to the ammount of datalen if it is available.  Remove read data from buffer. \r
- * \param buffer any buffer of type switch_buffer\r
- * \param data pointer to the read data to be returned\r
- * \param datalen amount of data to be returned\r
- * \return int ammount of data actually read\r
- */\r
+/*! \brief Read data from a switch_buffer up to the ammount of datalen if it is available.  Remove read data from buffer. 
+ * \param buffer any buffer of type switch_buffer
+ * \param data pointer to the read data to be returned
+ * \param datalen amount of data to be returned
+ * \return int ammount of data actually read
+ */
 SWITCH_DECLARE(int) switch_buffer_read(switch_buffer *buffer, void *data, size_t datalen);
 
-/*! \brief Write data into a switch_buffer up to the length of datalen\r
- * \param buffer any buffer of type switch_buffer\r
- * \param data pointer to the data to be written\r
- * \param datalen amount of data to be written\r
- * \return int ammount of buffer used after the write, or 0 if no space available\r
- */\r
+/*! \brief Write data into a switch_buffer up to the length of datalen
+ * \param buffer any buffer of type switch_buffer
+ * \param data pointer to the data to be written
+ * \param datalen amount of data to be written
+ * \return int ammount of buffer used after the write, or 0 if no space available
+ */
 SWITCH_DECLARE(int) switch_buffer_write(switch_buffer *buffer, void *data, size_t datalen);
 
-/*! \brief Remove data from the buffer\r
- * \param buffer any buffer of type switch_buffer\r
- * \param datalen amount of data to be returned\r
- * \return int ammount of buffer used after the toss, or 0 if unable to toss that much data\r
- */\r
+/*! \brief Remove data from the buffer
+ * \param buffer any buffer of type switch_buffer
+ * \param datalen amount of data to be returned
+ * \return int ammount of buffer used after the toss, or 0 if unable to toss that much data
+ */
 SWITCH_DECLARE(int) switch_buffer_toss(switch_buffer *buffer, size_t datalen);
 
 
index 811259425ae39f0e9eb5a80174a2d8cfb2ba7c07..5c906378ee905dfa6f3bc1ec17b72ea87669d394 100644 (file)
@@ -29,8 +29,8 @@
  * switch_caller.h -- Caller Identification
  *
  */
-/*! \file switch_caller.h\r
-    \brief Caller Identification\r
+/*! \file switch_caller.h
+    \brief Caller Identification
 */
 
 #ifndef SWITCH_CALLER_H
@@ -47,6 +47,8 @@ extern "C" {
                struct switch_caller_step *next_step;
        };
 
+/*! \brief Caller specific data including callid information 
+ */
        struct switch_caller_profile {
                char *dialplan;
                char *caller_id_name;
index 09ce976304563365be0a048578281de2189af853..c81c0cc8e9f22275c27e8a9ad97949b0a0046215 100644 (file)
@@ -29,8 +29,8 @@
  * switch_channel.h -- Media Channel Interface
  *
  */
-/*! \file switch_channel.h\r
-    \brief Media Channel Interface\r
+/*! \file switch_channel.h
+    \brief Media Channel Interface
 */
 
 #ifndef SWITCH_CHANNEL_H
@@ -42,6 +42,10 @@ extern "C" {
 
 #include <switch.h>
 
+/*! \brief Get the current state of a channel in the state engine
+ * \param channel switch_channel object tot retreive state for
+ * \return state of a type in switch_channel_state enum
+ */
 SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel *channel);
 SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *channel, switch_channel_state state);
 
index ac66fe0b4d977cb3f42ba4dbba54284d98d37a11..74707e7a2cd8236e47cb48e65184505e6d36b2da 100644 (file)
@@ -28,8 +28,8 @@
  * switch_types.h -- Data Types
  *
  */
-/*! \file switch_types.h\r
-    \brief Data Types\r
+/*! \file switch_types.h
+    \brief Data Types
 */
 #ifndef SWITCH_TYPES_H
 #define SWITCH_TYPES_H
@@ -74,6 +74,8 @@ typedef enum {
 #define SWITCH_CHANNEL_CONSOLE_CLEAN SWITCH_CHANNEL_ID_CONSOLE_CLEAN, __FILE__, __FUNCTION__, __LINE__
 #define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __FUNCTION__, __LINE__
 
+/*! \brief Channel States
+ */
 typedef enum {
        CS_NEW,
        CS_INIT,
index cfe186defdba70bdb3692c6b348520e3d9d8994d..c521890141056a284301d30d8d482aba553e255c 100644 (file)
@@ -29,8 +29,8 @@
  * switch_utils.h -- Compatability and Helper Code
  *
  */
-/*! \file switch_utils.h\r
-    \brief Compatability and Helper Code\r
+/*! \file switch_utils.h
+    \brief Compatability and Helper Code
 */
 #ifndef SWITCH_UTILS_H
 #define SWITCH_UTILS_H