<!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][17211] </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=17211">17211</a></dd>
<dt>Author</dt> <dd>jmesquita</dd>
<dt>Date</dt> <dd>2010-04-03 21:28:34 -0500 (Sat, 03 Apr 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a brand new codec config. Still needs i and h config.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkfscommFSCommpro">freeswitch/trunk/fscomm/FSComm.pro</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefdialogui">freeswitch/trunk/fscomm/preferences/prefdialog.ui</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefsofiacpp">freeswitch/trunk/fscomm/preferences/prefsofia.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>freeswitch/trunk/fscomm/widgets/</li>
<li><a href="#freeswitchtrunkfscommwidgetscodecwidgetcpp">freeswitch/trunk/fscomm/widgets/codecwidget.cpp</a></li>
<li><a href="#freeswitchtrunkfscommwidgetscodecwidgeth">freeswitch/trunk/fscomm/widgets/codecwidget.h</a></li>
<li><a href="#freeswitchtrunkfscommwidgetscodecwidgetui">freeswitch/trunk/fscomm/widgets/codecwidget.ui</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkfscommFSCommpro"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/FSComm.pro (17210 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/FSComm.pro        2010-04-02 21:40:24 UTC (rev 17210)
+++ freeswitch/trunk/fscomm/FSComm.pro        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -31,7 +31,8 @@
</span><span class="cx">     preferences/prefsofia.cpp \
</span><span class="cx">     preferences/accountdialog.cpp \
</span><span class="cx">     preferences/prefaccounts.cpp \
</span><del>-    account.cpp
</del><ins>+    account.cpp \
+    widgets/codecwidget.cpp
</ins><span class="cx"> HEADERS += mainwindow.h \
</span><span class="cx">     fshost.h \
</span><span class="cx">     call.h \
</span><span class="lines">@@ -41,9 +42,11 @@
</span><span class="cx">     preferences/prefsofia.h \
</span><span class="cx">     preferences/accountdialog.h \
</span><span class="cx">     preferences/prefaccounts.h \
</span><del>-    account.h
</del><ins>+    account.h \
+    widgets/codecwidget.h
</ins><span class="cx"> FORMS += mainwindow.ui \
</span><span class="cx">     preferences/prefdialog.ui \
</span><del>-    preferences/accountdialog.ui
</del><ins>+    preferences/accountdialog.ui \
+    widgets/codecwidget.ui
</ins><span class="cx"> RESOURCES += resources.qrc
</span><span class="cx"> OTHER_FILES += conf/freeswitch.xml
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefdialogui"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/prefdialog.ui (17210 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefdialog.ui        2010-04-02 21:40:24 UTC (rev 17210)
+++ freeswitch/trunk/fscomm/preferences/prefdialog.ui        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">        &lt;item&gt;
</span><span class="cx">         &lt;widget class=&quot;QTabWidget&quot; name=&quot;tabWidget&quot;&gt;
</span><span class="cx">          &lt;property name=&quot;currentIndex&quot;&gt;
</span><del>-          &lt;number&gt;2&lt;/number&gt;
</del><ins>+          &lt;number&gt;0&lt;/number&gt;
</ins><span class="cx">          &lt;/property&gt;
</span><span class="cx">          &lt;widget class=&quot;QWidget&quot; name=&quot;tab&quot;&gt;
</span><span class="cx">           &lt;attribute name=&quot;title&quot;&gt;
</span><span class="lines">@@ -490,28 +490,17 @@
</span><span class="cx">            &lt;string&gt;Codecs&lt;/string&gt;
</span><span class="cx">           &lt;/attribute&gt;
</span><span class="cx">           &lt;layout class=&quot;QFormLayout&quot; name=&quot;formLayout_7&quot;&gt;
</span><ins>+           &lt;property name=&quot;fieldGrowthPolicy&quot;&gt;
+            &lt;enum&gt;QFormLayout::AllNonFixedFieldsGrow&lt;/enum&gt;
+           &lt;/property&gt;
</ins><span class="cx">            &lt;item row=&quot;0&quot; column=&quot;0&quot;&gt;
</span><del>-            &lt;widget class=&quot;QLabel&quot; name=&quot;label_21&quot;&gt;
-             &lt;property name=&quot;text&quot;&gt;
-              &lt;string&gt;codec-prefs&lt;/string&gt;
-             &lt;/property&gt;
-            &lt;/widget&gt;
-           &lt;/item&gt;
-           &lt;item row=&quot;0&quot; column=&quot;1&quot;&gt;
-            &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaCodecPrefsEdit&quot;&gt;
-             &lt;property name=&quot;text&quot;&gt;
-              &lt;string&gt;CELT@48000h,G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM&lt;/string&gt;
-             &lt;/property&gt;
-            &lt;/widget&gt;
-           &lt;/item&gt;
-           &lt;item row=&quot;1&quot; column=&quot;0&quot;&gt;
</del><span class="cx">             &lt;widget class=&quot;QLabel&quot; name=&quot;label_30&quot;&gt;
</span><span class="cx">              &lt;property name=&quot;text&quot;&gt;
</span><span class="cx">               &lt;string&gt;inbound-codec-negotiation&lt;/string&gt;
</span><span class="cx">              &lt;/property&gt;
</span><span class="cx">             &lt;/widget&gt;
</span><span class="cx">            &lt;/item&gt;
</span><del>-           &lt;item row=&quot;1&quot; column=&quot;1&quot;&gt;
</del><ins>+           &lt;item row=&quot;0&quot; column=&quot;1&quot;&gt;
</ins><span class="cx">             &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaInboundCodecNegotiationCombo&quot;&gt;
</span><span class="cx">              &lt;item&gt;
</span><span class="cx">               &lt;property name=&quot;text&quot;&gt;
</span><span class="lines">@@ -525,15 +514,15 @@
</span><span class="cx">              &lt;/item&gt;
</span><span class="cx">             &lt;/widget&gt;
</span><span class="cx">            &lt;/item&gt;
</span><del>-           &lt;item row=&quot;2&quot; column=&quot;0&quot;&gt;
</del><ins>+           &lt;item row=&quot;1&quot; column=&quot;0&quot;&gt;
</ins><span class="cx">             &lt;widget class=&quot;QLabel&quot; name=&quot;label_42&quot;&gt;
</span><span class="cx">              &lt;property name=&quot;text&quot;&gt;
</span><span class="cx">               &lt;string&gt;Codecs&lt;/string&gt;
</span><span class="cx">              &lt;/property&gt;
</span><span class="cx">             &lt;/widget&gt;
</span><span class="cx">            &lt;/item&gt;
</span><del>-           &lt;item row=&quot;2&quot; column=&quot;1&quot;&gt;
-            &lt;widget class=&quot;QListWidget&quot; name=&quot;listAvailableCodecs&quot;/&gt;
</del><ins>+           &lt;item row=&quot;1&quot; column=&quot;1&quot;&gt;
+            &lt;widget class=&quot;CodecWidget&quot; name=&quot;sofiaProfileCodecWidget&quot; native=&quot;true&quot;/&gt;
</ins><span class="cx">            &lt;/item&gt;
</span><span class="cx">           &lt;/layout&gt;
</span><span class="cx">          &lt;/widget&gt;
</span><span class="lines">@@ -1028,6 +1017,14 @@
</span><span class="cx">    &lt;/item&gt;
</span><span class="cx">   &lt;/layout&gt;
</span><span class="cx">  &lt;/widget&gt;
</span><ins>+ &lt;customwidgets&gt;
+  &lt;customwidget&gt;
+   &lt;class&gt;CodecWidget&lt;/class&gt;
+   &lt;extends&gt;QWidget&lt;/extends&gt;
+   &lt;header&gt;widgets/codecwidget.h&lt;/header&gt;
+   &lt;container&gt;1&lt;/container&gt;
+  &lt;/customwidget&gt;
+ &lt;/customwidgets&gt;
</ins><span class="cx">  &lt;resources&gt;
</span><span class="cx">   &lt;include location=&quot;../resources.qrc&quot;/&gt;
</span><span class="cx">  &lt;/resources&gt;
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefsofiacpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/prefsofia.cpp (17210 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefsofia.cpp        2010-04-02 21:40:24 UTC (rev 17210)
+++ freeswitch/trunk/fscomm/preferences/prefsofia.cpp        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     _ui-&gt;sofiaSipPortSpin-&gt;setValue(settings.value(&quot;sip-port&quot;).toInt());
</span><span class="cx">     _ui-&gt;sofiaDialplanEdit-&gt;setText(settings.value(&quot;dialplan&quot;).toString());
</span><span class="cx">     _ui-&gt;sofiaDtmfDurationSpin-&gt;setValue(settings.value(&quot;dtmf-duration&quot;).toInt());
</span><del>-    _ui-&gt;sofiaCodecPrefsEdit-&gt;setText(settings.value(&quot;codec-prefs&quot;).toString());
</del><ins>+    _ui-&gt;sofiaProfileCodecWidget-&gt;setCodecString(settings.value(&quot;codec-prefs&quot;).toString());
</ins><span class="cx">     _ui-&gt;sofiaUseRtpTimerCombo-&gt;setCurrentIndex(_ui-&gt;sofiaUseRtpTimerCombo-&gt;findText(settings.value(&quot;use-rtp-timer&quot;).toString()));
</span><span class="cx">     _ui-&gt;sofiaRtpTimerNameEdit-&gt;setText(settings.value(&quot;rtp-timer-name&quot;).toString());
</span><span class="cx">     _ui-&gt;sofiaRtpIpEdit-&gt;setText(settings.value(&quot;rtp-ip&quot;).toString());
</span><span class="lines">@@ -68,15 +68,6 @@
</span><span class="cx">     settings.endGroup();
</span><span class="cx">     settings.endGroup();
</span><span class="cx"> 
</span><del>-    /* This is here to show the proper codec config! */
-    const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
-    uint32_t num_codecs = switch_loadable_module_get_codecs(codecs, sizeof(codecs) / sizeof(codecs[0]));
-    uint32_t x;
-
-    for (x = 0; x &lt; num_codecs; x++) {
-        _ui-&gt;listAvailableCodecs-&gt;addItem(codecs[x]-&gt;iananame);
-    }
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PrefSofia::writeConfig()
</span><span class="lines">@@ -110,7 +101,7 @@
</span><span class="cx">     settings.setValue(&quot;sip-port&quot;, _ui-&gt;sofiaSipPortSpin-&gt;value());
</span><span class="cx">     settings.setValue(&quot;dialplan&quot;, _ui-&gt;sofiaDialplanEdit-&gt;text());
</span><span class="cx">     settings.setValue(&quot;dtmf-duration&quot;, _ui-&gt;sofiaDtmfDurationSpin-&gt;value());
</span><del>-    settings.setValue(&quot;codec-prefs&quot;, _ui-&gt;sofiaCodecPrefsEdit-&gt;text());
</del><ins>+    settings.setValue(&quot;codec-prefs&quot;, _ui-&gt;sofiaProfileCodecWidget-&gt;getCodecString());
</ins><span class="cx">     settings.setValue(&quot;use-rtp-timer&quot;, _ui-&gt;sofiaUseRtpTimerCombo-&gt;currentText());
</span><span class="cx">     settings.setValue(&quot;rtp-timer-name&quot;, _ui-&gt;sofiaRtpTimerNameEdit-&gt;text());
</span><span class="cx">     settings.setValue(&quot;rtp-ip&quot;, _ui-&gt;sofiaRtpIpEdit-&gt;text());
</span></span></pre></div>
<a id="freeswitchtrunkfscommwidgetscodecwidgetcpp"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/fscomm/widgets/codecwidget.cpp (0 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/widgets/codecwidget.cpp                                (rev 0)
+++ freeswitch/trunk/fscomm/widgets/codecwidget.cpp        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -0,0 +1,148 @@
</span><ins>+#include &quot;codecwidget.h&quot;
+#include &quot;ui_codecwidget.h&quot;
+#include &quot;fshost.h&quot;
+
+CodecWidget::CodecWidget(QWidget *parent) :
+    QWidget(parent),
+    ui(new Ui::CodecWidget)
+{
+    ui-&gt;setupUi(this);
+    connect(ui-&gt;btnEnable, SIGNAL(clicked()), this, SLOT(enableCodecs()));
+    connect(ui-&gt;btnDisable, SIGNAL(clicked()), this, SLOT(disableCodecs()));
+    connect(ui-&gt;btnUp, SIGNAL(clicked()), this, SLOT(moveUp()));
+    connect(ui-&gt;btnDown, SIGNAL(clicked()), this, SLOT(moveDown()));
+    readCodecs();
+}
+
+CodecWidget::~CodecWidget()
+{
+    delete ui;
+}
+
+void CodecWidget::moveUp()
+{
+    QList&lt;QListWidgetItem *&gt;items = ui-&gt;listEnabledCodecs-&gt;selectedItems();
+    foreach(QListWidgetItem *item, items)
+    {
+        int row = ui-&gt;listEnabledCodecs-&gt;row(item);
+        if (row != 0)
+            ui-&gt;listEnabledCodecs-&gt;insertItem(row-1, ui-&gt;listEnabledCodecs-&gt;takeItem(row));
+    }
+}
+
+void CodecWidget::moveDown()
+{
+    QList&lt;QListWidgetItem *&gt;items = ui-&gt;listEnabledCodecs-&gt;selectedItems();
+    foreach(QListWidgetItem *item, items)
+    {
+        int row = ui-&gt;listEnabledCodecs-&gt;row(item);
+        if (row != ui-&gt;listEnabledCodecs-&gt;count())
+            ui-&gt;listEnabledCodecs-&gt;insertItem(row+1, ui-&gt;listEnabledCodecs-&gt;takeItem(row));
+    }
+}
+
+void CodecWidget::enableCodecs()
+{
+    QList&lt;QListWidgetItem *&gt;items = ui-&gt;listAvailCodecs-&gt;selectedItems();
+    foreach(QListWidgetItem *item, items)
+    {
+        ui-&gt;listEnabledCodecs-&gt;insertItem(0,item-&gt;text());
+        delete item;
+    }
+}
+
+void CodecWidget::disableCodecs()
+{
+    QList&lt;QListWidgetItem *&gt;items = ui-&gt;listEnabledCodecs-&gt;selectedItems();
+    foreach(QListWidgetItem *item, items)
+    {
+        ui-&gt;listAvailCodecs-&gt;insertItem(0,item-&gt;text());
+        delete item;
+    }
+}
+
+void CodecWidget::changeEvent(QEvent *e)
+{
+    QWidget::changeEvent(e);
+    switch (e-&gt;type()) {
+    case QEvent::LanguageChange:
+        ui-&gt;retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+void CodecWidget::readCodecs(void)
+{
+    /* This is here to show the proper codec config! */
+    const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
+    uint32_t num_codecs = switch_loadable_module_get_codecs(codecs, sizeof(codecs) / sizeof(codecs[0]));
+    uint32_t x;
+
+    for (x = 0; x &lt; num_codecs; x++) {
+
+        /* Codecs we cannot enable/disable or dont want to */
+        if (QString(codecs[x]-&gt;iananame) == &quot;PROXY&quot; ||
+            QString(codecs[x]-&gt;iananame) == &quot;PROXY-VID&quot;)
+        {
+            continue;
+        }
+
+        QList&lt;QHash&lt;QString, QString&gt; &gt; implList;
+        QHash&lt;QString, QString&gt; implPair;
+        implPair.insert(QString::number(codecs[x]-&gt;samples_per_second), QString::number(codecs[x]-&gt;microseconds_per_packet/1000));
+        implList.append(implPair);
+
+        /* Iterate over the other implementations */
+        switch_codec_implementation_t *curr = codecs[x]-&gt;next;
+        while (curr != NULL)
+        {
+            QHash&lt;QString, QString&gt; implPair;
+            implPair.insert(QString::number(curr-&gt;samples_per_second), QString::number(curr-&gt;microseconds_per_packet/1000));
+            implList.append(implPair);
+            curr = curr-&gt;next;
+        }
+        _listCodecs.insert(codecs[x]-&gt;iananame, implList);
+        ui-&gt;listAvailCodecs-&gt;insertItem(0, codecs[x]-&gt;iananame);
+    }
+    ui-&gt;listAvailCodecs-&gt;sortItems(Qt::AscendingOrder);
+}
+
+QString CodecWidget::getCodecString()
+{
+    QString codecList;
+    for(int i = 0; i&lt;ui-&gt;listEnabledCodecs-&gt;count(); i++)
+    {
+        QString codecName = ui-&gt;listEnabledCodecs-&gt;item(i)-&gt;text();
+        if (!_listCodecs.contains(codecName))
+            QMessageBox::warning(this, tr(&quot;Error&quot;), tr(&quot;Codec %1 does not exist as loaded codec, therefore will not be used.&quot;).arg(codecName), QMessageBox::Ok);
+        codecList += codecName;
+        if (i!= ui-&gt;listEnabledCodecs-&gt;count()-1)
+            codecList += &quot;,&quot;;
+    }
+    return codecList;
+}
+
+void CodecWidget::setCodecString(QString codecList)
+{
+    QStringList rawEnCodecs;
+    QStringList split = codecList.split(&quot;,&quot;);
+    foreach(QString s, split)
+    {
+        QStringList cs = s.split(&quot;@&quot;);
+        if (!rawEnCodecs.contains(cs[0]))
+        {
+            ui-&gt;listEnabledCodecs-&gt;insertItem(ui-&gt;listEnabledCodecs-&gt;count(), cs[0]);
+            rawEnCodecs.append(cs[0]);
+        }
+    }
+
+    foreach(QString c, rawEnCodecs)
+    {
+        foreach(QListWidgetItem *i, ui-&gt;listAvailCodecs-&gt;findItems(c, Qt::MatchExactly))
+        {
+            delete i;
+        }
+    }
+}
</ins></span></pre></div>
<a id="freeswitchtrunkfscommwidgetscodecwidgeth"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/fscomm/widgets/codecwidget.h (0 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/widgets/codecwidget.h                                (rev 0)
+++ freeswitch/trunk/fscomm/widgets/codecwidget.h        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+#ifndef CODECWIDGET_H
+#define CODECWIDGET_H
+
+#include &lt;QtGui&gt;
+
+namespace Ui {
+    class CodecWidget;
+}
+
+class CodecWidget : public QWidget {
+    Q_OBJECT
+public:
+    CodecWidget(QWidget *parent = 0);
+    ~CodecWidget();
+    QString getCodecString();
+    void setCodecString(QString);
+
+protected:
+    void changeEvent(QEvent *e);
+
+private slots:
+    void enableCodecs();
+    void disableCodecs();
+    void moveUp();
+    void moveDown();
+
+private:
+    void readCodecs(void);
+    Ui::CodecWidget *ui;
+    QHash&lt;QString, QList&lt;QHash&lt;QString, QString&gt; &gt; &gt; _listCodecs;
+};
+
+#endif // CODECWIDGET_H
</ins></span></pre></div>
<a id="freeswitchtrunkfscommwidgetscodecwidgetui"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/fscomm/widgets/codecwidget.ui (0 => 17211)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/widgets/codecwidget.ui                                (rev 0)
+++ freeswitch/trunk/fscomm/widgets/codecwidget.ui        2010-04-04 02:28:34 UTC (rev 17211)
</span><span class="lines">@@ -0,0 +1,157 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;ui version=&quot;4.0&quot;&gt;
+ &lt;class&gt;CodecWidget&lt;/class&gt;
+ &lt;widget class=&quot;QWidget&quot; name=&quot;CodecWidget&quot;&gt;
+  &lt;property name=&quot;geometry&quot;&gt;
+   &lt;rect&gt;
+    &lt;x&gt;0&lt;/x&gt;
+    &lt;y&gt;0&lt;/y&gt;
+    &lt;width&gt;612&lt;/width&gt;
+    &lt;height&gt;235&lt;/height&gt;
+   &lt;/rect&gt;
+  &lt;/property&gt;
+  &lt;property name=&quot;windowTitle&quot;&gt;
+   &lt;string&gt;Form&lt;/string&gt;
+  &lt;/property&gt;
+  &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout&quot;&gt;
+   &lt;item&gt;
+    &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_2&quot;&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QLabel&quot; name=&quot;label&quot;&gt;
+       &lt;property name=&quot;sizePolicy&quot;&gt;
+        &lt;sizepolicy hsizetype=&quot;Expanding&quot; vsizetype=&quot;Preferred&quot;&gt;
+         &lt;horstretch&gt;0&lt;/horstretch&gt;
+         &lt;verstretch&gt;0&lt;/verstretch&gt;
+        &lt;/sizepolicy&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;Available Codecs&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;alignment&quot;&gt;
+        &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QListWidget&quot; name=&quot;listAvailCodecs&quot;&gt;
+       &lt;property name=&quot;dragEnabled&quot;&gt;
+        &lt;bool&gt;true&lt;/bool&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;dragDropMode&quot;&gt;
+        &lt;enum&gt;QAbstractItemView::DragDrop&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;defaultDropAction&quot;&gt;
+        &lt;enum&gt;Qt::MoveAction&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;alternatingRowColors&quot;&gt;
+        &lt;bool&gt;true&lt;/bool&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;selectionMode&quot;&gt;
+        &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;sortingEnabled&quot;&gt;
+        &lt;bool&gt;true&lt;/bool&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+    &lt;/layout&gt;
+   &lt;/item&gt;
+   &lt;item&gt;
+    &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout&quot;&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QToolButton&quot; name=&quot;btnEnable&quot;&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;...&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;arrowType&quot;&gt;
+        &lt;enum&gt;Qt::RightArrow&lt;/enum&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QToolButton&quot; name=&quot;btnDisable&quot;&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;...&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;arrowType&quot;&gt;
+        &lt;enum&gt;Qt::LeftArrow&lt;/enum&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+    &lt;/layout&gt;
+   &lt;/item&gt;
+   &lt;item&gt;
+    &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_3&quot;&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QLabel&quot; name=&quot;label_2&quot;&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;Enabled Codecs&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;alignment&quot;&gt;
+        &lt;set&gt;Qt::AlignCenter&lt;/set&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QListWidget&quot; name=&quot;listEnabledCodecs&quot;&gt;
+       &lt;property name=&quot;dragEnabled&quot;&gt;
+        &lt;bool&gt;true&lt;/bool&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;dragDropMode&quot;&gt;
+        &lt;enum&gt;QAbstractItemView::DragDrop&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;defaultDropAction&quot;&gt;
+        &lt;enum&gt;Qt::MoveAction&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;alternatingRowColors&quot;&gt;
+        &lt;bool&gt;true&lt;/bool&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;selectionMode&quot;&gt;
+        &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;sortingEnabled&quot;&gt;
+        &lt;bool&gt;false&lt;/bool&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+    &lt;/layout&gt;
+   &lt;/item&gt;
+   &lt;item&gt;
+    &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_4&quot;&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QToolButton&quot; name=&quot;btnUp&quot;&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;...&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;arrowType&quot;&gt;
+        &lt;enum&gt;Qt::UpArrow&lt;/enum&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QToolButton&quot; name=&quot;btnAdv&quot;&gt;
+       &lt;property name=&quot;enabled&quot;&gt;
+        &lt;bool&gt;false&lt;/bool&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;...&lt;/string&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+     &lt;item&gt;
+      &lt;widget class=&quot;QToolButton&quot; name=&quot;btnDown&quot;&gt;
+       &lt;property name=&quot;text&quot;&gt;
+        &lt;string&gt;...&lt;/string&gt;
+       &lt;/property&gt;
+       &lt;property name=&quot;arrowType&quot;&gt;
+        &lt;enum&gt;Qt::DownArrow&lt;/enum&gt;
+       &lt;/property&gt;
+      &lt;/widget&gt;
+     &lt;/item&gt;
+    &lt;/layout&gt;
+   &lt;/item&gt;
+  &lt;/layout&gt;
+ &lt;/widget&gt;
+ &lt;resources/&gt;
+ &lt;connections/&gt;
+&lt;/ui&gt;
</ins></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>