<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][17472] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=17472">17472</a></dd>
<dt>Author</dt> <dd>moy</dd>
<dt>Date</dt> <dd>2010-05-03 11:15:18 -0500 (Mon, 03 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>freetdm: documentation</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunklibsfreetdmdocsDoxygenconf">freeswitch/trunk/libs/freetdm/docs/Doxygen.conf</a></li>
<li><a href="#freeswitchtrunklibsfreetdmsrcftdm_ioc">freeswitch/trunk/libs/freetdm/src/ftdm_io.c</a></li>
<li><a href="#freeswitchtrunklibsfreetdmsrcincludefreetdmh">freeswitch/trunk/libs/freetdm/src/include/freetdm.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#freeswitchtrunklibsfreetdmfreetdmdoxygen">freeswitch/trunk/libs/freetdm/freetdm.doxygen</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunklibsfreetdmdocsDoxygenconf"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/freetdm/docs/Doxygen.conf (17471 => 17472)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/freetdm/docs/Doxygen.conf        2010-05-03 11:24:31 UTC (rev 17471)
+++ freeswitch/trunk/libs/freetdm/docs/Doxygen.conf        2010-05-03 16:15:18 UTC (rev 17472)
</span><span class="lines">@@ -3,9 +3,9 @@
</span><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # Project related configuration options
</span><span class="cx"> #---------------------------------------------------------------------------
</span><del>-PROJECT_NAME = OpenZAP
</del><ins>+PROJECT_NAME = FreeTDM
</ins><span class="cx"> PROJECT_NUMBER =
</span><del>-OUTPUT_DIRECTORY = .
</del><ins>+OUTPUT_DIRECTORY = docs/
</ins><span class="cx"> CREATE_SUBDIRS = NO
</span><span class="cx"> OUTPUT_LANGUAGE = English
</span><span class="cx"> USE_WINDOWS_ENCODING = YES
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> OPTIMIZE_OUTPUT_JAVA = NO
</span><span class="cx"> DISTRIBUTE_GROUP_DOC = NO
</span><span class="cx"> SUBGROUPING = YES
</span><del>-IGNORE_PREFIX = zap_ ZAP_ Q921 Q931
</del><ins>+IGNORE_PREFIX = ftdm_ FTDM_ Q921 Q931
</ins><span class="cx">
</span><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # Build related configuration options
</span><span class="lines">@@ -83,18 +83,7 @@
</span><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # configuration options related to the input files
</span><span class="cx"> #---------------------------------------------------------------------------
</span><del>-INPUT = ../src ../src/include \
- ../src/isdn ../src/isdn/include \
- ../mod_openzap ../ \
- ../src/ozmod \
- ../src/ozmod/ozmod_analog \
- ../src/ozmod/ozmod_analog_em \
- ../src/ozmod/ozmod_isdn \
- ../src/ozmod/ozmod_pika \
- ../src/ozmod/ozmod_skel \
- ../src/ozmod/ozmod_ss7_boost \
- ../src/ozmod/ozmod_wanpipe \
- ../src/ozmod/ozmod_zt
</del><ins>+INPUT = src/include/freetdm.h
</ins><span class="cx">
</span><span class="cx"> FILE_PATTERNS = *.c \
</span><span class="cx"> *.cc \
</span><span class="lines">@@ -149,7 +138,7 @@
</span><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> ALPHABETICAL_INDEX = YES
</span><span class="cx"> COLS_IN_ALPHA_INDEX = 1
</span><del>-IGNORE_PREFIX = zap_
</del><ins>+IGNORE_PREFIX = ftdm_
</ins><span class="cx"> #---------------------------------------------------------------------------
</span><span class="cx"> # configuration options related to the HTML output
</span><span class="cx"> #---------------------------------------------------------------------------
</span><span class="lines">@@ -161,7 +150,7 @@
</span><span class="cx"> HTML_STYLESHEET =
</span><span class="cx"> HTML_ALIGN_MEMBERS = YES
</span><span class="cx"> GENERATE_HTMLHELP = NO
</span><del>-CHM_FILE = freeswitch.chm
</del><ins>+CHM_FILE = freetdm.chm
</ins><span class="cx"> HHC_LOCATION =
</span><span class="cx"> GENERATE_CHI = YES
</span><span class="cx"> BINARY_TOC = NO
</span><span class="lines">@@ -230,9 +219,8 @@
</span><span class="cx"> SEARCH_INCLUDES = NO
</span><span class="cx"> INCLUDE_PATH =
</span><span class="cx"> INCLUDE_FILE_PATTERNS = *.h
</span><del>-PREDEFINED = ZAP_DECLARE(x)=x \
-                                        APR_DECLARE(x)=x \
-                                        ZAP_MOD_DECLARE(x)=x \
</del><ins>+PREDEFINED = FT_DECLARE(x)=x \
+                                        FT_MOD_DECLARE(x)=x \
</ins><span class="cx">                                         DoxyDefine(x)=x
</span><span class="cx">                                         
</span><span class="cx"> EXPAND_AS_DEFINED = NO
</span></span></pre></div>
<a id="freeswitchtrunklibsfreetdmfreetdmdoxygen"></a>
<div class="delfile"><h4>Deleted: freeswitch/trunk/libs/freetdm/freetdm.doxygen</h4></div>
<a id="freeswitchtrunklibsfreetdmsrcftdm_ioc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/freetdm/src/ftdm_io.c (17471 => 17472)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/freetdm/src/ftdm_io.c        2010-05-03 11:24:31 UTC (rev 17471)
+++ freeswitch/trunk/libs/freetdm/src/ftdm_io.c        2010-05-03 16:15:18 UTC (rev 17472)
</span><span class="lines">@@ -512,30 +512,6 @@
</span><span class="cx">         ftdm_mutex_unlock(globals.span_mutex);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if 0
-static void ftdm_span_del(ftdm_span_t *span)
-{
-        ftdm_span_t *last = NULL, *sp;
-
-        ftdm_mutex_lock(globals.span_mutex);
-        for (sp = globals.spans; sp; sp = sp->next) {
-                
-                if (sp == span) {
-                        if (last) {
-                                last->next = sp->next;
-                        } else {
-                                globals.spans = sp->next;
-                        }
-                        hashtable_remove(globals.span_hash, (void *)sp->name);
-                        break;
-                }
-
-                last = sp;
-        }
-        ftdm_mutex_unlock(globals.span_mutex);
-}
-#endif
-
</del><span class="cx"> FT_DECLARE(ftdm_status_t) ftdm_span_stop(ftdm_span_t *span)
</span><span class="cx"> {
</span><span class="cx">         if (span->stop) {
</span><span class="lines">@@ -3066,10 +3042,10 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">
</span><del>- if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
</del><ins>+        if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
</ins><span class="cx">                 snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "channel not open");
</span><del>- return FTDM_FAIL;
- }
</del><ins>+                return FTDM_FAIL;
+        }
</ins><span class="cx">
</span><span class="cx">         if (!ftdmchan->fio->write) {
</span><span class="cx">                 snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "method not implemented");
</span><span class="lines">@@ -3110,7 +3086,7 @@
</span><span class="cx">                         wdata[i] = ftdmchan->txgain_table[wdata[i]];
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>- status = ftdmchan->fio->write(ftdmchan, data, datalen);
</del><ins>+        status = ftdmchan->fio->write(ftdmchan, data, datalen);
</ins><span class="cx">
</span><span class="cx">         return status;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunklibsfreetdmsrcincludefreetdmh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/freetdm/src/include/freetdm.h (17471 => 17472)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/freetdm/src/include/freetdm.h        2010-05-03 11:24:31 UTC (rev 17471)
+++ freeswitch/trunk/libs/freetdm/src/include/freetdm.h        2010-05-03 16:15:18 UTC (rev 17472)
</span><span class="lines">@@ -634,7 +634,8 @@
</span><span class="cx"> * \brief Replace the given token with the new token
</span><span class="cx"> *
</span><span class="cx"> * \param ftdmchan The channel where the token is
</span><del>- * \param token The token string. If NULL, all tokens in the channel are cleared
</del><ins>+ * \param old_token The token to replace
+ * \param new_token The token to put in place
</ins><span class="cx"> */
</span><span class="cx"> FT_DECLARE(void) ftdm_channel_replace_token(ftdm_channel_t *ftdmchan, const char *old_token, const char *new_token);
</span><span class="cx">
</span><span class="lines">@@ -710,6 +711,7 @@
</span><span class="cx"> * \brief Get the current alarm bitmask for the channel
</span><span class="cx"> *
</span><span class="cx"> * \param ftdmchan The channel to get the alarm bitmask from
</span><ins>+ * \param alarmbits The alarm bitmask pointer to store the current alarms (you are responsible for allocation/deallocation)
</ins><span class="cx"> *
</span><span class="cx"> * \retval FTDM_SUCCESS success
</span><span class="cx"> * \retval FTDM_FAIL failure
</span><span class="lines">@@ -729,6 +731,8 @@
</span><span class="cx"> * \brief Get the channel type
</span><span class="cx"> *
</span><span class="cx"> * \param ftdmchan The channel to get the type from
</span><ins>+ * \param dtmf DTMF buffer to store the dtmf (you are responsible for its allocation and deallocation)
+ * \param len The size of the DTMF buffer
</ins><span class="cx"> *
</span><span class="cx"> * \retval channel type (FXO, FXS, B-channel, D-channel, etc)
</span><span class="cx"> */
</span><span class="lines">@@ -794,15 +798,13 @@
</span><span class="cx"> FT_DECLARE(ftdm_status_t) ftdm_span_find(uint32_t id, ftdm_span_t **span);
</span><span class="cx">
</span><span class="cx"> /*!
</span><del>- * \brief Find a span by its id
</del><ins>+ * \brief Get the last error string for the given span
</ins><span class="cx"> *
</span><del>- * \param id The span id
- * \param span Pointer to store the span if found
</del><ins>+ * \param span The span to get the last error from
</ins><span class="cx"> *
</span><del>- * \retval FTDM_SUCCESS success (span is valid)
- * \retval FTDM_FAIL failure (span is not valid)
</del><ins>+ * \retval character string for the last error
</ins><span class="cx"> */
</span><del>-FT_DECLARE(const char *) ftdm_span_get_last_error(const ftdm_span_t *ftdmchan);
</del><ins>+FT_DECLARE(const char *) ftdm_span_get_last_error(const ftdm_span_t *span);
</ins><span class="cx">
</span><span class="cx"> /*!
</span><span class="cx"> * \brief Create a new span (not needed if you are using freetdm.conf)
</span><span class="lines">@@ -958,9 +960,22 @@
</span><span class="cx"> /*!
</span><span class="cx"> * \brief Write data to a channel
</span><span class="cx"> *
</span><ins>+ * \note The difference between data and datasize is subtle but important.
+ *
+ * datalen is a pointer to the size of the actual data that you want to write. This pointer
+ * will be updated with the number of bytes actually written.
+ *
+ * datasize on the other hand is the size of the entire buffer provided in data, whether
+ * all of that buffer is in use or not is a different matter. The difference becomes
+ * important only if you are using FreeTDM doing transcoding, for example, providing
+ * a ulaw frame of 160 bytes but where the I/O device accepts input in signed linear,
+ * the data to write will be 320 bytes, therefore datasize is expected to be at least
+ * 320 where datalen would be just 160.
+ *
</ins><span class="cx"> * \param ftdmchan The channel to write data to
</span><span class="cx"> * \param data The pointer to the buffer to write
</span><del>- * \param datalen The size in bytes of the provided buffer
</del><ins>+ * \param datasize The maximum number of bytes in data that can be used (in case transcoding is necessary)
+ * \param datalen The size of the actual data
</ins><span class="cx"> *
</span><span class="cx"> * \retval FTDM_SUCCESS success (a suitable channel was found available)
</span><span class="cx"> * \retval FTDM_FAIL failure (no suitable channel was found available)
</span><span class="lines">@@ -1024,7 +1039,7 @@
</span><span class="cx"> * \param span The span to configure
</span><span class="cx"> * \param type The signaling type ("boost", "isdn" and others, this depends on the available signaling modules)
</span><span class="cx"> * \param sig_cb The callback that the signaling stack will use to notify about events
</span><del>- * \param ... variable argument list with "var", value sequence, the variable and values are signaling type dependant
</del><ins>+ * \param parameters The array if signaling-specific parameters (the last member of the array MUST have its var member set to NULL, ie: .var = NULL)
</ins><span class="cx"> *
</span><span class="cx"> * \retval FTDM_SUCCESS success
</span><span class="cx"> * \retval FTDM_FAIL failure
</span><span class="lines">@@ -1111,6 +1126,7 @@
</span><span class="cx"> /*!
</span><span class="cx"> * \brief Adds a new parameter to the specified configuration node
</span><span class="cx"> *
</span><ins>+ * \param node The configuration node to add the param-val pair to
</ins><span class="cx"> * \param param The parameter name
</span><span class="cx"> * \param val The parameter value
</span><span class="cx"> *
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>