]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Two stage renaming: Stage 2 completed.
authorJoão Mesquita <jmesquita@freeswitch.org>
Mon, 4 Jan 2010 22:07:20 +0000 (22:07 +0000)
committerJoão Mesquita <jmesquita@freeswitch.org>
Mon, 4 Jan 2010 22:07:20 +0000 (22:07 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16145 d0543943-73ff-0310-b7d9-9358b9ac24b2

fscomm/call.cpp
fscomm/call.h
fscomm/conf/freeswitch.xml
fscomm/fshost.cpp
fscomm/fshost.h
fscomm/main.cpp
fscomm/mainwindow.cpp
fscomm/mainwindow.ui

index 6d16a3fc7315e38400f92b0c0a032e25bb154844..fbb851d2d52c5596f74acbb304eaffb95f87cddc 100644 (file)
@@ -33,7 +33,7 @@ Call::Call()
 {
 }
 
-Call::Call(int call_id, QString cid_name, QString cid_number, fsphone_call_direction_t direction, QString uuid) :
+Call::Call(int call_id, QString cid_name, QString cid_number, fscomm_call_direction_t direction, QString uuid) :
         _call_id(call_id),
         _cid_name(cid_name),
         _cid_number(cid_number),
index 3cde87416b28f5735a796372126e882afa419701..65ca83b3792399f64fe65f6d4bf64c0e5a86510f 100644 (file)
 #include <fshost.h>
 
 typedef enum {
-    FSPHONE_CALL_STATE_RINGING = 0,
-    FSPHONE_CALL_STATE_TRYING  = 1,
-    FSPHONE_CALL_STATE_ANSWERED = 2
-} fsphone_call_state_t;
+    FSCOMM_CALL_STATE_RINGING = 0,
+    FSCOMM_CALL_STATE_TRYING  = 1,
+    FSCOMM_CALL_STATE_ANSWERED = 2
+} fscomm_call_state_t;
 
 typedef enum {
-        FSPHONE_CALL_DIRECTION_INBOUND = 0,
-        FSPHONE_CALL_DIRECTION_OUTBOUND = 1
-} fsphone_call_direction_t;
+        FSCOMM_CALL_DIRECTION_INBOUND = 0,
+        FSCOMM_CALL_DIRECTION_OUTBOUND = 1
+} fscomm_call_direction_t;
 
 class Call
 {
 public:
     Call(void);
-    Call(int call_id, QString cid_name, QString cid_number, fsphone_call_direction_t direction, QString uuid);
+    Call(int call_id, QString cid_name, QString cid_number, fscomm_call_direction_t direction, QString uuid);
     QString getCidName(void) { return _cid_name; }
     QString getCidNumber(void) { return _cid_number; }
     int getCallID(void) { return _call_id; }
     QString getUUID(void) { return _uuid; }
     void setbUUID(QString uuid) { _buuid = uuid; }
-    fsphone_call_direction_t getDirection() { return _direction; }
-    fsphone_call_state_t getState() { return _state; }
-    void setState(fsphone_call_state_t state) { _state = state; }
+    fscomm_call_direction_t getDirection() { return _direction; }
+    fscomm_call_state_t getState() { return _state; }
+    void setState(fscomm_call_state_t state) { _state = state; }
 
 private:
     int _call_id;
     QString _cid_name;
     QString _cid_number;
-    fsphone_call_direction_t _direction;
+    fscomm_call_direction_t _direction;
     QString _uuid;
     QString _buuid;
-    fsphone_call_state_t _state;
+    fscomm_call_state_t _state;
 };
 
 Q_DECLARE_METATYPE(Call)
index d7a382b136681b54402a4d0de39c711d86b1cca5..3ae6b1c81d921f7dcb3bf10ef08f91bbd9940312 100644 (file)
          </gateways>
          <settings>
            <!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
-           <param name="user-agent-string" value="FreeSWITCH/FSPhone"/>
+            <param name="user-agent-string" value="FreeSWITCH/FSComm"/>
            <!-- <param name="user-agent-string" value="FreeSWITCH Rocks!"/> -->
            <param name="debug" value="0"/>
            <param name="sip-trace" value="no"/>
index d592c4485ba179d288c0e81c097bebe6214bc3e4..77641c59d8f6534fa3391a06cb850c29123b2d31 100644 (file)
@@ -56,21 +56,21 @@ void FSHost::run(void)
 
     /* Create directory structure for softphone with default configs */
     QDir conf_dir = QDir(QDir::home());
-    if (!conf_dir.exists(".fsphone"))
+    if (!conf_dir.exists(".fscomm"))
     {
-        conf_dir.mkpath(".fsphone/conf/accounts");
-        conf_dir.mkpath(".fsphone/templates");
+        conf_dir.mkpath(".fscomm/conf/accounts");
+        conf_dir.mkpath(".fscomm/templates");
         QFile rootXML(":/confs/freeswitch.xml");
-        QString dest = QString("%1/.fsphone/conf/freeswitch.xml").arg(conf_dir.absolutePath());
+        QString dest = QString("%1/.fscomm/conf/freeswitch.xml").arg(conf_dir.absolutePath());
         rootXML.copy(dest);
 
         QFile defaultAccount(":/confs/example.xml");
-        dest = QString("%1/.fsphone/conf/accounts/example.xml").arg(conf_dir.absolutePath());
+        dest = QString("%1/.fscomm/conf/accounts/example.xml").arg(conf_dir.absolutePath());
         defaultAccount.copy(dest);
     }
 
     /* Set all directories to the home user directory */
-    if (conf_dir.cd(".fsphone"))
+    if (conf_dir.cd(".fscomm"))
     {
         SWITCH_GLOBAL_dirs.conf_dir = (char *) malloc(strlen(QString("%1/conf").arg(conf_dir.absolutePath()).toAscii().constData()) + 1);
         if (!SWITCH_GLOBAL_dirs.conf_dir) {
@@ -152,14 +152,14 @@ switch_status_t FSHost::processAlegEvent(switch_event_t * event, QString uuid)
     switch_status_t status = SWITCH_STATUS_SUCCESS;
     Call * call = _active_calls.value(uuid);
     /* Inbound call */
-    if (call->getDirection() == FSPHONE_CALL_DIRECTION_INBOUND)
+    if (call->getDirection() == FSCOMM_CALL_DIRECTION_INBOUND)
     {
         switch(event->event_id) {
         case SWITCH_EVENT_CHANNEL_ANSWER:
             {
                 call->setbUUID(switch_event_get_header_nil(event, "Other-Leg-Unique-ID"));
                 _bleg_uuids.insert(switch_event_get_header_nil(event, "Other-Leg-Unique-ID"), uuid);
-                call->setState(FSPHONE_CALL_STATE_ANSWERED);
+                call->setState(FSCOMM_CALL_STATE_ANSWERED);
                 emit answered(uuid);
                 break;
             }
@@ -192,7 +192,7 @@ switch_status_t FSHost::processAlegEvent(switch_event_t * event, QString uuid)
             }
         case SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE:
             {
-                if (call->getState() == FSPHONE_CALL_STATE_TRYING)
+                if (call->getState() == FSCOMM_CALL_STATE_TRYING)
                 {
                     emit callFailed(uuid);
                     _active_calls.take(uuid);
@@ -213,7 +213,7 @@ switch_status_t FSHost::processBlegEvent(switch_event_t * event, QString buuid)
     switch_status_t status = SWITCH_STATUS_SUCCESS;
     Call * call = _active_calls.value(uuid);
     /* Inbound call */
-    if (call->getDirection() == FSPHONE_CALL_DIRECTION_INBOUND)
+    if (call->getDirection() == FSCOMM_CALL_DIRECTION_INBOUND)
     {
         qDebug() << " Inbound call";
     }
@@ -237,7 +237,7 @@ switch_status_t FSHost::processBlegEvent(switch_event_t * event, QString buuid)
             {
                 if (QString(switch_event_get_header_nil(event, "Answer-State")) == "early")
                 {
-                    call->setState(FSPHONE_CALL_STATE_RINGING);
+                    call->setState(FSCOMM_CALL_STATE_RINGING);
                     emit ringing(uuid);
                 }
                 //printEventHeaders(event);
@@ -280,20 +280,20 @@ void FSHost::generalEventHandler(switch_event_t *event)
                 Call *call = new Call(atoi(switch_event_get_header_nil(event, "call_id")),
                                       switch_event_get_header_nil(event, "Caller-Caller-ID-Name"),
                                       switch_event_get_header_nil(event, "Caller-Caller-ID-Number"),
-                                      FSPHONE_CALL_DIRECTION_INBOUND,
+                                      FSCOMM_CALL_DIRECTION_INBOUND,
                                       uuid);
                 _active_calls.insert(uuid, call);
-                call->setState(FSPHONE_CALL_STATE_RINGING);
+                call->setState(FSCOMM_CALL_STATE_RINGING);
                 emit ringing(uuid);
             }
             else if (strcmp(event->subclass_name, "portaudio::makecall") == 0)
             {
                 Call *call = new Call(atoi(switch_event_get_header_nil(event, "call_id")),NULL,
                                       switch_event_get_header_nil(event, "Caller-Destination-Number"),
-                                      FSPHONE_CALL_DIRECTION_OUTBOUND,
+                                      FSCOMM_CALL_DIRECTION_OUTBOUND,
                                       uuid);
                 _active_calls.insert(uuid, call);
-                call->setState(FSPHONE_CALL_STATE_TRYING);
+                call->setState(FSCOMM_CALL_STATE_TRYING);
                 emit newOutgoingCall(uuid);
             }
             else if (strcmp(event->subclass_name, "sofia::gateway_state") == 0)
@@ -301,23 +301,23 @@ void FSHost::generalEventHandler(switch_event_t *event)
                 QString state = switch_event_get_header_nil(event, "State");
                 QString gw = switch_event_get_header_nil(event, "Gateway");
                 if (state == "TRYING")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_TRYING);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_TRYING);
                 else if (state == "REGISTER")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_REGISTER);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_REGISTER);
                 else if (state == "REGED")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_REGED);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_REGED);
                 else if (state == "UNREGED")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_UNREGED);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_UNREGED);
                 else if (state == "UNREGISTER")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_UNREGISTER);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_UNREGISTER);
                 else if (state =="FAILED")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_FAILED);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_FAILED);
                 else if (state == "FAIL_WAIT")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_FAIL_WAIT);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_FAIL_WAIT);
                 else if (state == "EXPIRED")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_EXPIRED);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_EXPIRED);
                 else if (state == "NOREG")
-                    emit gwStateChange(gw, FSPHONE_GW_STATE_NOREG);
+                    emit gwStateChange(gw, FSCOMM_GW_STATE_NOREG);
             }
             else
             {
index c3858cd8eda1488b1d5fe89527b3b9a24a4443c6..46336bb8b011879a5d280ee096ad97a2daf4a33d 100644 (file)
 
 class Call;
 
-#define FSPHONE_GW_STATE_TRYING 0
-#define FSPHONE_GW_STATE_REGISTER 1
-#define FSPHONE_GW_STATE_REGED 2
-#define FSPHONE_GW_STATE_UNREGED 3
-#define FSPHONE_GW_STATE_UNREGISTER 4
-#define FSPHONE_GW_STATE_FAILED 5
-#define FSPHONE_GW_STATE_FAIL_WAIT 6
-#define FSPHONE_GW_STATE_EXPIRED 7
-#define FSPHONE_GW_STATE_NOREG 8
+#define FSCOMM_GW_STATE_TRYING 0
+#define FSCOMM_GW_STATE_REGISTER 1
+#define FSCOMM_GW_STATE_REGED 2
+#define FSCOMM_GW_STATE_UNREGED 3
+#define FSCOMM_GW_STATE_UNREGISTER 4
+#define FSCOMM_GW_STATE_FAILED 5
+#define FSCOMM_GW_STATE_FAIL_WAIT 6
+#define FSCOMM_GW_STATE_EXPIRED 7
+#define FSCOMM_GW_STATE_NOREG 8
 
-static const char *fsphone_gw_state_names[] = {
+static const char *fscomm_gw_state_names[] = {
     "TRYING",
     "REGISTER",
     "REGED",
@@ -65,7 +65,7 @@ public:
     switch_status_t sendCmd(const char *cmd, const char *args, QString *res);
     void generalEventHandler(switch_event_t *event);
     Call * getCallByUUID(QString uuid) { return _active_calls.value(uuid, NULL); }
-    QString getGwStateName(int id) { return fsphone_gw_state_names[id]; }
+    QString getGwStateName(int id) { return fscomm_gw_state_names[id]; }
 
 protected:
     void run(void);
index 67154bb0369a2116eede47a18fdf5792df89ec9e..9f8c461c7e6382fcec9e9d2781f36a732c671c16 100644 (file)
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
     QApplication a(argc, argv);
     QCoreApplication::setOrganizationName("FreeSWITCH");
     QCoreApplication::setOrganizationDomain("freeswitch.org");
-    QCoreApplication::setApplicationName("FSPhone");
+    QCoreApplication::setApplicationName("FSComm");
 
     QPixmap image(":/images/splash.png");
     QSplashScreen *splash = new QSplashScreen(image);
index f460b0db8c28b1d0a2127ec88fe2cd9694f82eb5..162a8b9fcee7530256ce424d4c4663247132bea8 100644 (file)
@@ -257,7 +257,7 @@ void MainWindow::answered(QString uuid)
         QListWidgetItem *item = ui->listCalls->item(i);
         if (item->data(Qt::UserRole).toString() == uuid)
         {
-            if (call->getDirection() == FSPHONE_CALL_DIRECTION_INBOUND)
+            if (call->getDirection() == FSCOMM_CALL_DIRECTION_INBOUND)
             {
                 item->setText(tr("%1 (%2) - Active").arg(call->getCidName(), call->getCidNumber()));
                 break;
index 700c09358c2a1f88b586f4a0f0db0a8b7864e93f..3d08c612c774147bf28847d8ae6ba35157b2736d 100644 (file)
@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>FSPhone - A FreeSWITCH softphone</string>
+   <string>FSComm - A FreeSWITCH Communicator</string>
   </property>
   <widget class="QWidget" name="centralWidget">
    <layout class="QHBoxLayout" name="horizontalLayout_4">