From e6645a3dce84ac8516e5b169e20a5e31c89f3b8d Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> Date: Fri, 7 Sep 2007 15:16:59 -0400 Subject: [PATCH] Removed unused files --- src/Makefile.am | 3 +- src/gui/Makefile.am | 24 - src/gui/cli/LICENSE | 340 ----- src/gui/cli/Makefile.am | 23 - src/gui/cli/calls.c | 156 -- src/gui/cli/calls.h | 38 - src/gui/cli/commons.h | 12 - src/gui/cli/core.c | 69 - src/gui/cli/core.h | 8 - src/gui/cli/display.c | 30 - src/gui/cli/display.h | 25 - src/gui/cli/eventloop.c | 68 - src/gui/cli/eventloop.h | 6 - src/gui/cli/globals.c | 8 - src/gui/cli/globals.h | 11 - src/gui/cli/main.c | 46 - src/gui/cli/net.c | 46 - src/gui/cli/net.h | 8 - src/gui/cli/requests.c | 120 -- src/gui/cli/requests.h | 21 - src/gui/cli/seqs.c | 18 - src/gui/cli/seqs.h | 8 - src/gui/cli/setup.c | 92 -- src/gui/cli/setup.h | 6 - src/gui/cli/sflphone-events.c | 45 - src/gui/cli/sflphone-events.h | 7 - src/gui/cli/sflphone.c | 344 ----- src/gui/cli/sflphone.h | 25 - src/gui/cli/strutils.c | 93 -- src/gui/cli/strutils.h | 11 - src/gui/cli/user-input.c | 153 -- src/gui/cli/user-input.h | 8 - src/gui/guiframework.cpp | 250 ---- src/gui/guiframework.h | 105 -- src/gui/official/guiframework.cpp | 174 --- src/gui/official/guiframework.h | 116 -- src/gui/official/sflphoneclient.h | 120 -- src/gui/qt/Account.cpp | 61 - src/gui/qt/Account.hpp | 76 - src/gui/qt/Call.cpp | 141 -- src/gui/qt/Call.hpp | 142 -- src/gui/qt/CallManager.hpp | 30 - src/gui/qt/CallManagerImpl.cpp | 68 - src/gui/qt/CallManagerImpl.hpp | 53 - src/gui/qt/CallStatus.cpp | 56 - src/gui/qt/CallStatus.hpp | 41 - src/gui/qt/CallStatusFactory.hpp | 29 - src/gui/qt/ConfigurationManager.hpp | 30 - src/gui/qt/ConfigurationManagerImpl.cpp | 267 ---- src/gui/qt/ConfigurationManagerImpl.hpp | 209 --- src/gui/qt/ConfigurationPanel.ui | 1736 ----------------------- src/gui/qt/ConfigurationPanel.ui.h | 662 --------- src/gui/qt/ConfigurationPanelImpl.cpp | 73 - src/gui/qt/ConfigurationPanelImpl.hpp | 69 - src/gui/qt/DebugOutput.hpp | 30 - src/gui/qt/DebugOutputImpl.cpp | 32 - src/gui/qt/DebugOutputImpl.hpp | 36 - src/gui/qt/Event.cpp | 73 - src/gui/qt/Event.hpp | 66 - src/gui/qt/EventAccount.cpp | 52 - src/gui/qt/EventAccount.hpp | 41 - src/gui/qt/EventFactory.hpp | 98 -- src/gui/qt/EventFactory.inl | 95 -- src/gui/qt/Factory.hpp | 58 - src/gui/qt/Factory.inl | 52 - src/gui/qt/JPushButton.cpp | 153 -- src/gui/qt/JPushButton.hpp | 80 -- src/gui/qt/Launcher.cpp | 93 -- src/gui/qt/Launcher.hpp | 52 - src/gui/qt/Makefile.am | 144 -- src/gui/qt/NumericKeypad.cpp | 318 ----- src/gui/qt/NumericKeypad.hpp | 91 -- src/gui/qt/ObjectFactory.hpp | 98 -- src/gui/qt/ObjectFactory.inl | 95 -- src/gui/qt/ObjectPool.hpp | 53 - src/gui/qt/ObjectPool.inl | 51 - src/gui/qt/PhoneLine.cpp | 443 ------ src/gui/qt/PhoneLine.hpp | 181 --- src/gui/qt/PhoneLineButton.cpp | 95 -- src/gui/qt/PhoneLineButton.hpp | 75 - src/gui/qt/PhoneLineLocker.cpp | 39 - src/gui/qt/PhoneLineLocker.hpp | 51 - src/gui/qt/PhoneLineManager.hpp | 30 - src/gui/qt/PhoneLineManagerImpl.cpp | 849 ----------- src/gui/qt/PhoneLineManagerImpl.hpp | 363 ----- src/gui/qt/QjListBoxPixmap.cpp | 159 --- src/gui/qt/QjListBoxPixmap.hpp | 73 - src/gui/qt/Request.cpp | 248 ---- src/gui/qt/Request.hpp | 246 ---- src/gui/qt/Requester.hpp | 30 - src/gui/qt/RequesterImpl.cpp | 200 --- src/gui/qt/RequesterImpl.hpp | 149 -- src/gui/qt/RequesterImpl.inl | 40 - src/gui/qt/SFLCallStatus.hpp | 35 - src/gui/qt/SFLEvents.cpp | 169 --- src/gui/qt/SFLEvents.hpp | 130 -- src/gui/qt/SFLLcd.cpp | 320 ----- src/gui/qt/SFLLcd.hpp | 87 -- src/gui/qt/SFLPhoneApp.cpp | 284 ---- src/gui/qt/SFLPhoneApp.hpp | 75 - src/gui/qt/SFLPhoneWindow.cpp | 291 ---- src/gui/qt/SFLPhoneWindow.hpp | 146 -- src/gui/qt/SFLRequest.cpp | 449 ------ src/gui/qt/SFLRequest.hpp | 313 ---- src/gui/qt/Session.cpp | 232 --- src/gui/qt/Session.hpp | 155 -- src/gui/qt/SessionFactory.hpp | 56 - src/gui/qt/SessionIO.hpp | 63 - src/gui/qt/SessionIOFactory.hpp | 31 - src/gui/qt/SkinManager.hpp | 30 - src/gui/qt/SkinManagerImpl.cpp | 91 -- src/gui/qt/SkinManagerImpl.hpp | 69 - src/gui/qt/TCPSessionIO.cpp | 146 -- src/gui/qt/TCPSessionIO.hpp | 102 -- src/gui/qt/TCPSessionIOCreator.cpp | 39 - src/gui/qt/TCPSessionIOCreator.hpp | 41 - src/gui/qt/TransparentWidget.cpp | 125 -- src/gui/qt/TransparentWidget.hpp | 66 - src/gui/qt/Url.cpp | 65 - src/gui/qt/Url.hpp | 33 - src/gui/qt/VolumeControl.cpp | 173 --- src/gui/qt/VolumeControl.hpp | 75 - src/gui/qt/configurationpanelui.cpp | 1261 ---------------- src/gui/qt/globals.h | 66 - src/gui/qt/main.cpp | 81 -- src/gui/qt/url_inputui.cpp | 81 -- src/gui/server/Makefile.am | 13 - src/gui/server/ObjectPool.hpp | 56 - src/gui/server/ObjectPool.inl | 55 - src/gui/server/argtokenizer.cpp | 45 - src/gui/server/argtokenizer.h | 55 - src/gui/server/guiserver.h | 28 - src/gui/server/guiserverimpl.cpp | 387 ----- src/gui/server/guiserverimpl.h | 111 -- src/gui/server/request.cpp | 229 --- src/gui/server/request.h | 271 ---- src/gui/server/requestconfig.cpp | 322 ----- src/gui/server/requestconfig.h | 142 -- src/gui/server/requestfactory.cpp | 138 -- src/gui/server/requestfactory.h | 73 - src/gui/server/requestmanager.cpp | 153 -- src/gui/server/requestmanager.h | 58 - src/gui/server/responsemessage.cpp | 104 -- src/gui/server/responsemessage.h | 56 - src/gui/server/sessionio.cpp | 30 - src/gui/server/sessionio.h | 41 - src/gui/server/tcpsessionio.cpp | 83 -- src/gui/server/tcpsessionio.h | 49 - src/gui/server/tcpstreampool.cpp | 69 - src/gui/server/tcpstreampool.h | 58 - src/main.cpp | 2 - src/managerimpl.cpp | 1 - 152 files changed, 1 insertion(+), 19520 deletions(-) delete mode 100644 src/gui/Makefile.am delete mode 100644 src/gui/cli/LICENSE delete mode 100644 src/gui/cli/Makefile.am delete mode 100644 src/gui/cli/calls.c delete mode 100644 src/gui/cli/calls.h delete mode 100644 src/gui/cli/commons.h delete mode 100644 src/gui/cli/core.c delete mode 100644 src/gui/cli/core.h delete mode 100644 src/gui/cli/display.c delete mode 100644 src/gui/cli/display.h delete mode 100644 src/gui/cli/eventloop.c delete mode 100644 src/gui/cli/eventloop.h delete mode 100644 src/gui/cli/globals.c delete mode 100644 src/gui/cli/globals.h delete mode 100644 src/gui/cli/main.c delete mode 100644 src/gui/cli/net.c delete mode 100644 src/gui/cli/net.h delete mode 100644 src/gui/cli/requests.c delete mode 100644 src/gui/cli/requests.h delete mode 100644 src/gui/cli/seqs.c delete mode 100644 src/gui/cli/seqs.h delete mode 100644 src/gui/cli/setup.c delete mode 100644 src/gui/cli/setup.h delete mode 100644 src/gui/cli/sflphone-events.c delete mode 100644 src/gui/cli/sflphone-events.h delete mode 100644 src/gui/cli/sflphone.c delete mode 100644 src/gui/cli/sflphone.h delete mode 100644 src/gui/cli/strutils.c delete mode 100644 src/gui/cli/strutils.h delete mode 100644 src/gui/cli/user-input.c delete mode 100644 src/gui/cli/user-input.h delete mode 100644 src/gui/guiframework.cpp delete mode 100644 src/gui/guiframework.h delete mode 100644 src/gui/official/guiframework.cpp delete mode 100644 src/gui/official/guiframework.h delete mode 100644 src/gui/official/sflphoneclient.h delete mode 100644 src/gui/qt/Account.cpp delete mode 100644 src/gui/qt/Account.hpp delete mode 100644 src/gui/qt/Call.cpp delete mode 100644 src/gui/qt/Call.hpp delete mode 100644 src/gui/qt/CallManager.hpp delete mode 100644 src/gui/qt/CallManagerImpl.cpp delete mode 100644 src/gui/qt/CallManagerImpl.hpp delete mode 100644 src/gui/qt/CallStatus.cpp delete mode 100644 src/gui/qt/CallStatus.hpp delete mode 100644 src/gui/qt/CallStatusFactory.hpp delete mode 100644 src/gui/qt/ConfigurationManager.hpp delete mode 100644 src/gui/qt/ConfigurationManagerImpl.cpp delete mode 100644 src/gui/qt/ConfigurationManagerImpl.hpp delete mode 100644 src/gui/qt/ConfigurationPanel.ui delete mode 100644 src/gui/qt/ConfigurationPanel.ui.h delete mode 100644 src/gui/qt/ConfigurationPanelImpl.cpp delete mode 100644 src/gui/qt/ConfigurationPanelImpl.hpp delete mode 100644 src/gui/qt/DebugOutput.hpp delete mode 100644 src/gui/qt/DebugOutputImpl.cpp delete mode 100644 src/gui/qt/DebugOutputImpl.hpp delete mode 100644 src/gui/qt/Event.cpp delete mode 100644 src/gui/qt/Event.hpp delete mode 100644 src/gui/qt/EventAccount.cpp delete mode 100644 src/gui/qt/EventAccount.hpp delete mode 100644 src/gui/qt/EventFactory.hpp delete mode 100644 src/gui/qt/EventFactory.inl delete mode 100644 src/gui/qt/Factory.hpp delete mode 100644 src/gui/qt/Factory.inl delete mode 100644 src/gui/qt/JPushButton.cpp delete mode 100644 src/gui/qt/JPushButton.hpp delete mode 100644 src/gui/qt/Launcher.cpp delete mode 100644 src/gui/qt/Launcher.hpp delete mode 100644 src/gui/qt/Makefile.am delete mode 100644 src/gui/qt/NumericKeypad.cpp delete mode 100644 src/gui/qt/NumericKeypad.hpp delete mode 100644 src/gui/qt/ObjectFactory.hpp delete mode 100644 src/gui/qt/ObjectFactory.inl delete mode 100644 src/gui/qt/ObjectPool.hpp delete mode 100644 src/gui/qt/ObjectPool.inl delete mode 100644 src/gui/qt/PhoneLine.cpp delete mode 100644 src/gui/qt/PhoneLine.hpp delete mode 100644 src/gui/qt/PhoneLineButton.cpp delete mode 100644 src/gui/qt/PhoneLineButton.hpp delete mode 100644 src/gui/qt/PhoneLineLocker.cpp delete mode 100644 src/gui/qt/PhoneLineLocker.hpp delete mode 100644 src/gui/qt/PhoneLineManager.hpp delete mode 100644 src/gui/qt/PhoneLineManagerImpl.cpp delete mode 100644 src/gui/qt/PhoneLineManagerImpl.hpp delete mode 100644 src/gui/qt/QjListBoxPixmap.cpp delete mode 100644 src/gui/qt/QjListBoxPixmap.hpp delete mode 100644 src/gui/qt/Request.cpp delete mode 100644 src/gui/qt/Request.hpp delete mode 100644 src/gui/qt/Requester.hpp delete mode 100644 src/gui/qt/RequesterImpl.cpp delete mode 100644 src/gui/qt/RequesterImpl.hpp delete mode 100644 src/gui/qt/RequesterImpl.inl delete mode 100644 src/gui/qt/SFLCallStatus.hpp delete mode 100644 src/gui/qt/SFLEvents.cpp delete mode 100644 src/gui/qt/SFLEvents.hpp delete mode 100644 src/gui/qt/SFLLcd.cpp delete mode 100644 src/gui/qt/SFLLcd.hpp delete mode 100644 src/gui/qt/SFLPhoneApp.cpp delete mode 100644 src/gui/qt/SFLPhoneApp.hpp delete mode 100644 src/gui/qt/SFLPhoneWindow.cpp delete mode 100644 src/gui/qt/SFLPhoneWindow.hpp delete mode 100644 src/gui/qt/SFLRequest.cpp delete mode 100644 src/gui/qt/SFLRequest.hpp delete mode 100644 src/gui/qt/Session.cpp delete mode 100644 src/gui/qt/Session.hpp delete mode 100644 src/gui/qt/SessionFactory.hpp delete mode 100644 src/gui/qt/SessionIO.hpp delete mode 100644 src/gui/qt/SessionIOFactory.hpp delete mode 100644 src/gui/qt/SkinManager.hpp delete mode 100644 src/gui/qt/SkinManagerImpl.cpp delete mode 100644 src/gui/qt/SkinManagerImpl.hpp delete mode 100644 src/gui/qt/TCPSessionIO.cpp delete mode 100644 src/gui/qt/TCPSessionIO.hpp delete mode 100644 src/gui/qt/TCPSessionIOCreator.cpp delete mode 100644 src/gui/qt/TCPSessionIOCreator.hpp delete mode 100644 src/gui/qt/TransparentWidget.cpp delete mode 100644 src/gui/qt/TransparentWidget.hpp delete mode 100644 src/gui/qt/Url.cpp delete mode 100644 src/gui/qt/Url.hpp delete mode 100644 src/gui/qt/VolumeControl.cpp delete mode 100644 src/gui/qt/VolumeControl.hpp delete mode 100644 src/gui/qt/configurationpanelui.cpp delete mode 100644 src/gui/qt/globals.h delete mode 100644 src/gui/qt/main.cpp delete mode 100644 src/gui/qt/url_inputui.cpp delete mode 100644 src/gui/server/Makefile.am delete mode 100644 src/gui/server/ObjectPool.hpp delete mode 100644 src/gui/server/ObjectPool.inl delete mode 100644 src/gui/server/argtokenizer.cpp delete mode 100644 src/gui/server/argtokenizer.h delete mode 100644 src/gui/server/guiserver.h delete mode 100644 src/gui/server/guiserverimpl.cpp delete mode 100644 src/gui/server/guiserverimpl.h delete mode 100644 src/gui/server/request.cpp delete mode 100644 src/gui/server/request.h delete mode 100644 src/gui/server/requestconfig.cpp delete mode 100644 src/gui/server/requestconfig.h delete mode 100644 src/gui/server/requestfactory.cpp delete mode 100644 src/gui/server/requestfactory.h delete mode 100644 src/gui/server/requestmanager.cpp delete mode 100644 src/gui/server/requestmanager.h delete mode 100644 src/gui/server/responsemessage.cpp delete mode 100644 src/gui/server/responsemessage.h delete mode 100644 src/gui/server/sessionio.cpp delete mode 100644 src/gui/server/sessionio.h delete mode 100644 src/gui/server/tcpsessionio.cpp delete mode 100644 src/gui/server/tcpsessionio.h delete mode 100644 src/gui/server/tcpstreampool.cpp delete mode 100644 src/gui/server/tcpstreampool.h diff --git a/src/Makefile.am b/src/Makefile.am index 8a4f8ed305..e9ddec6295 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,7 +28,7 @@ IAXSOURCES = IAXHEADERS = endif -SUBDIRS = audio config gui dbus $(ZEROCONFDIR) +SUBDIRS = audio config dbus $(ZEROCONFDIR) sflphoned_SOURCES = eventthread.cpp main.cpp voiplink.cpp \ managerimpl.cpp observer.cpp \ @@ -48,7 +48,6 @@ libsflphone_la_LIBADD = \ $(top_builddir)/libs/stund/libstun.la \ $(top_builddir)/libs/utilspp/libutilspp.la \ ./audio/libaudio.la \ - ./gui/libguiframework.la \ ./dbus/libdbus.la \ ./config/libconfig.la \ $(IAX_LIBS) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am deleted file mode 100644 index 32ef328ecf..0000000000 --- a/src/gui/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -serverdir = server -serverlib = server/libsflphoneguiserver.la - -if WITH_QT -qtdir = qt -else -qtdir = -endif - -#libexec_PROGRAMS = qt/sflphone-qt - -#qt/sflphone-qt: -# cd qt && make - - -SUBDIRS = $(serverdir) $(qtdir) cli - -noinst_LTLIBRARIES = libguiframework.la - -libguiframework_la_SOURCES = guiframework.cpp guiframework.h - -libguiframework_la_CPPFLAGS = -I$(top_srcdir)/libs -I$(top_srcdir)/src -libguiframework_la_CXXFLAGS = $(libccext2_CFLAGS) $(libdbuscpp_CFLAGS) -libguiframework_la_LIBADD = $(serverlib) diff --git a/src/gui/cli/LICENSE b/src/gui/cli/LICENSE deleted file mode 100644 index 2ba72d57f6..0000000000 --- a/src/gui/cli/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/src/gui/cli/Makefile.am b/src/gui/cli/Makefile.am deleted file mode 100644 index e5af95d521..0000000000 --- a/src/gui/cli/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -libexec_PROGRAMS = sflphone-cli - -#-lncurses -sflphone_cli_LDADD = $(LIBREADLINE) -#AM_LDFLAGS = $(LIBREADLINE) -sflphone_cli_SOURCES = \ - calls.c calls.h \ - commons.h \ - core.c core.h \ - display.c display.h \ - eventloop.c eventloop.h \ - globals.c globals.h \ - main.c \ - net.c net.h \ - requests.c requests.h \ - seqs.c seqs.h \ - setup.c setup.h \ - sflphone.c \ - sflphone-events.c sflphone-events.h \ - sflphone.h \ - strutils.c strutils.h \ - user-input.c user-input.h - diff --git a/src/gui/cli/calls.c b/src/gui/cli/calls.c deleted file mode 100644 index 9ea7c6b6a0..0000000000 --- a/src/gui/cli/calls.c +++ /dev/null @@ -1,156 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "calls.h" -#include "display.h" - -// malloc a new call -static struct call *new_call (char *, char *, char *); -void delete_call (struct call*); -static char *cstate2str (int); - -static callobj *calls_list = NULL; -char *current_cid = NULL; - - -callobj * -call_push_new (char *seqid, char *callid, char *destination) { - callobj *new; - - new = new_call (seqid, callid, destination); - - // Add call to the list. - if (calls_list == NULL) { - calls_list = new; - } else { - new->next = calls_list; - calls_list = new; - } - current_cid = new->cid; - - return new; -} - -int -call_pop( char *call_id ) -{ - callobj *cptr = calls_list; - callobj *previous = NULL; - - if (cptr == NULL) { - return 0; - } - - while (cptr != NULL) { - if ( 0 == strcmp(call_id, cptr->cid) ) { - if ( previous == NULL ) { // the root is the next one - calls_list = cptr->next; - } else { // the previous next is the current one next - previous->next = cptr->next; - } - current_cid = NULL; - delete_call(cptr); // free memory - return 1; - } - previous = cptr; - cptr = cptr->next; - } - return 0; -} - -void -call_change_state (char *call_id, int state) -{ - callobj *cptr = calls_list; - - while (cptr != NULL) { - if ( 0 == strcmp(call_id, cptr->cid) ) { - cptr->state = state; - current_cid = cptr->cid; - return; - } - cptr = cptr->next; - } -} - -void -call_print_list (void) { - callobj *cptr = calls_list; - - if (cptr == NULL) { - display_info ("No call currently in progress !"); - return; - } - - display_info ("Calls in progress:"); - while (cptr != NULL) { - display_info ("* (%s) [%s] %s", cstate2str (cptr->state), - cptr->cid, cptr->dest); - cptr = cptr->next; - } -} - - -/******************************** - * PRIVATE FUNCTIONS * - ********************************/ -static char * -cstate2str (int state) { - switch (state) { - case TALKING: - return "Talking"; - break; - - case ON_HOLD: - return "On Hold"; - break; - - case CALLING: - default: - return "Calling"; - break; - } -} - -// Malloc new call descriptor -static struct call * -new_call (char *seqid, char *cid, char *destination) { - int len; - struct call *new; - - new = malloc (sizeof (struct call)); - if (new == NULL) { - perror ("malloc"); - exit (1); - } - - // Erase memory and put state to 0 - bzero (new, sizeof (struct call)); - - // Put cid - len = (strlen(cid) > (CIDMAX - 1)) ? (CIDMAX - 1) : strlen(cid); - strncpy (new->cid, cid, len); - - // Put seq id - len = (strlen(seqid) > (CIDMAX - 1)) ? (CIDMAX - 1) : strlen(seqid); - strncpy (new->sid, seqid, len); - - // Put dest - if (destination != NULL) { - new->dest = strdup (destination); - } - - return new; -} - -void -delete_call (struct call* call) -{ - if (call != NULL) { - call->next = NULL; - free(call->dest); call->dest = NULL; - free(call); - } -} - -/* EOF */ diff --git a/src/gui/cli/calls.h b/src/gui/cli/calls.h deleted file mode 100644 index 158b835c83..0000000000 --- a/src/gui/cli/calls.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __CALLS_H__ -#define __CALLS_H__ - -#define CIDMAX 32 - -enum callstate { - CALLING = 0, - TALKING, - ON_HOLD -}; - -struct call { - struct call *next; - char *dest; - char cid[CIDMAX]; - char sid[CIDMAX]; - enum callstate state; -}; - -typedef struct call callobj; - -void call_print_list (void); -callobj *call_push_new (char *, char *, char *); -// -// remove a call from the list (and free memory) -// @param call id -// @return the number of call removed -// -int call_pop (char *); - -// -// change the state of a call, with is call id -// @param call id -// @param state -// -void call_change_state (char *, int); - -#endif // __CALLS_H__ diff --git a/src/gui/cli/commons.h b/src/gui/cli/commons.h deleted file mode 100644 index 245ce91959..0000000000 --- a/src/gui/cli/commons.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __COMMONS_H__ -#define __COMMONS_H__ -#include <strings.h> - -#define CONNECT_HOST "127.0.0.1" -#define CONNECT_PORT 3999 -#define FOREVER for(;;) - -#define IF_INIT if(0) -#define IF_GOT(STRING) else if (0 == strncasecmp (ibuf, STRING, strlen(STRING))) - -#endif // __COMMONS_H__ diff --git a/src/gui/cli/core.c b/src/gui/cli/core.c deleted file mode 100644 index afcdbb09b5..0000000000 --- a/src/gui/cli/core.c +++ /dev/null @@ -1,69 +0,0 @@ -#include <sys/types.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include "core.h" -#include "display.h" - -#define SFLPHONED_NAME "sflphoned" - -static char *core_path; -static int find_core (void); - -/* Runs the sflphone core daemon */ -int -run_core (void) { - int ret; - - if (!find_core ()) { - display_info ("Unable to find %s.", SFLPHONED_NAME); - display_info ("Point $SFLPHONE_CORE_DIR to its directory."); - exit (1); - } - - if (core_path == NULL) { - return -1; - } - - ret = fork (); - switch (ret) { - case 0: - /* core process */ - execl (core_path, NULL, NULL); - exit (0); - break; - case -1: - /* error */ - display_info ("Unable to fork(), call 911."); - exit (1); - default: - /* original process */ - sleep (1); /* Wait for core to init. */ - break; - } - return ret; -} - -/* Find the core sflphoned and set the full path */ -static int -find_core (void) { - char *envar; - - envar = getenv ("SFLPHONE_CORE_DIR"); - if (envar == NULL) { - return 0; - } - - core_path = (char *) malloc (strlen (envar) + 3 + strlen (SFLPHONED_NAME)); - if (core_path == NULL) { - return 0; - } - - snprintf (core_path, strlen (envar) + 3 + strlen (SFLPHONED_NAME), - "%s/%s", envar, SFLPHONED_NAME); - return 1; -} - -/* EOF */ diff --git a/src/gui/cli/core.h b/src/gui/cli/core.h deleted file mode 100644 index a21ce6462f..0000000000 --- a/src/gui/cli/core.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __CORE_H__ -#define __CORE_H__ - -#define CORE_PATH "/opt/SFLphone/bin/sflphoned" - -int run_core (void); - -#endif // __CORE_H__ diff --git a/src/gui/cli/display.c b/src/gui/cli/display.c deleted file mode 100644 index 686c12845e..0000000000 --- a/src/gui/cli/display.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> - -#include "display.h" - -#ifdef USE_ANSI -# define PROMPT "[1;36;40mSFL[0;36;40mphone[0m>" -#else -# define PROMPT "SFLphone>" -#endif - -// Display the SFLphone> prompt -void -display_prompt (void) { - printf ("%s ", PROMPT); - fflush (stdout); -} - -// Display incoming call info -void -display_inc_call (char *from) { - printf ("\r"); -#ifdef USE_ANSI - printf ("[1;37;45m***[1;33;44m Incoming Call from %s " - "[1;37;45m***[0m\n", from); -#else - printf ("*** Incoming Call from %s ***\n", from); -#endif -} - -/* EOF */ diff --git a/src/gui/cli/display.h b/src/gui/cli/display.h deleted file mode 100644 index df981fcfd6..0000000000 --- a/src/gui/cli/display.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __DISPLAY_H__ -#define __DISPLAY_H__ - -#ifdef DEBUG -#include <stdio.h> -# ifdef USE_ANSI -# define debug(...) fprintf (stderr, "\r[33m[debug][0m " __VA_ARGS__) -# else -# define debug(...) fprintf (stderr, "\r[debug] " __VA_ARGS__) -# endif -#else -# define debug(...) -#endif - -void display_prompt (void); -void display_inc_call (char *); - - -#ifdef USE_ANSI -# define display_info(...) printf("[1;33;40m[Info] " __VA_ARGS__);printf("[0m\n"); -#else -#define display_info(...) printf ("[Info] " __VA_ARGS__);printf("\n"); -#endif - -#endif // __DISPLAY_H__ diff --git a/src/gui/cli/eventloop.c b/src/gui/cli/eventloop.c deleted file mode 100644 index 792f02c6a7..0000000000 --- a/src/gui/cli/eventloop.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <sys/select.h> -#include <stdio.h> - -#include "commons.h" -#include "display.h" -#include "globals.h" -#include "user-input.h" -#include "sflphone.h" -#include "sflphone-events.h" - -int -event_loop (int socket) { - fd_set rfds, - wfds; - - /* get socket as FILE */ - fdsocket = fdopen (socket, "a+"); - if (fdsocket == NULL) { - perror ("fdopen"); - return -1; - } - - /* Ask SFLphone's core version */ - sflphone_ask_version (); - sflphone_get_events(); - - /* Main event loop */ - display_prompt (); - FOREVER { - FD_ZERO (&rfds); - FD_ZERO (&wfds); - FD_SET (socket, &rfds); // Watch socket - FD_SET (0, &rfds); // Watch stdin - - /* Wait for input, forever */ - select (socket+1, &rfds, NULL, NULL, NULL); - - /* React to socket input */ - if (FD_ISSET (socket, &rfds)) { - if (feof (fdsocket)) { - display_info ("SFLphone core closed the link. " - "Shutting down."); - break; - } else { - handle_event (); - } - } - - /* React to user input */ - if (FD_ISSET (0, &rfds)) { - if (handle_input () < 0) { - /* Exit if handle_input tells to. */ - break; - } - - // Break on EOF - if (feof (stdin)) { - display_info ("Got EOF. Bye bye !\n"); - break; - } - display_prompt (); - } - } - - return 0; -} - -/* EOF */ diff --git a/src/gui/cli/eventloop.h b/src/gui/cli/eventloop.h deleted file mode 100644 index f318bb08ea..0000000000 --- a/src/gui/cli/eventloop.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __EVENTLOOP_H__ -#define __EVENTLOOP_H__ - -int event_loop (int); - -#endif // __EVENTLOOP_H__ diff --git a/src/gui/cli/globals.c b/src/gui/cli/globals.c deleted file mode 100644 index cf4257a321..0000000000 --- a/src/gui/cli/globals.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <stdio.h> - -#include "globals.h" - -FILE *fdsocket = NULL; -int core_pid = 0; - -/* EOF */ diff --git a/src/gui/cli/globals.h b/src/gui/cli/globals.h deleted file mode 100644 index df6d83daef..0000000000 --- a/src/gui/cli/globals.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __GLOBALS_H__ -#define __GLOBALS_H__ - -#include <stdio.h> - -extern FILE *fdsocket; -extern int core_pid; - -#define DEFAULT_ACCOUNT "SIP0" - -#endif // __GLOBALS_H__ diff --git a/src/gui/cli/main.c b/src/gui/cli/main.c deleted file mode 100644 index 0e1bf8d57c..0000000000 --- a/src/gui/cli/main.c +++ /dev/null @@ -1,46 +0,0 @@ -#include <stdio.h> -#include <unistd.h> - -#include "commons.h" -#include "core.h" -#include "display.h" -#include "eventloop.h" -#include "globals.h" -#include "net.h" - -#define MAX_RETRIES 5 - -int -main (int argc, char **argv) { - int socket; - int launched = 0; - int retry = 0; - - /* Init */ - - /* Connect */ - do { - //display_info ("Connecting to %s:%d...\n", CONNECT_HOST, CONNECT_PORT); - socket = create_socket (CONNECT_HOST, CONNECT_PORT); - if (socket < 0) { - if (!launched) { - // Attempt to launch sflphone. - launched = 1; - //display_info ("Attempting to run sflphoned."); - core_pid = run_core (); - } else { - sleep (1); - } - } else { - break; - } - retry++; - } while (retry < MAX_RETRIES); - - if (retry < MAX_RETRIES) { - return event_loop (socket); - } else { - display_info ("Cannot run sflphone daemon !"); - return 1; - } -} diff --git a/src/gui/cli/net.c b/src/gui/cli/net.c deleted file mode 100644 index 9888db0c5e..0000000000 --- a/src/gui/cli/net.c +++ /dev/null @@ -1,46 +0,0 @@ -#include <sys/types.h> -#include <sys/socket.h> -#include <netdb.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> - - -int global_socket; - -int -create_socket (char *hostname, unsigned short portnum) { - struct hostent *hp; - struct sockaddr_in sa; - int sock; - - /* Check destination */ - if ((hp = gethostbyname (hostname)) == NULL) { - perror ("gethostbyname"); - return (-1); - } - - /* Alloc socket */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) { - perror ("socket"); - return (-1); - } - - /* Setup socket */ - bzero (&sa, sizeof(sa)); - bcopy (hp->h_addr, (char *)&sa.sin_addr, hp->h_length); - sa.sin_family = hp->h_addrtype; - sa.sin_port = htons ((unsigned short)portnum); - - /* Connect to sflphone */ - if (connect (sock, (const struct sockaddr *) &sa, sizeof(sa)) < 0) { - close(sock); - perror ("connect"); - return(-1); - } - - return (sock); -} - -/* EOF */ diff --git a/src/gui/cli/net.h b/src/gui/cli/net.h deleted file mode 100644 index e8b33060a1..0000000000 --- a/src/gui/cli/net.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __NET__H__ -#define __NET__H__ - -extern int global_socket; - -int create_socket (char *, unsigned short); - -#endif // __NET__H__ diff --git a/src/gui/cli/requests.c b/src/gui/cli/requests.c deleted file mode 100644 index 5c2276b69b..0000000000 --- a/src/gui/cli/requests.c +++ /dev/null @@ -1,120 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "requests.h" - -// malloc a new request -static struct request *new_request (char *, char *, void *); - -static reqobj *requests_list = NULL; - - -// Malloc new request -static struct request * -new_request (char *rid, char *subject, void *payload) { - int len; - struct request *req; - - req = malloc (sizeof (struct request)); - if (req == NULL) { - perror ("malloc"); - exit (1); - } - - // Erase memory - bzero (req, sizeof (struct request)); - - // Put rid - len = (strlen(rid) > (RIDMAX-1)) ? (RIDMAX-1) : strlen(rid); - strncpy (req->rid, rid, len); - - // Put subject - req->subject = strdup (subject); - - // Attach payload - if (payload != NULL) { - req->payload = payload; - } - - return req; -} - -void -request_push (int id, char *subject, void *payload) { - reqobj *newreq; - char tmp[RIDMAX]; - - snprintf (tmp, RIDMAX - 1, "seq%d", id); - - newreq = (reqobj *) new_request (tmp, subject, payload); - if (requests_list == NULL) { - // First item - requests_list = newreq; - } else { - // Add to the beginning of the list. - newreq->next = requests_list->next; - requests_list = newreq; - } -} - -reqobj * -request_find (char *sid) { - reqobj *candidate; - - if (requests_list == NULL) { - return NULL; - } - - candidate = requests_list; - - while (candidate != NULL) { - if (0 == strcmp (sid, candidate->rid)) { - return candidate; - } - candidate = candidate->next; - } - - // Not found - return NULL; -} - -reqobj * -request_pop (char *sid) { - reqobj *candidate; - reqobj *prev; - - if (requests_list == NULL) { - return NULL; - } - - candidate = prev = requests_list; - - while (candidate != NULL) { - if (0 == strcmp (sid, candidate->rid)) { - // dequeue - if (candidate == requests_list) { - requests_list = candidate->next; - } else { - prev->next = candidate->next; - } - return candidate; - } - - prev = candidate; - candidate = candidate->next; - } - - // Not found - return NULL; -} - -void -request_free (reqobj *item) { - if (item->subject != NULL) { - free (item->subject); - } - - free (item); -} - -/* EOF */ diff --git a/src/gui/cli/requests.h b/src/gui/cli/requests.h deleted file mode 100644 index beccdcd743..0000000000 --- a/src/gui/cli/requests.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __REQUESTS_H__ -#define __REQUESTS_H__ - -#define RIDMAX 32 - -struct request { - struct request *next; - char *subject; - char rid[RIDMAX]; - void *payload; -}; - -typedef struct request reqobj; - - -void request_free (reqobj *); -void request_push (int, char *, void *); -reqobj *request_pop (char *); -reqobj *request_find (char *); - -#endif // __REQUESTS_H__ diff --git a/src/gui/cli/seqs.c b/src/gui/cli/seqs.c deleted file mode 100644 index abad8a0401..0000000000 --- a/src/gui/cli/seqs.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "seqs.h" - - -unsigned int -get_next_seq (void) { - static unsigned int i = 0; - - return i++; -} - -unsigned int -get_next_callid (void) { - static unsigned int i = 0; - - return i++; -} - -/* EOF */ diff --git a/src/gui/cli/seqs.h b/src/gui/cli/seqs.h deleted file mode 100644 index 9cf16db963..0000000000 --- a/src/gui/cli/seqs.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __SEQS_H__ -#define __SEQS_H__ - -unsigned int get_next_seq (void); -unsigned int get_next_callid (void); - -#endif // __SEQS_H__ - diff --git a/src/gui/cli/setup.c b/src/gui/cli/setup.c deleted file mode 100644 index 6474afe17f..0000000000 --- a/src/gui/cli/setup.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Author: Jerome Oufella <jerome.oufella@savoirfairelinux.com> - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - */ -/* - * 2006-11-15: add <string.h> declaration, thanks to Pierre Pomes (AMD64 compilation) - */ - -#include "config.h" -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include "display.h" -#include "setup.h" -#include "sflphone.h" - -#define IBUFSIZE 512 - -static char ibuf[IBUFSIZE + 1]; - -char * -read_input (const char *string) { - printf("%s", string); - return fgets(ibuf, IBUFSIZE, stdin); -} - -#ifdef HAVE_LIBREADLINE -#include <readline/readline.h> -#include <readline/history.h> -#else -#define readline read_input -#endif - -int -setup_first (void) { - char *text; - - display_info ("Welcome to SFLphone."); - display_info ("This wizard will guide you to setup your first account."); - printf ("\n"); - - display_info ("Please enter your full name"); - text = readline ("ie. John doe> "); - if (text != NULL) { - sflphone_set_fullname (text); - free (text); - } - - display_info ("Please enter your SIP username."); - text = readline ("ie. 104> "); - if (text != NULL) { - sflphone_set_sipuser (text); - free (text); - } - - display_info ("Please enter your SIP domain."); - text = readline ("ie. mycompany.net> "); - if (text != NULL) { - sflphone_set_siphost (text); - free (text); - } - - display_info ("Please enter your SIP proxy address."); - text = readline ("ie. sip.mycompany.net> "); - if (text != NULL) { - sflphone_set_proxy (text); - free (text); - } - - display_info ("If you wish to use STUN, enter your server address."); - text = readline ("ie. stun.mycompany.net> "); - if (text != NULL) { - if (strlen (text) > 3) { - sflphone_set_stun (text); - } else { - display_info ("Answer was too short, ignored."); - } - free (text); - } - - printf ("\n"); - sflphone_list_audiodevs (); - display_info ("Now choose your audio device."); - text = readline ("Number to use? "); - if (text != NULL) { - free (text); - } - - display_info ("Setup done."); - return 1; -} - diff --git a/src/gui/cli/setup.h b/src/gui/cli/setup.h deleted file mode 100644 index 5001d06f22..0000000000 --- a/src/gui/cli/setup.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __SETUP_H__ -#define __SETUP_H__ - -int setup_first (void); - -#endif // __SETUP_H__ diff --git a/src/gui/cli/sflphone-events.c b/src/gui/cli/sflphone-events.c deleted file mode 100644 index eeb40737d8..0000000000 --- a/src/gui/cli/sflphone-events.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#include "commons.h" -#include "display.h" -#include "globals.h" -#include "sflphone.h" -#include "sflphone-events.h" -#include "strutils.h" - -#define EVBUFSIZE 512 - -static char ibuf[EVBUFSIZE]; - -int -handle_event (void) { - bzero (ibuf, EVBUFSIZE); - fgets (ibuf, EVBUFSIZE, fdsocket); - clean_string (ibuf); - - if (strlen (ibuf) < 2) { - return 0; - } -// debug ("GOT %s\n", ibuf); - - IF_INIT{} - IF_GOT("100 ") { - // Info message ? - sflphone_handle_100 (token (ibuf)); - } - - IF_GOT("101 ") { - // Incoming event ? - sflphone_handle_101 (token (ibuf)); - } - - IF_GOT("200 ") { - // Info message ? - sflphone_handle_200 (token (ibuf)); - } - - return 0; -} - -/* EOF */ diff --git a/src/gui/cli/sflphone-events.h b/src/gui/cli/sflphone-events.h deleted file mode 100644 index 1412345193..0000000000 --- a/src/gui/cli/sflphone-events.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __SFLPHONE_EVENTS_H__ -#define __SFLPHONE_EVENTS_H__ -#include <stdio.h> - -int handle_event (void); - -#endif // __SFLPHONE_EVENTS_H__ diff --git a/src/gui/cli/sflphone.c b/src/gui/cli/sflphone.c deleted file mode 100644 index 59282e4dcd..0000000000 --- a/src/gui/cli/sflphone.c +++ /dev/null @@ -1,344 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#include "calls.h" -#include "commons.h" -#include "display.h" -#include "globals.h" -#include "requests.h" -#include "setup.h" -#include "sflphone.h" -#include "strutils.h" -#include "seqs.h" - -// get events signal = starting voip -void -sflphone_get_events(void) { - int id = get_next_seq(); - request_push(id, "getevents", NULL); - fprintf(fdsocket, "getevents seq%d\n", id); - fflush(fdsocket); -} -// Ask the core's version -void -sflphone_ask_version (void) { - int id = get_next_seq (); - - request_push (id, "version", NULL); - fprintf (fdsocket, "version seq%d\n", id); - fflush (fdsocket); -} - -/* Ask a list of available audio devices */ -void -sflphone_list_audiodevs (void) { - int id = get_next_seq (); - - request_push (id, "audiodevice", NULL); - fprintf (fdsocket, "list seq%d audiodevice\n", id); - fflush (fdsocket); -} - -// set the config full name -void -sflphone_set_fullname (char *s) { - clean_string (s); - if (strlen (s) < 1) { - return; - } - fprintf (fdsocket, "configset seq%d %s SIP.fullName %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fflush (fdsocket); - display_info ("Set SIP User name: %s\n", s); -} - -// set the config sip user -void -sflphone_set_sipuser (char *s) { - clean_string (s); - if (strlen (s) < 1) { - return; - } - fprintf (fdsocket, "configset seq%d %s SIP.userPart %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fprintf (fdsocket, "configset seq%d %s SIP.username %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fflush (fdsocket); - display_info ("Set SIP User: %s\n", s); -} - -// set the config sip host -void -sflphone_set_siphost (char *s) { - clean_string (s); - if (strlen (s) < 3) { - return; - } - fprintf (fdsocket, "configset seq%d %s SIP.hostPart %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fflush (fdsocket); - display_info ("Set SIP host: %s\n", s); -} - -// set the config sip password -void -sflphone_set_password (char *s) { - clean_string (s); - if (strlen (s) < 2) { - return; - } - fprintf (fdsocket, "configset seq%d %s SIP.password %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fflush (fdsocket); - display_info ("Set SIP password: ****\n"); -} - -// set the config sip proxy -void -sflphone_set_proxy (char *s) { - clean_string (s); - if (strlen (s) < 3) { - return; - } - fprintf (fdsocket, "configset seq%d %s SIP.proxy %s\n", - get_next_seq (), DEFAULT_ACCOUNT, s); - fflush (fdsocket); - display_info ("Set SIP proxy: %s\n", s); -} - -// set the config STUN usage -void -sflphone_set_stun (char *s) { - int use = 0; - - if (s[0] == '1') { - use = 1; - } - - fprintf (fdsocket, "configset seq%d %s SIP.useStun %d\n", - get_next_seq (), DEFAULT_ACCOUNT, use); - fflush (fdsocket); - display_info ("Set SIP STUN usage: %d\n", use); -} - -// The user asks for a call -// dest is the destination to call -void -sflphone_call (char *dest) { - int seq; - char call_id[CIDMAX]; - char seq_id[CIDMAX]; - callobj *calldesc; - - // dest is the destination like "5143456789" - // output pattern is like "call seq0 SIP0 c1 5143456789" - if (dest == NULL) { - return; - } - clean_string (dest); - if (strlen (dest) < 1) { - return; - } - - // Alloc call parameters - bzero (call_id, CIDMAX); - bzero (seq_id, CIDMAX); - seq = get_next_seq (); - snprintf (call_id, CIDMAX - 1, "c%d", get_next_callid ()); - snprintf (seq_id, CIDMAX - 1, "seq%d", seq); - - // Push request, we are waiting for the next ack/cancel for this call. - request_push (seq, "call", (void *) calldesc); - - // Add call descriptor - call_push_new (seq_id, call_id, dest); - - // Send the command - fprintf (fdsocket, "call %s %s %s %s\n", seq_id, DEFAULT_ACCOUNT, call_id, dest); - fflush (fdsocket); -} - -void -sflphone_hangup (char *call_id) -{ - if (!call_id) return; - int seq; - char seq_id[CIDMAX]; - bzero (seq_id, CIDMAX); - seq = get_next_seq (); - snprintf (seq_id, CIDMAX - 1, "seq%d", seq); - fprintf (fdsocket, "hangup %s %s\n", seq_id, call_id); - fflush (fdsocket); - - // Remove call descriptor - call_pop (call_id); -} - -void -sflphone_hold (char *call_id) -{ - if (!call_id) return; - // sequence number - int seq; char seq_id[CIDMAX]; bzero (seq_id, CIDMAX); seq = get_next_seq (); - snprintf (seq_id, CIDMAX - 1, "seq%d", seq); - - fprintf (fdsocket, "hold %s %s\n", seq_id, call_id); - fflush (fdsocket); - - call_change_state(call_id, ON_HOLD); -} - -void -sflphone_unhold (char *call_id) -{ - if (!call_id) return; - // sequence number - int seq; char seq_id[CIDMAX]; bzero (seq_id, CIDMAX); seq = get_next_seq (); - snprintf (seq_id, CIDMAX - 1, "seq%d", seq); - - fprintf (fdsocket, "unhold %s %s\n", seq_id, call_id); - fflush (fdsocket); - - call_change_state(call_id, TALKING); -} - -// 100 type messages are for lists -void -sflphone_handle_100 (char *string) { - char *ptr; - char cseq[32]; - reqobj *request; - char *ibuf; - - - // Original Message: - // 100 seq234 Payload here - // ^--string points here - - // Isolate seq field (1st field of string) - ptr = token (string); - if (ptr == NULL) { - // Bogus string, should have 3 fields - debug ("Got bogus 100: %s\n", string); - return; - } - - - // Copy sequence field to cseq - // Message: - // 200 seq244 Payload here - // ^ ^--ptr points to here - // ^--string points to here. - bzero (cseq, 32); - strncpy (cseq, string, ((ptr - 1) - string)); - //debug ("Got a 100, seq=%s\n", cseq); - - - // find the associated request and get its subject - request = request_find (cseq); - if (request == NULL) { - // Irrelevant request - return; - } - ibuf = request->subject; - - // Look at the subject and react. - IF_INIT{} - - // This is an item from a list of audiodevs - IF_GOT("audiodev") { - print_urldecoded (ptr); - } - -} - -// 200 type messages are validations of some commands. we have -// to notify the user about some of them. -void -sflphone_handle_200 (char *string) { - char *ptr; - char cseq[32]; - reqobj *request; - char *ibuf; - - - // Original Message: - // 200 seq234 Payload here - // ^--string points here - - // Isolate seq field (1st field of string) - ptr = token (string); - if (ptr == NULL) { - // Bogus string, should have 3 fields - debug ("Got bogus 200: %s\n", string); - return; - } - - - // Copy sequence field to cseq - // Message: - // 200 seq244 Payload here - // ^ ^--ptr points to here - // ^--string points to here. - bzero (cseq, 32); - strncpy (cseq, string, ((ptr - 1) - string)); - //debug ("Got a 200, seq=%s\n", cseq); - - - // Pop the associated request and get its subject - request = request_find (cseq); - if (request == NULL) { - // Irrelevant request - return; - } - ibuf = request->subject; - - // Look at the subject and react. - IF_INIT{} - - // This message is related to an ongoing call - IF_GOT("call") { - // A call has been established - if (!strcmp (ptr, "Established")) { - } - } - - // Answer to a version request - IF_GOT("version") { - // Find version string. - display_info ("Core version: %s", ptr); - request_pop (cseq); - request_free (request); - } - - // End of audio devices list. - IF_GOT("audiodev") { - request_pop (cseq); - request_free (request); - } -} - -void -sflphone_handle_101 (char *string) { -} - -void -sflphone_quit(SFLPHONE_QUIT_STATE state) { - switch(state) { - case SFLPHONE_QUIT: - fprintf(fdsocket, "stop seq%d\n", get_next_seq()); - fflush(fdsocket); - display_info ("Quitting SFLphone"); - - break; - - case SFLPHONE_QUIT_SOFTLY: - fprintf(fdsocket, "quit seq%d\n", get_next_seq()); - fflush(fdsocket); - display_info ("Softly quitting SFLphone. SFLphone deamon still running"); - - break; - } -} - -/* EOF */ diff --git a/src/gui/cli/sflphone.h b/src/gui/cli/sflphone.h deleted file mode 100644 index 1f57a05e8e..0000000000 --- a/src/gui/cli/sflphone.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __SFLPHONE_H__ -#define __SFLPHONE_H__ - -void sflphone_get_events(void); -void sflphone_ask_version (void); -void sflphone_list_audiodevs (void); -void sflphone_set_fullname (char *); -void sflphone_set_sipuser (char *); -void sflphone_set_siphost (char *); -void sflphone_set_password (char *); -void sflphone_set_proxy (char *); -void sflphone_set_stun (char *); -void sflphone_call (char *); -void sflphone_hangup (char *); -void sflphone_hold (char *); -void sflphone_unhold (char *); - -void sflphone_handle_100 (char *); -void sflphone_handle_101 (char *); -void sflphone_handle_200 (char *); - -typedef enum { SFLPHONE_QUIT=0, SFLPHONE_QUIT_SOFTLY } SFLPHONE_QUIT_STATE; -void sflphone_quit(SFLPHONE_QUIT_STATE); - -#endif // __SFLPHONE_H__ diff --git a/src/gui/cli/strutils.c b/src/gui/cli/strutils.c deleted file mode 100644 index fbf3681595..0000000000 --- a/src/gui/cli/strutils.c +++ /dev/null @@ -1,93 +0,0 @@ -#include <ctype.h> -#include <stdlib.h> -#include <string.h> -#include "display.h" -#include "strutils.h" - -static void remove_cr (char *); - - -/* Get a pointer to the next token */ -char * -token (const char *string) { - char *ptr; - - /* find next token */ - ptr = strchr (string, TOKEN_DELIM); - if (ptr == NULL) { - return NULL; - } - else if (ptr[1] == '\0') { - return NULL; - } - else return (ptr + 1); -} - -/* Get a pointer to the Nth next token */ -char * -nthtoken (const char *original, int n) { - char *ptr; - int i = 0; - - ptr = (char *) original; - do { - /* find next token */ - ptr = token (ptr); - if (ptr == NULL) { - /* not found */ - return NULL; - } - else if (i < (n-1) && ptr[1] == '\0') { - /* end of string */ - return NULL; - } - - i++; - } while (i < n); - - return ptr; -} - - -void -clean_string (char *str) { - remove_cr (str); -} - -void -print_urldecoded (char *str) { - char *decoded; - int i; - - decoded = (char *) malloc (strlen (str) + 10); - if (decoded == NULL) { - perror ("malloc"); - exit (1); - } - - for (i = 0; i < strlen (str); i++) { - if (str[i] == '+') { - decoded[i] = ' '; - } - -#if 0 - else if (str[i] == '%' && isdigit (str[i+1]) && isdigit (str[i+2])) { - } -#endif - - } -} - - -/* remove cr/lf at end of str */ -static void -remove_cr (char *str) { - int i; - - for (i = 0; i < strlen (str); i++) { - if (str[i] == '\n' || str[i] == '\r') { - str[i] = '\0'; - break; - } - } -} diff --git a/src/gui/cli/strutils.h b/src/gui/cli/strutils.h deleted file mode 100644 index 65f094c352..0000000000 --- a/src/gui/cli/strutils.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __STRUTILS_H__ -#define __STRUTILS_H__ - -#define TOKEN_DELIM ' ' - -char *token (const char *); -char *nthtoken (const char *, int); -void clean_string (char *); -void print_urldecoded (char *); - -#endif // __STRUTILS_H__ diff --git a/src/gui/cli/user-input.c b/src/gui/cli/user-input.c deleted file mode 100644 index 92a84daeba..0000000000 --- a/src/gui/cli/user-input.c +++ /dev/null @@ -1,153 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#include "calls.h" -#include "commons.h" -#include "display.h" -#include "user-input.h" -#include "setup.h" -#include "sflphone.h" -#include "strutils.h" - -#define IBUFSIZE 512 - -static char ibuf[IBUFSIZE]; -extern char *current_cid; - -int -handle_input (void) { - bzero (ibuf, IBUFSIZE); - fgets (ibuf, IBUFSIZE, stdin); - clean_string (ibuf); - - if (strlen (ibuf) < 1) { - return 0; - } - - IF_INIT{} - - /* Ask the core version */ - IF_GOT("version") { - sflphone_ask_version (); - return 0; - } - - /* Run setup */ - IF_GOT("setup") { - setup_first (); - return 0; - } - - /* Display Help */ - IF_GOT("help") { - help_display (); - return 0; - } - - /* Quit application */ - IF_GOT("quit softly") { - sflphone_quit(SFLPHONE_QUIT_SOFTLY); - return -1; - } - - /* Quit application */ - IF_GOT("quit") { - sflphone_quit(SFLPHONE_QUIT); - return -1; - } - - /* Account setup commands */ - IF_GOT("register fullname ") { - // example: register fullname Bobbie Ewing - sflphone_set_fullname (nthtoken (ibuf, 2)); - return 0; - } - IF_GOT ("register sipuser ") { - // example: register sipuser 244 - sflphone_set_sipuser (nthtoken (ibuf, 2)); - return 0; - } - IF_GOT("register siphost ") { - // example: register siphost savoirfairelinux.net - sflphone_set_siphost (nthtoken (ibuf, 2)); - return 0; - } - IF_GOT("register password ") { - // example: register password sdfg0si1g - sflphone_set_password (nthtoken (ibuf, 2)); - return 0; - } - IF_GOT("register sipproxy ") { - // example: register sipproxy proxy.savoirfairelinux.net - sflphone_set_proxy (nthtoken (ibuf, 2)); - return 0; - } - IF_GOT("register stun ") { - // example: register stun stun.savoirfairelinux.net - sflphone_set_stun (nthtoken (ibuf, 2)); - return 0; - } - - /* Place a call */ - IF_GOT("call ") { - sflphone_call (token (ibuf)); - return 0; - } - - /* List calls */ - IF_GOT("calls") { - call_print_list (); - return 0; - } - - /* Answer incoming call */ - IF_GOT("answer") { - debug ("Answer call.\n"); - return 0; - } - - /* Hangup specific call */ - IF_GOT("hangup ") { - printf ("Hangup specific call.\n"); - sflphone_hangup (token (ibuf)); - return 0; - } - - /* Hangup current call */ - IF_GOT("hangup") { - if (current_cid) { - printf ("Hangup current call.\n"); - sflphone_hangup (current_cid); - } - return 0; - } - - /* Hold current call */ - IF_GOT("hold") { - if (current_cid) { - printf ("Hold current call.\n"); - sflphone_hold (current_cid); - } - return 0; - } - - /* Unhold current call */ - IF_GOT("unhold") { - if (current_cid) { - printf ("Unhold current call.\n"); - sflphone_unhold (current_cid); - } - return 0; - } - - return 0; -} - -void -help_display (void) { - printf ("General call: call <number>, hangup <call-id>, answer\n"); - printf ("Current call: calls, hangup, hold\n"); - printf ("Configuration: setup\n"); - printf ("Register: register {fullname|sipuser|siphost|password|sipproxy|stun} <information>\n"); - printf ("Other: version, help, quit, quit softly\n"); -} diff --git a/src/gui/cli/user-input.h b/src/gui/cli/user-input.h deleted file mode 100644 index b4dac437d6..0000000000 --- a/src/gui/cli/user-input.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __USER_INPUT_H__ -#define __USER_INPUT_H__ - - -int handle_input (void); -void help_display(void); - -#endif // __USER_INPUT_H__ diff --git a/src/gui/guiframework.cpp b/src/gui/guiframework.cpp deleted file mode 100644 index b1dd75fc51..0000000000 --- a/src/gui/guiframework.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <string> -#include <libintl.h> - -#include "global.h" -#include "guiframework.h" -#include "../manager.h" - -GuiFramework::GuiFramework () -{} - -GuiFramework::~GuiFramework (void) {} - -bool -GuiFramework::outgoingCall(const std::string& account, const CallID& id, const std::string& to) -{ - return Manager::instance().outgoingCall(account, id, to); -} - -bool -GuiFramework::sendTextMessage(const std::string& account, const std::string& to, const std::string& message) -{ - return Manager::instance().sendTextMessage(account, to, message); -} - -bool -GuiFramework::hangupCall (const CallID& id) -{ - return Manager::instance().hangupCall(id); -} - -bool -GuiFramework::cancelCall (const CallID& id) -{ - return Manager::instance().cancelCall(id); -} - -bool -GuiFramework::answerCall(const CallID& id) -{ - return Manager::instance().answerCall(id); -} - -bool -GuiFramework::onHoldCall(const CallID& id) -{ - return Manager::instance().onHoldCall(id); -} - -bool -GuiFramework::offHoldCall(const CallID& id) -{ - return Manager::instance().offHoldCall(id); -} - -bool -GuiFramework::transferCall(const CallID& id, const std::string& to) -{ - return Manager::instance().transferCall(id, to); -} - -void -GuiFramework::mute() -{ - Manager::instance().mute(); -} - -void -GuiFramework::unmute() -{ - Manager::instance().unmute(); -} - -bool -GuiFramework::refuseCall (const CallID& id) -{ - return Manager::instance().refuseCall(id); -} - -bool -GuiFramework::saveConfig (void) -{ - return Manager::instance().saveConfig(); -} - -bool -GuiFramework::registerVoIPLink(const AccountID& accountId) -{ - return Manager::instance().registerVoIPLink(accountId); -} - -bool -GuiFramework::unregisterVoIPLink (const AccountID& accountId) -{ - return Manager::instance().unregisterVoIPLink(accountId); -} - -bool -GuiFramework::sendDtmf (const CallID& id, char code) -{ - return Manager::instance().sendDtmf(id, code); -} - -bool -GuiFramework::playDtmf (char code) -{ - return Manager::instance().playDtmf(code); -} - -bool -GuiFramework::playTone () -{ - return Manager::instance().playTone(); -} - -bool -GuiFramework::stopTone () -{ - Manager::instance().stopTone(true); - return true; -} - -/** - * Initialization section / redirection - */ -bool -GuiFramework::getEvents() -{ - return Manager::instance().getEvents(); -} - -/** - * Configuration section / redirection - */ -bool -GuiFramework::getZeroconf(const std::string& sequenceId) -{ - return Manager::instance().getZeroconf(sequenceId); -} - -bool -GuiFramework::attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer) -{ - return Manager::instance().attachZeroconfEvents(sequenceId, observer); -} - -bool -GuiFramework::detachZeroconfEvents(Pattern::Observer& observer) -{ - return Manager::instance().detachZeroconfEvents(observer); -} - -bool -GuiFramework::getCallStatus(const std::string& sequenceId) -{ - return Manager::instance().getCallStatus(sequenceId); -} - -bool -GuiFramework::getAccountList(const std::string& sequenceId) -{ - Manager::instance().getAccountList( ); - return true; -} -const CallID& -GuiFramework::getCurrentId() -{ - return Manager::instance().getCurrentCallId(); -} - -bool -GuiFramework::getConfigAll(const std::string& sequenceId) -{ - return Manager::instance().getConfigAll(sequenceId); -} - -bool -GuiFramework::getConfig(const std::string& section, const std::string& name, TokenList& arg) -{ - return Manager::instance().getConfig(section, name, arg); -} - -bool -GuiFramework::setConfig(const std::string& section, const std::string& name, const std::string& value) -{ - return Manager::instance().setConfig(section, name, value); -} - -bool -GuiFramework::getConfigList(const std::string& sequenceId, const std::string& name) -{ - return Manager::instance().getConfigList(sequenceId, name); -} - -bool -GuiFramework::setSpkrVolume(int volume) -{ - Manager::instance().setSpkrVolume(volume); - return true; -} - -bool -GuiFramework::setMicVolume(int volume) -{ - Manager::instance().setMicVolume(volume); - return true; -} - -int -GuiFramework::getSpkrVolume() -{ - return Manager::instance().getSpkrVolume(); -} - -int -GuiFramework::getMicVolume() -{ - return Manager::instance().getMicVolume(); -} - -bool -GuiFramework::hasLoadedSetup() -{ - return Manager::instance().hasLoadedSetup(); -} - -bool -GuiFramework::setSwitch(const std::string& switchName, std::string& returnMessage) -{ - return Manager::instance().setSwitch(switchName, returnMessage); -} diff --git a/src/gui/guiframework.h b/src/gui/guiframework.h deleted file mode 100644 index 31b209b087..0000000000 --- a/src/gui/guiframework.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __GUI_FRAMEWORK_H__ -#define __GUI_FRAMEWORK_H__ -/* Inherited class by GUI classes */ -/* The GuiFramework class is the base of all user interface */ - -#include <string> -#include "server/argtokenizer.h" -#include "../observer.h" -#include "../call.h" // for callid2 -#include "../account.h" // for account - -class GuiFramework { -public: - GuiFramework (); - virtual ~GuiFramework (void); - - /* Parent class to child class */ - virtual bool incomingCall (const AccountID& accountId, const CallID& id, const std::string& from) = 0; - - virtual void peerAnsweredCall (const CallID& id) = 0; - virtual void peerRingingCall (const CallID& id) = 0; - virtual void peerHungupCall (const CallID& id) = 0; - virtual void incomingMessage(const AccountID& accountId, const std::string& message) = 0; - virtual void displayStatus (const std::string& status) = 0; - virtual void displayConfigError (const std::string& error) = 0; - virtual void displayTextMessage (const CallID& id, const std::string& message) = 0; - virtual void displayErrorText (const CallID& id, const std::string& message) = 0; - virtual void displayError (const std::string& error) = 0; - virtual void startVoiceMessageNotification (void) {} - virtual void stopVoiceMessageNotification (void) {} - virtual void sendVoiceNbMessage(const AccountID& accountId, const std::string& nb_msg) = 0; - virtual void setup() = 0; - virtual void sendMessage(const std::string& code, const std::string& seqId, TokenList& arg) = 0; - virtual void sendCallMessage(const std::string& code, - const std::string& sequenceId, const CallID& id, TokenList arg) = 0; - virtual void sendRegistrationState(const AccountID& accountid, bool state) = 0; - virtual void callFailure(const CallID& id) = 0; - - /* Child class to parent class */ - bool outgoingCall(const AccountID& account, const CallID& id, const std::string& to); - bool answerCall(const CallID& id); - - bool sendTextMessage(const AccountID& accountId, const std::string& to, const std::string& message); - bool hangupCall (const CallID& id); - bool cancelCall (const CallID& id); - bool onHoldCall (const CallID& id); - bool offHoldCall (const CallID& id); - bool transferCall (const CallID& id, const std::string& to); - void mute (); - void unmute (); - bool refuseCall (const CallID& id); - - bool saveConfig(void); - bool registerVoIPLink(const AccountID& accountId); - bool unregisterVoIPLink(const AccountID& accountId); - bool sendDtmf (const CallID& id, char code); - bool playDtmf (char code); - bool playTone (); - bool stopTone (); - - // config - bool getEvents(); - bool getZeroconf(const std::string& sequenceId); - bool attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer); - bool detachZeroconfEvents(Pattern::Observer& observer); - bool getCallStatus(const std::string& sequenceId); - bool getAccountList(const std::string& sequenceId); - bool getConfigAll(const std::string& sequenceId); - bool getConfig(const std::string& section, const std::string& name, TokenList& arg); - bool setConfig(const std::string& section, const std::string& name, const std::string& value); - bool getConfigList(const std::string& sequenceId, const std::string& name); - bool setSpkrVolume(int volume); - bool setMicVolume(int volume); - int getSpkrVolume(); - int getMicVolume(); - bool setSwitch(const std::string& switchName, std::string& returnMessage); - - bool hasLoadedSetup(); - const CallID& getCurrentId(); - -protected: - std::string _message; -}; - -#endif // __GUI_FRAMEWORK_H__ diff --git a/src/gui/official/guiframework.cpp b/src/gui/official/guiframework.cpp deleted file mode 100644 index 1612dc095e..0000000000 --- a/src/gui/official/guiframework.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <string> -using namespace std; - -#include "guiframework.h" -#include "../manager.h" - -GuiFramework::GuiFramework () -{} - -GuiFramework::~GuiFramework (void) {} - -int -GuiFramework::outgoingCall (const string& to) -{ - return Manager::instance().outgoingCall(to); -} - -int -GuiFramework::hangupCall (short id) -{ - if (Manager::instance().hangupCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::cancelCall (short id) -{ - if (Manager::instance().cancelCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::answerCall (short id) -{ - if (Manager::instance().answerCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::onHoldCall (short id) -{ - if (Manager::instance().onHoldCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::offHoldCall (short id) -{ - if (Manager::instance().offHoldCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::transferCall (short id, const string& to) -{ - if (Manager::instance().transferCall(id, to) == 0) { - return 1; - } else { - return 0; - } -} - -void -GuiFramework::muteOn (short id) -{ - Manager::instance().muteOn(id); -} - -void -GuiFramework::muteOff (short id) -{ - Manager::instance().muteOff(id); -} - -int -GuiFramework::refuseCall (short id) -{ - if (Manager::instance().refuseCall(id) == 0) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::saveConfig (void) -{ - if (Manager::instance().saveConfig()) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::registerVoIPLink (void) -{ - if (Manager::instance().registerVoIPLink()) { - return 1; - } else { - return 0; - } -} - -int -GuiFramework::unregisterVoIPLink (void) -{ - if (Manager::instance().unregisterVoIPLink()) { - return 1; - } else { - return 0; - } -} - -void -GuiFramework::sendDtmf (short id, char code) -{ - Manager::instance().sendDtmf(id, code); -} - -int -GuiFramework::quitApplication (void) -{ - return (Manager::instance().quitApplication() ? 1 : 0); -} - -int -GuiFramework::sendTextMessage (short id, const string& message) -{ - Manager::instance().sendTextMessage(id, message); - return 1; -} - -int -GuiFramework::accessToDirectory (void) -{ - Manager::instance().accessToDirectory(); - return 1; -} - diff --git a/src/gui/official/guiframework.h b/src/gui/official/guiframework.h deleted file mode 100644 index 89c0e41b8f..0000000000 --- a/src/gui/official/guiframework.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __GUI_FRAMEWORK_H__ -#define __GUI_FRAMEWORK_H__ - -/* Inherited class by GUI classes */ -/* The GuiFramework class is the base of all user interface */ - -#include <list> -#include <string> -#include <vector> - - -class Account; - -class SFLPhoneClient -{ - public: - /** - * This function just return the dotted formated - * version. like: "0.5.6" - */ - std::string version(); - - /** - * This function will connect the client to the - * sflphone server. - */ - void connect(); - - /** - * This function will disconnect the client from - * the sflphone server. - */ - void disconnect(); - - /** - * This function returns the current list of config - * entries of sflphone's server. - */ - std::list< ConfigEntry > listConfig(); - - /** - * This function will save the current config. Then, - * next time sflphone will start, it will have the - * same configuration has it is right now. - */ - void saveConfig(); - - /** - * This function will set the specified option - * to the value given in argument. You need to - * call the saveConfig() function if you want - * sflphone's server to keep this option for - * the next restart. - * - * Note: Be carefull because when you want - * to set the audio device, or the audio codec, you - * need to set the value of the position - * in the vector, not the description of the device, - * or the codec. - */ - void setOption(const std::string &name, const std::string &value); - - /** - * This function will return the value of - * the specified option. - */ - std::string getOption(const std::string &name); - - /** - * This function returns a vector containing the - * audio devices. See setOption's description note - * if you want to set the audio device. - */ - std::vector< std::string > listAudioDevices(); - - /** - * This function returns a vector containing the - * audio codecs. See setOption's description note - * if you want to set the audio codec. - */ - std::vector< std::string > listAudioCodecs(); - - /** - * This function returns a list of accounts available - * on the system. - */ - std::list< std::string > listAccounts(); - - /** - * This function returns the Account structure identified - * by the string given in argument. Use listAccounts() function - * if you want to know which ones are availables. - */ - Account *getAccount(const std::string &name); -} - -#endif // __GUI_FRAMEWORK_H__ diff --git a/src/gui/official/sflphoneclient.h b/src/gui/official/sflphoneclient.h deleted file mode 100644 index ee129c73fb..0000000000 --- a/src/gui/official/sflphoneclient.h +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_SFLPHONECLIENT_H -#define SFLPHONEGUI_SFLPHONECLIENT_H - -#include <list> -#include <string> -#include <vector> - - -class Account; - -class Session -{ - public: - /** - * This function just return the dotted formated - * version. like: "0.5.6" - */ - std::string version(); - - /** - * This function will connect the client to the - * sflphone server. - */ - void connect(); - - /** - * This function will disconnect the client from - * the sflphone server. - */ - void disconnect(); - - /** - * This function returns the current list of config - * entries of sflphone's server. - */ - std::list< ConfigEntry > listConfig(); - - /** - * This function will save the current config. Then, - * next time sflphone will start, it will have the - * same configuration has it is right now. - */ - void saveConfig(); - - /** - * This function will set the specified option - * to the value given in argument. You need to - * call the saveConfig() function if you want - * sflphone's server to keep this option for - * the next restart. - * - * Note: Be carefull because when you want - * to set the audio device, or the audio codec, you - * need to set the value of the position - * in the vector, not the description of the device, - * or the codec. - */ - void setOption(const std::string &name, const std::string &value); - - /** - * This function will return the value of - * the specified option. - */ - std::string getOption(const std::string &name); - - /** - * This function returns a vector containing the - * audio devices. See setOption's description note - * if you want to set the audio device. - */ - std::vector< std::string > listAudioDevices(); - - /** - * This function returns a vector containing the - * audio codecs. See setOption's description note - * if you want to set the audio codec. - */ - std::vector< std::string > listAudioCodecs(); - - /** - * This function returns a list of accounts available - * on the system. - */ - std::list< std::string > listAccounts(); - - /** - * This function returns the Account structure identified - * by the string given in argument. Use listAccounts() function - * if you want to know which ones are availables. - */ - Account *getAccount(const std::string &name); - - private: - /** - * This is the ID of the session. - */ - std::string mId; -} - -#endif diff --git a/src/gui/qt/Account.cpp b/src/gui/qt/Account.cpp deleted file mode 100644 index 509dd54dde..0000000000 --- a/src/gui/qt/Account.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "Account.hpp" -#include "Requester.hpp" -#include "Call.hpp" - -Account::Account(const QString &sessionId, - const QString &name) - : mSessionId(sessionId) - , mId(name) -{} - -Request * -Account::registerAccount() const -{ - std::list< QString > args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "register", args); -} - -Request * -Account::unregisterAccount() const -{ - std::list< QString > args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "unregister", args); -} - -Request * -Account::createCall(Call * &call, const QString &to) const -{ - QString callId = Requester::instance().generateCallId(); - call = new Call(mSessionId, mId, callId, to); - - std::list< QString> args; - args.push_back(mId); - args.push_back(callId); - args.push_back(to); - return Requester::instance().send(mSessionId, "call", args); -} - - diff --git a/src/gui/qt/Account.hpp b/src/gui/qt/Account.hpp deleted file mode 100644 index 24b91c67df..0000000000 --- a/src/gui/qt/Account.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_ACCOUNT_H -#define SFLPHONEGUI_ACCOUNT_H - -#include <qstring.h> - -#include "Call.hpp" - -class Request; - -class Account { - public: - Account(const QString &sessionId, - const QString &name); - - /** - * This will generate a call ready to be used. - */ - Request *registerAccount() const; - Request *unregisterAccount() const; - - /** - * This function will create a call. The call pointer will - * point to a newly allocated memory. You're responsible for - * deleting this memory. - */ - Request *createCall(Call * &call, const QString &to) const; - - - QString id() const - {return mId;} - - const QString& getAlias() { return mAlias; } - void setAlias(const QString& alias) { mAlias = alias; } - -private: - Account(); - - /** - * This is the session id that we are related to. - */ - QString mSessionId; - - /** - * This is the account id that we are related to. - */ - QString mId; - - /** - * This is the alias of the account, a name choose by the user - */ - QString mAlias; -}; - - -#endif diff --git a/src/gui/qt/Call.cpp b/src/gui/qt/Call.cpp deleted file mode 100644 index e538641c9c..0000000000 --- a/src/gui/qt/Call.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qstring.h> -#include <list> - -#include "Account.hpp" -#include "Call.hpp" -#include "CallManager.hpp" -#include "Session.hpp" -#include "Requester.hpp" - - -Call::Call(const QString &sessionId, - const QString &accountId, - const QString &callId, - const QString &peer, - bool incomming) - : mSessionId(sessionId) - , mAccountId(accountId) - , mId(callId) - , mPeer(peer) - , mIsIncomming(incomming) -{ - CallManager::instance().registerCall(*this); -} - -Call::Call(const Session &session, - const Account &account, - const QString &callId, - const QString &peer, - bool incomming) - : mSessionId(session.id()) - , mAccountId(account.id()) - , mId(callId) - , mPeer(peer) - , mIsIncomming(incomming) -{ - CallManager::instance().registerCall(*this); -} - -bool -Call::isIncomming() -{return mIsIncomming;} - -Request * -Call::answer() -{ - mIsIncomming = false; - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "answer", args); -} - -Request * -Call::hangup() -{ - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "hangup", args); -} - -Request * -Call::cancel() -{ - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "cancel", args); -} - -Request * -Call::hold() -{ - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "hold", args); -} - -Request * -Call::unhold() -{ - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "unhold", args); -} - -Request * -Call::refuse() -{ - mIsIncomming = false; - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "refuse", args); -} - -Request * -Call::notAvailable() -{ - mIsIncomming = false; - std::list< QString> args; - args.push_back(mId); - return Requester::instance().send(mSessionId, "notavailable", args); -} - -Request * -Call::transfer(const QString &to) -{ - std::list< QString> args; - args.push_back(mId); - args.push_back(to); - return Requester::instance().send(mSessionId, "transfer", args); -} - -Request * -Call::sendDtmf(char c) -{ - std::list< QString> args; - args.push_back(mId); - QString s; - s += c; - args.push_back(s); - return Requester::instance().send(mSessionId, "senddtmf", args); -} - diff --git a/src/gui/qt/Call.hpp b/src/gui/qt/Call.hpp deleted file mode 100644 index d3d626c68e..0000000000 --- a/src/gui/qt/Call.hpp +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_CALL_H -#define SFLPHONEGUI_CALL_H - -#include <qstring.h> - -class Account; -class Request; -class Session; - -class Call -{ - public: - /** - * A call is automaticaly registered in - * the CallManager. However, a call isn't - * registered when you have a copy constructor. - */ - Call(const QString &sessionId, - const QString &accountId, - const QString &callId, - const QString &destination, - bool incomming = false); - Call(const Session &session, - const Account &account, - const QString &callId, - const QString &destination, - bool incomming = false); - - /** - * This function returns true if the - * call is waiting to be picked up. - */ - bool isIncomming(); - - QString id() const - {return mId;} - - QString peer() const - {return mPeer;} - - /** - * This function will answer the call. - */ - Request *answer(); - - /** - * This function will try to transfer the - * call to the peer. - */ - Request *transfer(const QString &to); - - /** - * This function will hangup on a call. - */ - Request *hangup(); - - /** - * ///TODO need to clarify this function. - */ - Request *cancel(); - - /** - * This function will put the call on hold. - * This *should* stop temporarly the streaming. - */ - Request *hold(); - - /** - * This function will unhold a holding call. - * This *should* restart a stopped streaming. - */ - Request *unhold(); - - /** - * This function refuse and incomming call. - * It means that the phone is ringing but we - * don't want to answer. - */ - Request *refuse(); - - /** - * This function will set this client to be - * not able to receive the call. It means that - * the phone can still ring. But if every client - * sent notavailable, then it will be refused. - */ - Request *notAvailable(); - - - /** - * This function will send a tone to the line. - * This is used if you make a choice when you - * have a voice menu. - */ - Request *sendDtmf(char c); - - private: - - /** - * This is the session id that we belong to. - */ - QString mSessionId; - - /** - * This is the account id that we belong to. - */ - QString mAccountId; - - /** - * This is the unique identifier of the call. - */ - QString mId; - - /** - * This is the destination of the call. - */ - QString mPeer; - - bool mIsIncomming; -}; - -#endif diff --git a/src/gui/qt/CallManager.hpp b/src/gui/qt/CallManager.hpp deleted file mode 100644 index 8eff2b2f68..0000000000 --- a/src/gui/qt/CallManager.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CALL_MANAGER_HPP__ -#define __CALL_MANAGER_HPP__ - -#include "utilspp/Singleton.hpp" -#include "CallManagerImpl.hpp" - -typedef utilspp::SingletonHolder< CallManagerImpl > CallManager; - -#endif - diff --git a/src/gui/qt/CallManagerImpl.cpp b/src/gui/qt/CallManagerImpl.cpp deleted file mode 100644 index e09a411843..0000000000 --- a/src/gui/qt/CallManagerImpl.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qobject.h> -#include <stdexcept> - -#include "CallManagerImpl.hpp" -#include "DebugOutput.hpp" - -void -CallManagerImpl::registerCall(const Call &call) -{ - mCalls.insert(std::make_pair(call.id(), call)); -} - -void -CallManagerImpl::unregisterCall(const Call &call) -{ - unregisterCall(call.id()); -} - -void -CallManagerImpl::unregisterCall(const QString &id) -{ - std::map< QString, Call >::iterator pos = mCalls.find(id); - if(pos != mCalls.end()) { - mCalls.erase(pos); - } -} - -bool -CallManagerImpl::exist(const QString &id) -{ - std::map< QString, Call >::iterator pos = mCalls.find(id); - if(pos == mCalls.end()) { - return false; - } - - return true; -} - -Call -CallManagerImpl::getCall(const QString &id) -{ - std::map< QString, Call >::iterator pos = mCalls.find(id); - if(pos == mCalls.end()) { - throw std::runtime_error("Trying to retreive an unregistred call\n"); - } - - return pos->second; -} diff --git a/src/gui/qt/CallManagerImpl.hpp b/src/gui/qt/CallManagerImpl.hpp deleted file mode 100644 index a7e02aa225..0000000000 --- a/src/gui/qt/CallManagerImpl.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CALL_MANAGER_IMPL_HPP__ -#define __CALL_MANAGER_IMPL_HPP__ - -#include <qmutex.h> -#include <qstring.h> -#include <map> - -#include "Call.hpp" - -class CallManagerImpl -{ -public: - void registerCall(const Call &call); - void unregisterCall(const Call &call); - void unregisterCall(const QString &id); - - /** - * Return true if the call is registered. - */ - bool exist(const QString &id); - - /** - * Return the call with the given id. If - * there's no such call it will throw a - * std::runtime_error. - */ - Call getCall(const QString &id); - -private: - std::map< QString, Call > mCalls; -}; - -#endif diff --git a/src/gui/qt/CallStatus.cpp b/src/gui/qt/CallStatus.cpp deleted file mode 100644 index 63c155fadc..0000000000 --- a/src/gui/qt/CallStatus.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" - -#include "CallStatus.hpp" -#include "PhoneLineManager.hpp" - -CallStatus::CallStatus(const QString &code, - const std::list< QString > &args) - : CallRelatedEvent(code, args) -{ - std::list< QString > l = getUnusedArgs(); - if(l.size() >= 3) { - mAccountId = *l.begin(); - l.pop_front(); - mDestination = *l.begin(); - l.pop_front(); - mStatus = *l.begin(); - l.pop_front(); - setUnusedArgs(l); - } -} - -void -CallStatus::execute() -{ - QString id = getCallId(); - if(id.length() > 0) { - DebugOutput::instance() << QObject::tr("%1 status received for call ID: %2.\n") - .arg(mStatus) - .arg(id); - PhoneLineManager::instance().addCall(mAccountId, getCallId(), mDestination, mStatus); - } - else { - DebugOutput::instance() << QObject::tr("Status invalid: %1\n").arg(toString()); - } -} - diff --git a/src/gui/qt/CallStatus.hpp b/src/gui/qt/CallStatus.hpp deleted file mode 100644 index de5973362d..0000000000 --- a/src/gui/qt/CallStatus.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CALLSTATUS_HPP__ -#define __CALLSTATUS_HPP__ - -#include "Event.hpp" - -class CallStatus : public CallRelatedEvent -{ -public: - CallStatus(const QString &code, - const std::list< QString > &args); - - void execute(); - -protected: - QString mAccountId; - QString mDestination; - QString mStatus; -}; - -#endif - diff --git a/src/gui/qt/CallStatusFactory.hpp b/src/gui/qt/CallStatusFactory.hpp deleted file mode 100644 index 83e467b6ec..0000000000 --- a/src/gui/qt/CallStatusFactory.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CALLSTATUSFACTORY_HPP__ -#define __CALLSTATUSFACTORY_HPP__ - -#include "EventFactory.hpp" - -typedef utilspp::SingletonHolder< EventFactoryImpl< Event > > CallStatusFactory; - -#endif - diff --git a/src/gui/qt/ConfigurationManager.hpp b/src/gui/qt/ConfigurationManager.hpp deleted file mode 100644 index 1cc5abe819..0000000000 --- a/src/gui/qt/ConfigurationManager.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CONFIGURATION_MANAGER_HPP__ -#define __CONFIGURATION_MANAGER_HPP__ - -#include "utilspp/Singleton.hpp" -#include "ConfigurationManagerImpl.hpp" - -typedef utilspp::SingletonHolder< ConfigurationManagerImpl > ConfigurationManager; - -#endif - diff --git a/src/gui/qt/ConfigurationManagerImpl.cpp b/src/gui/qt/ConfigurationManagerImpl.cpp deleted file mode 100644 index 594066e9b6..0000000000 --- a/src/gui/qt/ConfigurationManagerImpl.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "ConfigurationManagerImpl.hpp" -#include "DebugOutput.hpp" -#include "Session.hpp" -#include "taxidermy/Hunter.hpp" -#include "Request.hpp" // don't know if it's a good idea for this class to know request... - -ConfigurationManagerImpl::ConfigurationManagerImpl() - : mSession(0), mRateMode("8000") -{} - -ConfigurationManagerImpl::~ConfigurationManagerImpl() -{ -} - -void -ConfigurationManagerImpl::setCurrentSpeakerVolume(unsigned int ) -{ -} - -void -ConfigurationManagerImpl::setCurrentMicrophoneVolume(unsigned int ) -{ -} - -void -ConfigurationManagerImpl::setSession(Session* session) -{ - mSession = session; -} - -void -ConfigurationManagerImpl::save() -{ - if(mSession) { - SectionMap::iterator pos = mEntries.begin(); - while(pos != mEntries.end()) { - VariableMap::iterator vpos = pos->second.begin(); - while(vpos != pos->second.end()) { - ConfigEntry entry(vpos->second); - mSession->configSet(entry.section, entry.name, entry.value); - vpos++; - } - - pos++; - } - - mSession->configSave(); - } - else { - DebugOutput::instance() << QObject::tr("ConfigurationManagerImpl::save(): " - "We don't have a valid session.\n"); - } -} - -void -ConfigurationManagerImpl::finishSave() -{ - emit saved(); -} - -void -ConfigurationManagerImpl::add(const ConfigEntry &entry) -{ - mEntries[entry.section][entry.name] = entry; -} - -void -ConfigurationManagerImpl::addAudioDevice(QString index, - QString hostApiName, - QString deviceName, - QString defaultRate) -{ - AudioDevice device; - device.index = index; - device.hostApiName = hostApiName; - device.deviceName = deviceName; - device.defaultRate = defaultRate; - add(device); -} - -void -ConfigurationManagerImpl::add(const AudioDevice &entry) -{ - mAudioDevices.push_back(entry); - // emit audioDevicesUpdated(); // <-- wrong call with success -} - -void -ConfigurationManagerImpl::addAudioDeviceIn(QString index, - QString hostApiName, - QString deviceName, - QString defaultRate) -{ - AudioDevice device; - device.index = index; - device.hostApiName = hostApiName; - device.deviceName = deviceName; - device.defaultRate = defaultRate; - addIn(device); -} - -void -ConfigurationManagerImpl::addIn(const AudioDevice &entry) -{ - mAudioDevicesIn.push_back(entry); - //emit audioDevicesInUpdated(); // <-- wrong call with success() -} - -void -ConfigurationManagerImpl::addAudioDeviceOut(QString index, - QString hostApiName, - QString deviceName, - QString defaultRate) -{ - AudioDevice device; - device.index = index; - device.hostApiName = hostApiName; - device.deviceName = deviceName; - device.defaultRate = defaultRate; - addOut(device); -} - -void -ConfigurationManagerImpl::addOut(const AudioDevice &entry) -{ - mAudioDevicesOut.push_back(entry); - //emit audioDevicesOutUpdated(); // <-- wrong call with success() -} - -void -ConfigurationManagerImpl::addRingtone(QString index, QString filename) -{ - Ringtone tone; - tone.index = index; - tone.filename = filename; - add(tone); -} - - -void -ConfigurationManagerImpl::add(const Ringtone &entry) -{ - mRingtones.push_back(entry); - emit ringtonesUpdated(); -} - -void -ConfigurationManagerImpl::addCodec(QString index, QString codecName) -{ - Codec codec; - codec.index = index; - codec.codecName = codecName; - add(codec); -} - - -void -ConfigurationManagerImpl::add(const Codec &entry) -{ - mCodecs.push_back(entry); - emit codecsUpdated(); -} - -void -ConfigurationManagerImpl::set(const QString §ion, - const QString &name, - const QString &value) -{ - SectionMap::iterator pos = mEntries.find(section); - if(pos != mEntries.end()) { - VariableMap::iterator vpos = pos->second.find(name); - if(vpos != pos->second.end()) { - vpos->second.value = value; - } - } -} - -void -ConfigurationManagerImpl::save(const QString §ion, const QString &name) -{ - QString value = get(section, name); - mSession->configSet(section, name, value); -} - -QString -ConfigurationManagerImpl::get(const QString §ion, - const QString &name) -{ - QString value; - SectionMap::iterator pos = mEntries.find(section); - if(pos != mEntries.end()) { - VariableMap::iterator vpos = pos->second.find(name); - if(vpos != pos->second.end()) { - value = vpos->second.value; - } - } - - return value; -} - -void -ConfigurationManagerImpl::reloadSoundDriver() { - - mAudioDevicesOut.clear(); - mAudioDevicesIn.clear(); - - Request *r; - r = mSession->list("audiodevicein"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - this, SLOT(addAudioDeviceIn(QString, QString, QString, QString))); - QObject::connect(r, SIGNAL(parsedEntry(const QString& )), - this, SLOT(setRateMode(const QString& ))); - QObject::connect(r, SIGNAL(success(QString, QString)), - this, SIGNAL(audioDevicesInUpdated())); - - r = mSession->list("audiodeviceout"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - this, SLOT(addAudioDeviceOut(QString, QString, QString, QString))); - QObject::connect(r, SIGNAL(success(QString, QString)), - this, SIGNAL(audioDevicesOutUpdated())); - -} - -const QString -ConfigurationManagerImpl::getAudioDevicesInRate(int index) { - std::list< AudioDevice >::iterator pos; - int i=0; - for (pos = mAudioDevicesIn.begin(); pos!=mAudioDevicesIn.end(); pos++, i++) { - if (index == i) { - return pos->defaultRate; - } - } - return QString(""); -} - -const QString -ConfigurationManagerImpl::getAudioDevicesOutRate(int index) { - std::list< AudioDevice >::iterator pos; - int i=0; - for (pos = mAudioDevicesOut.begin(); pos!=mAudioDevicesOut.end(); pos++, i++) { - if (index == i) { - return pos->defaultRate; - } - } - return QString(""); -} diff --git a/src/gui/qt/ConfigurationManagerImpl.hpp b/src/gui/qt/ConfigurationManagerImpl.hpp deleted file mode 100644 index 90560a4f8f..0000000000 --- a/src/gui/qt/ConfigurationManagerImpl.hpp +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef __CONFIGURATION_MANAGER_IMPL_HPP__ -#define __CONFIGURATION_MANAGER_IMPL_HPP__ - - -#include <list> -#include <map> -#include <qobject.h> -#include <vector> - -struct AudioDevice -{ -public: - QString index; - QString hostApiName; - QString deviceName; - QString defaultRate; -}; - -struct Ringtone -{ -public: - QString index; - QString filename; -}; - -struct Codec -{ -public: - QString index; - QString codecName; -}; - -/** - * This is the representation of a configuration - * entry. - */ -struct ConfigEntry -{ -public: - ConfigEntry(){} - - ConfigEntry(QString s, - QString n, - QString t, - QString d, - QString v) - { - section = s; - name = n; - type = t; - def = d; - value = v; - } - - QString section; - QString name; - QString type; - QString def; - QString value; -}; - - -class Session; - -class ConfigurationManagerImpl : public QObject -{ - Q_OBJECT - -signals: - void audioDevicesUpdated(); - void audioDevicesInUpdated(); - void audioDevicesOutUpdated(); - void ringtonesUpdated(); - void codecsUpdated(); - void updated(); - void saved(); - -public: - ConfigurationManagerImpl(); - ~ConfigurationManagerImpl(); - - /** - * will set the session to use. - */ - void setSession(Session* session); - - /** - * This function will set the current speaker volume - * to the given percentage. If it's greater than 100 - * it will be set to 100. - */ - void setCurrentSpeakerVolume(unsigned int percentage); - - /** - * This function will set the current microphone volume - * to the given percentage. If it's greater than 100 - * it will be set to 100. - */ - void setCurrentMicrophoneVolume(unsigned int percentage); - - - void set(const QString §ion, - const QString &name, - const QString &value); - - QString get(const QString §ion, - const QString &name); - - void clearAudioDevices() - {mAudioDevices.clear();} - void clearAudioDevicesIn() - {mAudioDevices.clear();} - void clearAudioDevicesOut() - {mAudioDevices.clear();} - - std::list< AudioDevice > getAudioDevices() - {return mAudioDevices;} - std::list< AudioDevice > getAudioDevicesIn() - {return mAudioDevicesIn;} - std::list< AudioDevice > getAudioDevicesOut() - {return mAudioDevicesOut;} - - /** Get Audio Device In pointer, or null if not found */ - const QString getAudioDevicesInRate(int index); - /** Get Audio Device Out pointer, or null if not found */ - const QString getAudioDevicesOutRate(int index); - - std::list< Ringtone > getRingtones() - {return mRingtones;} - - std::list< Codec > getCodecs() - {return mCodecs;} - - QStringList getSkins(); - //QString getCurrentSkin(){return QString("metal");} - - void complete() - {emit updated();} - - void save(); - void save(const QString& section, const QString& name); - - void finishSave(); - - /** - * Reload sound driver from audiodevice in/audiodevice out - */ - void reloadSoundDriver(); - -public slots: - void add(const ConfigEntry &entry); - - void addAudioDevice(QString index, QString hostApiName, QString deviceName, QString defaultRate); - void add(const AudioDevice &entry); - - void addAudioDeviceIn(QString index, QString hostApiName, QString deviceName, QString defaultRate); - void setRateMode(const QString& rateMode) { mRateMode = rateMode; } - const QString& getRateMode() { return mRateMode; } - - void addIn(const AudioDevice &entry); - - void addAudioDeviceOut(QString index, QString hostApiName, QString deviceName, QString defaultRate); - void addOut(const AudioDevice &entry); - - void addRingtone(QString index, QString filename); - void add(const Ringtone &entry); - - void addCodec(QString index, QString codecName); - void add(const Codec &entry); - - -private: - typedef std::map< QString, ConfigEntry > VariableMap; - typedef std::map< QString, VariableMap > SectionMap; - SectionMap mEntries; - - std::list< AudioDevice > mAudioDevices; - std::list< AudioDevice > mAudioDevicesIn; - std::list< AudioDevice > mAudioDevicesOut; - std::list< Ringtone > mRingtones; - std::list< Codec > mCodecs; - - Session *mSession; - QString mRateMode; // VARIANT or number -}; - -#endif diff --git a/src/gui/qt/ConfigurationPanel.ui b/src/gui/qt/ConfigurationPanel.ui deleted file mode 100644 index 2e5d3ca14c..0000000000 --- a/src/gui/qt/ConfigurationPanel.ui +++ /dev/null @@ -1,1736 +0,0 @@ -<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> -<class>ConfigurationPanel</class> -<widget class="QDialog"> - <property name="name"> - <cstring>ConfigurationPanel</cstring> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>571</width> - <height>548</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>5</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="caption"> - <string>Configuration panel</string> - </property> - <property name="sizeGripEnabled"> - <bool>true</bool> - </property> - <widget class="QListBox"> - <property name="name"> - <cstring>Menu</cstring> - </property> - <property name="geometry"> - <rect> - <x>11</x> - <y>11</y> - <width>100</width> - <height>484</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="cursor"> - <cursor>2</cursor> - </property> - <property name="currentItem"> - <number>-1</number> - </property> - <property name="selectionMode"> - <enum>Single</enum> - </property> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout17</cstring> - </property> - <property name="geometry"> - <rect> - <x>120</x> - <y>10</y> - <width>437</width> - <height>484</height> - </rect> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>TitleTab</cstring> - </property> - <property name="font"> - <font> - <bold>1</bold> - </font> - </property> - <property name="text"> - <string>Setup signalisation</string> - </property> - </widget> - <widget class="Line"> - <property name="name"> - <cstring>linee2</cstring> - </property> - <property name="frameShape"> - <enum>HLine</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="QTabWidget"> - <property name="name"> - <cstring>Tab_Signalisations</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="QWidget"> - <property name="name"> - <cstring>SIPPage</cstring> - </property> - <attribute name="title"> - <string>SIP Authentication</string> - </attribute> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout24</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>410</width> - <height>393</height> - </rect> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="QGroupBox"> - <property name="name"> - <cstring>groupBox1</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="title"> - <string></string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QComboBox" rows="0" column="0" rowspan="1" colspan="2"> - <property name="name"><cstring>cboSIPAccount</cstring></property> - <property name="currentItem"><number>0</number></property> - </widget> - <widget class="QLineEdit" row="0" column="2" rowspan="1" colspan="1"> - <property name="name"> - <cstring>alias</cstring> - </property> - </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>lblFullName</cstring> - </property> - <property name="text"> - <string>Full name</string> - </property> - </widget> - <widget class="QLineEdit" row="2" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>fullName</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>lblUserHostPart</cstring> - </property> - <property name="text"> - <string>User address (ie: user@domain.com)</string> - </property> - </widget> - <widget class="QLineEdit" row="4" column="0"> - <property name="name"> - <cstring>userPart</cstring> - </property> - </widget> - <widget class="QLabel" row="4" column="1"> - <property name="name"> - <cstring>lblArobase</cstring> - </property> - <property name="text"> - <string>@</string> - </property> - </widget> - <widget class="QLineEdit" row="4" column="2"> - <property name="name"> - <cstring>hostPart</cstring> - </property> - </widget> - </grid> - </widget> - <widget class="QGroupBox"> - <property name="name"> - <cstring>groupBox2</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="title"> - <string></string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLabel" row="0" column="0"> - <property name="name"><cstring>lblAuthorizationUser</cstring></property> - <property name="text"> - <string>Authorization user</string> - </property> - </widget> - <widget class="QLineEdit" row="1" column="0"> - <property name="name"> - <cstring>username</cstring> - </property> - </widget> - <widget class="QLabel" row="2" column="0"> - <property name="name"> - <cstring>lblPassword</cstring> - </property> - <property name="text"> - <string>Password</string> - </property> - </widget> - <widget class="QLineEdit" row="3" column="0"> - <property name="name"> - <cstring>password</cstring> - </property> - <property name="echoMode"> - <enum>Password</enum> - </property> - </widget> - <widget class="QLabel" row="4" column="0"> - <property name="name"> - <cstring>lblProxy</cstring> - </property> - <property name="text"> - <string>SIP proxy</string> - </property> - </widget> - <widget class="QLineEdit" row="5" column="0"> - <property name="name"> - <cstring>sipproxy</cstring> - </property> - </widget> - </grid> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout23</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout19</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QCheckBox"> - <property name="name"> - <cstring>chkAutoregister</cstring> - </property> - <property name="text"> - <string>Auto-register</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="QCheckBox"> - <property name="name"> - <cstring>chkEnable</cstring> - </property> - <property name="text"> - <string>Enable</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer7</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>201</width> - <height>21</height> - </size> - </property> - </spacer> - <widget class="QPushButton"> - <property name="name"> - <cstring>buttonSIPRegister</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Register</string> - </property> - </widget> - </hbox> - </widget> - <widget class="QLabel"> - <property name="name"> - <cstring>lblError</cstring> - </property> - <property name="text"> - <string></string> - </property> - <property name="paletteForegroundColor"> - <color><red>255</red><green>0</green><blue>0</blue></color> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer9</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>21</height> - </size> - </property> - </spacer> - </vbox> - </widget> - </vbox> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>STUNPage</cstring> - </property> - <attribute name="title"> - <string>STUN</string> - </attribute> - <widget class="QGroupBox"> - <property name="name"> - <cstring>groupBox3</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>110</y> - <width>253</width> - <height>100</height> - </rect> - </property> - <property name="title"> - <string>Settings </string> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>textLabel1_5</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>38</y> - <width>229</width> - <height>16</height> - </rect> - </property> - <property name="text"> - <string>STUN server (address:port)</string> - </property> - </widget> - <widget class="QLineEdit"> - <property name="name"> - <cstring>STUNserver</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>60</y> - <width>229</width> - <height>23</height> - </rect> - </property> - </widget> - </widget> - <widget class="QButtonGroup"> - <property name="name"> - <cstring>stunButtonGroup</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>410</width> - <height>90</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>2</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Use STUN</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QRadioButton"> - <property name="name"> - <cstring>useStunNo</cstring> - </property> - <property name="text"> - <string>No</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="QRadioButton"> - <property name="name"> - <cstring>useStunYes</cstring> - </property> - <property name="text"> - <string>Yes</string> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </vbox> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"><cstring>IAXPage</cstring></property> - <attribute name="title"><string>IAX Authentication</string></attribute> - <widget class="QLayoutWidget"> - <property name="name"><cstring>IAXLayoutMain</cstring></property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>410</width> - <height>393</height> - </rect> - </property> - <vbox> - <property name="name"><cstring>IAXvboxName</cstring></property> - <property name="margin"><number>0</number></property> - <widget class="QGroupBox"> - <property name="name"><cstring>IAXgroupBoxName</cstring></property> - <property name="margin"><number>0</number></property> - <property name="title"><string></string></property> - <grid> - <property name="name"><cstring>unnamed</cstring></property> - <widget class="QComboBox" rows="0" column="0" rowspan="1" colspan="2"> - <property name="name"><cstring>cboIAXAccount</cstring></property> - <property name="currentItem"><number>0</number></property> - </widget> - <widget class="QLineEdit" row="0" column="2" rowspan="1" colspan="1"> - <property name="name"><cstring>IAXalias</cstring></property> - </widget> - </grid> - </widget> - <widget class="QGroupBox"> - <property name="name"><cstring>IAXgroupBoxAuth</cstring></property> - <property name="margin"><number>0</number></property> - <property name="title"><string></string></property> - <grid> - <property name="name"><cstring>unnamed</cstring></property> - <widget class="QLabel" row="0" column="0"> - <property name="name"><cstring>lblIAXhost</cstring></property> - <property name="text"><string>Host (ie: asterisk.domain.com)</string></property> - </widget> - <widget class="QLineEdit" row="1" column="0"> - <property name="name"><cstring>IAXhost</cstring></property> - </widget> - <widget class="QLabel" row="2" column="0"> - <property name="name"><cstring>lblIAXuser</cstring></property> - <property name="text"><string>Authorization user</string></property> - </widget> - <widget class="QLineEdit" row="3" column="0"> - <property name="name"><cstring>IAXuser</cstring></property> - </widget> - <widget class="QLabel" row="4" column="0"> - <property name="name"><cstring>lblIAXPass</cstring></property> - <property name="text"><string>Password</string></property> - </widget> - <widget class="QLineEdit" row="5" column="0"> - <property name="name"><cstring>IAXpass</cstring></property> - <property name="echoMode"><enum>Password</enum></property> - </widget> - </grid> - </widget> - <widget class="QLayoutWidget"> - <property name="name"><cstring>IAXLayoutChk</cstring></property> - <vbox> - <property name="name"><cstring>IAXvboxChk</cstring></property> - <widget class="QLayoutWidget"> - <property name="name"><cstring>IAXLayoutChk2</cstring></property> - <hbox> - <property name="name"><cstring>IAXhboxChk</cstring></property> - <widget class="QCheckBox"> - <property name="name"><cstring>chkIAXAutoregister</cstring></property> - <property name="text"><string>Auto-register</string></property> - <property name="checked"><bool>true</bool></property> - </widget> - <widget class="QCheckBox"> - <property name="name"><cstring>chkIAXEnable</cstring></property> - <property name="text"><string>Enable</string></property> - <property name="checked"><bool>true</bool></property> - </widget> - <spacer> - <property name="name"><cstring>unnamed</cstring></property> - <property name="orientation"><enum>Horizontal</enum></property> - <property name="sizeType"><enum>Expanding</enum></property> - <property name="sizeHint"> - <size> - <width>201</width> - <height>21</height> - </size> - </property> - </spacer> - <widget class="QPushButton"> - <property name="name"><cstring>buttonIAXRegister</cstring></property> - <property name="enabled"><bool>true</bool></property> - <property name="text"><string>IAXRegister</string></property> - </widget> - </hbox> - </widget> - <widget class="QLabel"> - <property name="name"><cstring>lblIAXError</cstring></property> - <property name="text"><string></string></property> - <property name="paletteForegroundColor"> - <color><red>255</red><green>0</green><blue>0</blue></color> - </property> - </widget> - <spacer> - <property name="name"><cstring>unnamed</cstring></property> - <property name="orientation"><enum>Vertical</enum></property> - <property name="sizeType"><enum>Expanding</enum></property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>21</height> - </size> - </property> - </spacer> - </vbox> - </widget> - </vbox> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>DTMFPage</cstring> - </property> - <attribute name="title"> - <string>DTMF</string> - </attribute> - <widget class="QGroupBox"> - <property name="name"> - <cstring>SettingsDTMF</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>301</width> - <height>130</height> - </rect> - </property> - <property name="title"> - <string>Settings</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLayoutWidget" row="0" column="0"> - <property name="name"> - <cstring>layout11</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout10</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QCheckBox"> - <property name="name"> - <cstring>playTones</cstring> - </property> - <property name="text"> - <string>Play tones locally</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer6</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>111</width> - <height>20</height> - </size> - </property> - </spacer> - </hbox> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout7</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>labelPulseLength</cstring> - </property> - <property name="text"> - <string>Pulse length</string> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer3</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>115</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="QSpinBox"> - <property name="name"> - <cstring>pulseLength</cstring> - </property> - <property name="suffix"> - <string> ms</string> - </property> - <property name="maxValue"> - <number>1500</number> - </property> - <property name="minValue"> - <number>10</number> - </property> - <property name="value"> - <number>250</number> - </property> - </widget> - </hbox> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout8</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>labelSendDTMF</cstring> - </property> - <property name="text"> - <string>Send DTMF as</string> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer4</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>85</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="QComboBox"> - <item> - <property name="text"> - <string>SIP INFO</string> - </property> - </item> - <property name="name"> - <cstring>sendDTMFas</cstring> - </property> - <property name="currentItem"> - <number>0</number> - </property> - </widget> - </hbox> - </widget> - </vbox> - </widget> - </grid> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>TabPage</cstring> - </property> - <attribute name="title"> - <string>Options</string> - </attribute> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout16_7</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>260</width> - <height>23</height> - </rect> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>labelToneZone_4</cstring> - </property> - <property name="text"> - <string>Zone tone:</string> - </property> - </widget> - <widget class="QComboBox"> - <item> - <property name="text"> - <string>North America</string> - </property> - </item> - <item> - <property name="text"> - <string>France</string> - </property> - </item> - <item> - <property name="text"> - <string>Australia</string> - </property> - </item> - <item> - <property name="text"> - <string>United Kingdom</string> - </property> - </item> - <item> - <property name="text"> - <string>Spain</string> - </property> - </item> - <item> - <property name="text"> - <string>Italy</string> - </property> - </item> - <item> - <property name="text"> - <string>Japan</string> - </property> - </item> - <property name="name"> - <cstring>zoneToneChoice</cstring> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer5_4</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>31</width> - <height>21</height> - </size> - </property> - </spacer> - </hbox> - </widget> - </widget> - </widget> - <widget class="QTabWidget"> - <property name="name"> - <cstring>Tab_Audio</cstring> - </property> - <widget class="QWidget"> - <property name="name"> - <cstring>DriversPage</cstring> - </property> - <attribute name="title"> - <string>Drivers</string> - </attribute> -<widget class="QLayoutWidget"> - <property name="geometry"> - <rect><x>0</x><y>0</y><width>410</width><height>360</height></rect> - </property> - <vbox> - <widget class="QVButtonGroup"> - <property name="name"><cstring>DriverChoice</cstring></property> - <property name="title"><string>Driver for Speaker</string></property> - <widget class="QComboBox"> - <property name="name"><cstring>cboDriverChoiceOut</cstring></property> - </widget> - </widget> - <widget class="QVButtonGroup"> - <property name="name"><cstring>DriverChoiceIn</cstring></property> - <property name="title"><string>Driver for Microphone</string></property> - <widget class="QComboBox"> - <property name="name"><cstring>cboDriverChoiceIn</cstring></property> - </widget> - </widget> - <widget class="QVButtonGroup"> - <property name="name"><cstring>DriverRate</cstring></property> - <property name="title"><string>Sample rate</string></property> - <widget class="QComboBox"> - <property name="name"><cstring>cboDriverRate</cstring></property> - </widget> - </widget> - - <widget class="QLayoutWidget"> - <property name="name"><cstring>layoutforsounddriver</cstring></property> - <hbox> - <property name="name"><cstring>unnamed</cstring></property> - <widget class="QPushButton"> - <property name="name"><cstring>buttonTestSoundDriver</cstring></property> - <property name="enabled"><bool>true</bool></property> - <property name="text"><string>Test</string></property> - </widget> - <widget class="QPushButton"> - <property name="name"><cstring>buttonReloadSoundDriver</cstring></property> - <property name="enabled"><bool>true</bool></property> - <property name="text"><string>Reload</string></property> - </widget> - </hbox> - </widget> - <widget class="QLabel"> - <property name="name"><cstring>lblSoundDriver</cstring></property> - <property name="text"><string></string></property> - <property name="paletteForegroundColor"><color><red>255</red><green>0</green><blue>0</blue></color></property> - </widget> - -</vbox> -</widget> - - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>CodecsPage</cstring> - </property> - <attribute name="title"> - <string>Codecs</string> - </attribute> - <widget class="QButtonGroup"> - <property name="name"> - <cstring>CodecsChoice</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>200</width> - <height>157</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Supported codecs</string> - </property> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout18</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>20</y> - <width>110</width> - <height>120</height> - </rect> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLayoutWidget" row="0" column="0"> - <property name="name"> - <cstring>layout17</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QComboBox"> - <property name="name"> - <cstring>codec1</cstring> - </property> - </widget> - <widget class="QComboBox"> - <property name="name"> - <cstring>codec2</cstring> - </property> - </widget> - <widget class="QComboBox"> - <property name="name"> - <cstring>codec3</cstring> - </property> - </widget> - </vbox> - </widget> - <widget class="QLayoutWidget" row="0" column="1"> - <property name="name"> - <cstring>layout18</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLabel"> - <property name="name"> - <cstring>textLabel1_4</cstring> - </property> - <property name="text"> - <string>1</string> - </property> - </widget> - <widget class="QLabel"> - <property name="name"> - <cstring>textLabel1_4_2</cstring> - </property> - <property name="text"> - <string>2</string> - </property> - </widget> - <widget class="QLabel"> - <property name="name"> - <cstring>textLabel1_4_3</cstring> - </property> - <property name="text"> - <string>3</string> - </property> - </widget> - </vbox> - </widget> - </grid> - </widget> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>RingPage</cstring> - </property> - <attribute name="title"> - <string>Ringtones</string> - </attribute> - <widget class="QGroupBox"> - <property name="name"> - <cstring>groupBox5</cstring> - </property> - <property name="geometry"> - <rect> - <x>10</x> - <y>10</y> - <width>410</width> - <height>62</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Ringtones</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QComboBox" row="0" column="0"> - <property name="name"> - <cstring>ringsChoice</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </grid> - </widget> - </widget> - </widget> - <widget class="QTabWidget"> - <property name="name"> - <cstring>Tab_Preferences</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <widget class="QWidget"> - <property name="name"> - <cstring>DriversPage</cstring> - </property> - <attribute name="title"> - <string>Themes</string> - </attribute> - <widget class="QListBox"> - <property name="name"> - <cstring>SkinChoice</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="geometry"> - <rect> - <x>12</x> - <y>20</y> - <width>122</width> - <height>110</height> - </rect> - </property> - <property name="lineWidth"> - <number>10</number> - </property> - </widget> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>TabPage</cstring> - </property> - <attribute name="title"> - <string>Options</string> - </attribute> - </widget> - </widget> - <widget class="QTabWidget"> - <property name="name"> - <cstring>Tab_About</cstring> - </property> - <widget class="QWidget"> - <property name="name"> - <cstring>DriversPage</cstring> - </property> - <attribute name="title"> - <string>About SFLphone</string> - </attribute> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QTabWidget" row="0" column="0"> - <property name="name"> - <cstring>tabWidget6</cstring> - </property> - <widget class="QWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Tab 1</string> - </attribute> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Tab 2</string> - </attribute> - </widget> - </widget> - <widget class="QTextEdit" row="0" column="0"> - <property name="name"> - <cstring>textEdit1</cstring> - </property> - </widget> - <widget class="QFrame" row="0" column="0"> - <property name="name"> - <cstring>frame4</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="paletteBackgroundColor"> - <color> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </property> - <property name="frameShape"> - <enum>StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>Raised</enum> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <spacer row="0" column="2"> - <property name="name"> - <cstring>spacer22</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - <spacer row="0" column="0"> - <property name="name"> - <cstring>spacer23</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - <spacer row="1" column="1"> - <property name="name"> - <cstring>spacer9_2</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="QLabel" row="2" column="1"> - <property name="name"> - <cstring>textLabel1_2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string><p align="center"> -Copyright (C) 2004-2006 Savoir-faire Linux inc.<br /> -Yan Morin <br/>&nbsp;&nbsp;&nbsp;&lt;yan.morin@savoirfairelinux.com&gt;<br /> -Jérome Oufella <br/> &nbsp;&nbsp;&nbsp;&lt;jerome.oufella@savoirfairelinux.com&gt;<br /> -Julien Plissonneau Duquène <br/> &nbsp;&nbsp;&nbsp;&lt;julien.plissonneau.duquene@savoirfairelinux.com&gt;<br /> - -<br />SFLphone 0.7.3 is released under the General Public License. For more information, see <a href="http://www.sflphone.org/">http://www.sflphone.org/</a></p></string> - </property> - </widget> - <widget class="QLabel" row="0" column="1"> - <property name="name"> - <cstring>pixmapLabel1</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>4</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="paletteBackgroundColor"> - <color> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </property> - <property name="pixmap"> - <pixmap>image0</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - </grid> - </widget> - </grid> - </widget> - <widget class="QWidget"> - <property name="name"> - <cstring>CodecsPage</cstring> - </property> - <attribute name="title"> - <string>About Savoir-faire Linux inc.</string> - </attribute> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QFrame" row="0" column="0"> - <property name="name"> - <cstring>frame12</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="paletteBackgroundColor"> - <color> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </property> - <property name="frameShape"> - <enum>StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>Raised</enum> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>textLabel1</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string><p align="center">Website: <a href="http://www.savoirfairelinux.com/">http://www.savoirfairelinux.com/</a><br><br> -5505, Saint-Laurent - bureau 3030<br> -Montreal, Quebec H2T 1S6, Canada</p></string> - </property> - </widget> - <spacer row="1" column="1"> - <property name="name"> - <cstring>spacer19</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - <spacer row="0" column="0"> - <property name="name"> - <cstring>spacer21</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="QLabel" row="0" column="1"> - <property name="name"> - <cstring>pixmapLabel2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>4</hsizetype> - <vsizetype>4</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="pixmap"> - <pixmap>image1</pixmap> - </property> - <property name="scaledContents"> - <bool>true</bool> - </property> - </widget> - <spacer row="0" column="2"> - <property name="name"> - <cstring>spacer20</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </grid> - </widget> - </grid> - </widget> - </widget> - </vbox> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout19</cstring> - </property> - <property name="geometry"> - <rect> - <x>11</x> - <y>501</y> - <width>543</width> - <height>36</height> - </rect> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="Line"> - <property name="name"> - <cstring>linee2</cstring> - </property> - <property name="frameShape"> - <enum>HLine</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="QLayoutWidget"> - <property name="name"> - <cstring>layout28</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <spacer> - <property name="name"> - <cstring>Horizontal Spacing2</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>160</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="QPushButton"> - <property name="name"> - <cstring>buttonOk</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>2</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&OK</string> - </property> - <property name="accel"> - <string>Alt+O</string> - </property> - <property name="autoDefault"> - <bool>true</bool> - </property> - </widget> - <widget class="QPushButton"> - <property name="name"> - <cstring>buttonCancel</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>2</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>&Cancel</string> - </property> - <property name="accel"> - <string>F, Backspace</string> - </property> - <property name="autoDefault"> - <bool>true</bool> - </property> - </widget> - </hbox> - </widget> - </vbox> - </widget> -</widget> -<images> - <image name="image0"> - <data format="XPM.GZ" length="58862">789ced5d596fe3b8b27e9f5f114cbd0d0eea6475625cdc878eb3b4b34ca72799e9745f9c07c74b76c776363b07e7bfdf629194488ad49249e4f40151109292488a923e7dac85a2fff9dbc2e9d1e1c26ffffce5fea1f370d95de85e74260bbff51e6f6f67fff7affffdf72fbfae2c2d2f34971696165717967ffdc72fbfe21f0bdd05682c37d61a52ffcc7a87f40eebbb4a6f2a7d47e93da57f17fafa4aa3b7be2274e8487d7d49eab8a4f43575fc96f533d2cf58df547a53e953a5f794fe22f48d95f5de866caf2df58d25a9c34ce96beaf8b9d4cf96cf56f9f890f5333a2edb1b2bbd29757c547a4f1d1f495dd7c78b44efb13e507a43e9db426fae6ef49af27c7da93797943e50fa9ad4f145ea49fd65a577947ea8f5ee1ad7df557a5f1e872dadcbe3f8c47a97daefb2fea0f4a6d2ef95de53faa5d4757de849bdbbacf496d03babcd5e47f6ff52ea9d25a583d2d7a48e7da927f59f125d5ecf27a537947ec47a97eacbfe4c94de51fab1d2fb528767a927f5af94de913a74b5de93e7df577a5f955f14fad96aa7af9ee758eac9f36d28bda1f0b22775dd1e9e28bdaff403a9f79695bece7a2f799e23a5ebe7f9ac74f5fc7045eaba3e7c4af43e1f5f557a43eac0f8eaae25cffb4eeafa7ee354e90da5f7a4aeebe3b5d23baa3d7e3fba3d7d3fe14ee9ea7ee250e9eafec195d4757dfc5debfd06eb6b4aefabf62fb42e8fc367a9f79795ceef5b6f2db99f33a927f7734fe90da57f937a52ff20d1657fba4a6fa8fefc99e8f238bf2fd43b7d3f51e9fa7a6e95aefa8f9b52d7f5e14ce91dd5de86d0fb0d7d7df855eaba7fd854baea0fec285dd587b6d607f2f8b5d2fbaafd2f5a57c7f97dee27fdc153a5ebf6264ad7f5ffd2baac8f37521f2c2bfd4ce90da5ff10fa20391fee4b3d29df52ba2edf49f4019fff46e91da533df0c06fa3882d2d5f1af0f4a1f683d4a94fa24622e4add123117a56e89988b52b744cc45a95b22e6a2d42d117351ea9688b928754bc45c94ba25622e4add123117a56e89988b52b744cc45a95b22e6a2d42d7f177308d821399bf77544f979e4b598c32ef6b08f033cc70bb55de2155ee3cdbcafe8e30bdee210ef7084639ce03d3ee0233ed1df09e9cf38c519decebb87ef2bd53147ac768d2f8cb601612dfbf7136ecefbaa3ea2600bb70855dbb883bbf8b960dbc5366171847bb83fef7ebfbd54c51c1e58dc16da0e3f0eeef81df91dbfbc4bdbfb848b23622d282cf99570f4c7abb6e379dfc1b7962a98c31b1a3ffddce6fb7b52aac53f091107344a5ff2d87c42e8f8eb2daf0fbf25fd7973d4e1293392e0a5eff8a3a0ec6221b785b6a5b7eef7bca53ce6e8e915f39bbd2de7f916c43f57c17a2b7ebb903c966f6447ae166c6b29be08cdbaddde5bdf3b6c187c342a28bbe4e1b0255c278edcc0267e05c42d00e8f8b80ef0ad7b3e5f298b39465c96cb06849b2b42c8359ce1267433c797b1e36d0d88db2e0ab8f2c41db108a56539f602bfa9f324fbe1cd31077d838f724740ea4786bf60e02b07e7597b0fcedfbae7f3957298f372dc00d7ac327f911597e5ac818fb108a7699915dc14c8c40e9cc105f48cba874ead9ea7fdd0c67da3676df8d56f7defc8df4cb928b7751a855deeea602b507694e1bac5b7eef97ca50ce6f08b974baecd32c47321cec93c0db2e0521f37c38364e3ad32838ae3dfac73749df69709bb3d204e931bc915fd774dffabbec14d5e3ffeae900f9a72513ee6006e1d9edb0a9786a1c373776fddf3f94a29cc2dfbb8c4ba4b6730cae19c15abb52fc9fee073a267744163ab331a1242cd7657a13016581fcf6151d99151760727b9656fd9fa53e561f8d6fd9eb714638ec63eafdd649559ceb7afe0dadb5ec5f8b1652f96b2ce98e7743fde97e7c685a587e42734b3f13698900771ef29dfa211f9166790d766618c46956bc2234ee9fca76f7d0f5e234598a3912ec45f3725caa80d9e8c7bfca4f62f57ed2b3c57e5ac6a3c87fb70477e64533c49dcc7198ef101a6f81d66788477d9676ff1dc1fd2d2a7e7fa0c973084195c12b70523bad4b3676a7da6f90c3a30a61acd40e91f7847e567844260940e71421ecc928e1e877009f7e40bbfa49c293816c80dae7ae7df568a30079fcac4df380b96ef4b265137b6d5c4fe4f55fb6ad87307256b54b0e70861a94fd9f1c6ca1c5bdee439e6ba4e12af4bda8147efb9a6b0e9cf3f402bcb4584c5cf057ddbf58dd6701eb80eb204ca32e47b4821cf0d82fc3548fb4dcfd66bf319db956a2fe144c8b1a2037d49ec39b82859a302cf116b14e604888b8c676bf35cb0ceb6739e0d62a6dc3a84310311706ff154f83cb6853d8171ee39a64551ecf7937ccc4149eee2d859418e425bfc894ffa37ecb9b29833edb97c8cc343b9bc00f99f498cc3e539ff465c6322085d2ef46e064e7156a65fcca98955483ed8b0b04e7b5e5c5780b96e0e772dbb1126f20ef2b84e656089add27c43a5ab4eed3928392e97e7395f3e1436c9f619e13d8f50e9fe84e9caf11c6d897f41c8dec91cff4ee36cb64edab359e9dc6ce2e11253da1cb8497bc66401dad7f72131c7fe68c817ddf194ff421e4288eb5655995563ff7295b900863d57d287b0ecb9c3dc92599e3347d16d63ffae1e95b23c0703c2e83159edf6fe84b518a5d639a4f5c6734edaceb199aa93e1397811ef029dcbe52e957f33f2c09f79144d7c06f2904d3bf27b282efdbe92873908fba397e18c395c046cc0849bac5cc33969d7e5f2ef567ceeba548dd7f39ce32fc038cb412ecfe9d82db6c0e226d00c3fb4b8a7a351a5fbca2832b849ed77788ed84af11379d98e1da86a3c18fb3fdb769b7d9daead598fe4610ebf0438ab2036a66c3bb75e12d123241c7a8ef7b1879b79715e279fbb92df0bae61c6e772633336cfd93618f779cb3caef6d93c67645c9969b2e56d2ef5cc0ae051362dc3fce4f09cc54d60e571a1aff6764c4ecc9c636a5c67e6681d928bb96e96af60b7242765e78c185164c2c20a86e6e1898cd6375f9b467c4ee57269cf09b1a42d9be96c1693e7f27d0887e71a9eb34f8de3724434796ed78ec5391cc8c74c5b0ebc36059c5b9cc628b679ce9e1940bd36cb735c86fc629b17ad5929ecc398c7e71025ce1d5bcf325c5421a606570e9739f32838bf15f6750fb3a36726df1afeab50f76a7bce1335b5388547c5bc3c04581c28222c840593af02790b93a3a41de8f09c937b25de73cb8f1c3b8fd80cef69ef049f4c8e53dbccdf8ff7945c9edb7478a56214173edbf5bde7001ac1d788ad2e3dbce7ccb374f2ad79db4dd27aba2f17738e9de3cb45ad1bfcf0cc7bcc7925ce1be5d85a6453c1a3c55781f94966ec0ea6bcc7b6e79cecabe5f34a9e9b94f673c5f6fc1628aa26b93cd7b6b8a354ae8afcd6d574ae0878edb990e00d95bfb238cb9a7f97999f774863ab98a3796d6e84f4c4267c9d3d07de397f8c22cd5b6ced59f69c930720567379cea8af6d35cf3dc8f4c3e1b90da757e30ccfdd67b82c67f3e749de577279cef65bd3b9b7c44df464fd3697f4493fe9a33c37d3f15bf385ce7a62d88f8615e6d873d725be427815cff96d2df23a537e38e23da6cde662ceb60f7f64e6c505ec28b8346d446ec9e63907ab561f183fe4d796e5b85d7a6be610a32b88cfa5398313b56713b59de68d3d305e64fcaec7333121c9af96f0339356560dae4bfc34d39e2b9789b0ecb9f27eab27f2e8f014fb9c16cfb9b195877c9e0bcd37b7da6cf31e8be7dc6cbe555ef2dc83cd6564cd1d1147cf5c216fe263c68493f9bc623612f9142f066f9c786b98b9089e73492894ba971773ceece42fac7c6bc95cadc573b963bbc34b9ef920786c1c67abaa22cfd97c159887697d3721f754e4393cb2ec46af9d305f29c0dcb5b68792586f9abff4320d5c383ee441e29b56fad69ff854b7b39ab49dda732539d3b2e7cef3de6b87973c2c0426dfb0556571cc716e7b82e79a165f79470998581cb5ce67a9ca730dab8dc2797df54b01e63a094f64e36dde6f02c907f5fb92157d5e6c2575137e34f2adaf9957720139b90bc76fcde484a83fd9785b259e7338cc6bd1d9795299d7a8cc73b7561b7e0b08e6397bb370fedc5e300ee6650d62466f79a8b8a289f18d57ea8526f65cd9d62c7bee22ef8b5b273eb7eb8eae3831b84667a52ad9733cea99e7c85eb39527d57da8ca734e1ee2366b27e0a2884e136fcf213627a4107367c118981f7327deb2b93ea3b79d6b6d131afbd2f85cc9595036cfe5f1a39b6fd579247517d0e21a9d4bafca734de71c1607e186fd0dace6daaa3ca7a2d7693b632b5b36219426b6dec7cbf1ababfa1488f5fba3584f5e4eec5a2d7e29c20c8d6487b23e18350d7baee437f98e3d27da7bc26bfe4aec0c76f026b5313df34a1e93f9235bc416296725b9d86af61cd77062678487a9980bcf2b99d8f3eabeeb79ead5790ef7ed6f64a9f777c4a12d7a73d6ad3cc72eeebd359eca4809cc75d03f4fe44f4fd91b1f278215eb861ecab973413f965a39d4fc68bda3697cae24e65c9ef36df024d8cfbf9e08bc40dfcab38a2dc9c556e539f12e79e7cae5e607aaf31cc7654a9c43e639ea9752df1afee9e52e8f756ac5d5923cab3d57c498537268e62cd4d18ecafecbfa16b68cf85ce9b547f025688f5a9c5d7a9ef0d8988d6bd671fc43e215b3debeb17fa9c479ccb97b95798ef717ae8f42e89fd3ecf492dff11f7839c2f10369b4cae44c61e4ceedc41bd8b2ca5c72066b8dc6bc7dec9bf1347b44b66276a5a39999b928be6d10e2b90cefb5cc33e3c4389659338e9ea93e66dd01f12d56ee7976ecd89df33d843b37fbd8386665897196c7a9e4417cd0ef218c2b58f172841127232bed30cb21bed9c41cc53bcce59e174260c6e6c3dfd5f10a1e49609d15fbef75a9ef2176325fd3fc20ab4b1e6b7bce7cac8e7dcfe6f3f1ab9527357dd5a32c16f029e1a6ec9a08a9afbbebe662bf8a6fd9be67cf43e79e8b1da7a5c2ba4c2b7e8e202611ab21f9befbbac89b794e185dc1cb6c7be4b3acf96b243c7a55e50af10b5c65e6d8a5f24d62db89cf6d8ad506f116ce0939c46770e7fff29438eb0e4710f2e167b01d5ef781fcd4291e93bdb8091db21bc70070e79bcfc2e74142cfc8df07f2b7ee704cfdf0f7615f7c718b47d4fe0c0506a7f3febab5e2fa73df8cfc6be15ff2154a45d1e89e7dc12e1c10a20af334342e1f54cba1951587e7d6dfe31c51a4545b67932cfcb273d856e77d65d5c4b1e7fecb57f49daf545f4f18ce3cebcc59f3e4b057cc581f4d2c9efb3ecfafdcfffbe575eba613dfadaa58b1c96dcb7812b2c53eba58f3e7e6f265cacf254994fb156b6cffbddf87c01659619bbcc666096bec230b790c29cfcdbd37957b7f1b9a1bf54ee79b605bcc3026ff7b884fc15253ff4c82f83b385ae025b1e77e8a95cac9537dd4cf148f0803019ff75dcedda7bbb52efa407f3d7122eed30f98fa675245cc6949e69ded64e35c1f51a08f6d9d8703a0ff6bf47b08ed7c6e62b2761073b774ccfbf646cca5c22b03ce7e8e5f01c12631db4b92d53f224ea9317b8adb74be06af36360dadb543e3ee4be4b9aa8220a2baf82c249d394c96df3eaf8ad8247c9a6b81006ee008c5bccb75f5053e582b324d6cfe34d6779af1d7a723dc4a66ac00b5b108e7380cc589517c952884bf06123c074311b9a636c4b70fd64a50740d47b84eef53c1db04f738c6276a690cad74bd46c2ce3936685ba7f6f5fcaa323c774ac7bcbf60103117161abd8e047a080153fdcee20f7a26e24edf132a1e04d7c84c83989706537af6e2c91fd3336b094b3bcd55c13d3dc9699a3d23dc3e0a1c93d5d3a2273862643cc240cdeedc127692380fb5ef99274f3d7a54fd78e49537c56a9a6dfebda60798d179fa12a9544eac43774c489ca2f82e312707c1f938d9c63db5a1381487b84d75c53b764af7635baf6020ed39be2f219e8310f746cc85c5e405badb6da103f38bcea0121bb465665d7872aebf4b8c933c0f40ae97cc04854769f513e2da3ac34a3ca34ac09d6431f20a037379457d3ece7599e7668a5d9b023bb28764a3b6d3160889399683b8428d4a14efceb6ea53bab2a5e895fc46a304cf718b5e8c47cc95131ecbf6388ed74e5732a7777906721d89470fe6c8e6d2775da09339418f4e13815562b7a9594bd86522064123aae0b87e78ee07f1a4e04048eb19ebe22d4aeb9d38746622826c84b66f25163ec69c9a9ffbc73d7d8d65ec3931c3c0bf3f62ae8c306371448a79cef8f681ac37f915ea3a3353c35979eb51e7f84539168dc16dc144b2969e1387fb0223e249499ecbff5d0818a4f612fbad49691a0fd9cee335eddae96a13c2560bc51e39da92fb8d188fad8a87cbf15c287a1331972fbc7afabde4288101c173e69a21642bb5d53aeb6c0d11f7b4d2df39c4b1b4e8041f12beee68ec92df729dca919af889ed3042e494acf47b14489ae9b857becd0f2de2448d6830ed3ee6e24bf9a6703bf41fa1f888da7e0afd2e19db0ea17b704a0c3911f6a8b01f794f097b2e2c117321c1167b09fcf536bde3438939e639e38b6ec154fa7fb27deea43f49a5e52a3a5bd25aa367ced8a3b148f2c4a2fcc2465873f42cd14597e4b982fedda74cc83c675a9fcc73b0adbcd912d11fb6e63c5fe4d01508bbe007db78e2ad929e45299e0b49c45c48c4334d474acef69c2b9e33ec7ab6d2adf71c26621c250e427e4ec2b34cd0c156d8808f4b5d708767652469cf15f58fb84dfb32c29e4b7a21ceca3c37947fcb5e6d766c657b33b100c5fb26cb94b3e7421231e717810ecbba9f04786e94c58688a7249ee391b2e3b46fda521ea9f47685e5e5fb6587923c67d973e6ac7969cf9d9a9e72416b23ee97b326077be3497e83af3df2dcbb094cf819682ff394b5a987e746ca9e33c625b6a75ea4b720d0435c90c6e59e9903d3b89df00492f9bf34864ba40ec379cca4ec84da51dfae727c2ec3733c86bfa4ab7d91b5300dfa98fb6caf6d2719dc0deaa988eebda416204764c6b2d7ca9e1be6d97310f855b388b990f00828be09ddc031fb93722685e00e234a4b969a8c9534e8dd5f17bf8e04d2a6532312790f633342c1f113834f84374825d6a9ddafb00d331561c6222f52fbd26a55b2a30ccfc9d8728bfde545dc00b16eec76deec059cb1cd3aa41a138ef08937e996e37e77e25de0b743c70f5b9263a5671c686f3fe621aa0bee894c02bdef7b34aaece9cc8fbd8616dd5995d1a2e313fe052f61bf19712ef1bcac1a5fed118cd8846a127300e156b10c79230d7745cdac48bb51b02e21d62a0d8f464e6e28fa457d1a17fdde35e1f252bc5d847cd01904eafdb6f88e82aeee2b217028475a7a0ff95706443fc3bf688c81bc47c4dccf2c345abef91783ef3fc721622e4add123117a56e89988b52b744cc45a95b22e6a2d42d117351ea9688b928754bc45c94ba25622e4add123117a56e89988b52b744cc45a95b22e6a2d42d117351ea9688b928754bc45c94ba25622e4add123117a56e89988b52b744cc45a95b7efdcffffcf2ff6d14cd7e</data> - </image> - <image name="image1"> - <data format="XPM.GZ" length="68046">789ced7d5973eb38b2e67bff8a8ac65bc704aef62526e6c1b2655b5e655b5e27e6012b49efbb2ddf98ff3e496482a224522665d739a77b5c1951559f052480c487446221f95ffffaeb6cb8fbd7bffeeb1f4fcfe239527fa9503cfef52ffd727333fedfffe77ffdf73ffe59afd6feea56ff6ab53b7fd5fef93ffef1cf90ffa5fe62ad8aa88a6e8c83c0e1a6a80b1563bde6b0111d5989b1b50e5bd111d6fd7e47b82bab4e9f242c65c3a5bf8c71bbe2d3ab178f49dfa6c355f8ddc498dd27d8a53723c2a4dfd6138cf50f082bd98cb174ed69d7e077a79f3d385cf7d8ae3adc1082eabbe2700bb0fb3df820acb1fec10d61235b0e1f24b8edea5775b80ded75fa82cd04d79dfeaec3d01a4c6f9f1dee26fadf11cbaa143116cebe6dd1aeb5b17d4f8821bdc3914eb0d31f840976fa4c40d8a03dc211618b3840fb43eba5eb6f317058b6eb6da78fdd21067bbaf644970976e51b41d8a23dd8196259911da70fcb57ed461bdbf786d8d7df7c2418ebbf42d860fdc31a618b980d1dd6ed661bdbd3439ce8bb254ced13c661d36eb55dfd84e36fdbb6e11fc78f27c29db6ab6f887cb350beab8fbe460ced71f9a5245cc5fe93ae7e9d8acf2ffa84bb6d1c3f1162c8efeac35e128cfc39235c437b057b0976f999e357a7eaf5294358b41d3fcc2a62682ff2eb3dc168af53c4509ec3a2e970cde757ef84655bbaf67611fbfa062dc255ac6fb44298ea2b1c1f3a759f5fdc12566de72f827bc4be7c799960d4df275c257e3e10aea17df507e13ada4339fb771ac000eddaf78ad8ebd3f784499f584930dadba727fd668d709dec6f093724d6bf4bb82d9d3fb23dc21de5fc837a74b8090c73bf73b467d397afb708d7b07cf344b881e33be8116e49d71e7b40b8abdc7893cebf755ac050e7fff81162afcfea04bbf6084eb88e386c24d8b54fbe11a6f285f34f9db6d7afb0fded4ea5e3dac72f10fbf2f898701db1784cb02b4f350837b0bf8c4f4fed511d873b5ebfb8275cedb8df39b6b7e3f5458f843b687f739360acaff32f9daecfafb608d73ace1fb010b1d7c7b70937a8bf7708b7a4e3af6c3b2c3af58e1b4fea04b14f1fdd136e62fbec5d829d3dd92361af0ffb57761a1dc77f8ef697901efb633dc1e87f4f09b7910f6cdf61d56976d07f30c43ebddc20dc421cde11eea2bd3496af3bad0efa2ffc5d437a575fbd4bb88df58d5e087790ff6687b0203e62fb0c3004fbbb4d18fe71f6c0f10ab321eab7db0976fa830bc202c78f1e11560ae7b3b704e3fcd527ac956bbfba72d8faf2c43ae16ec7b55f0bc4be3ce9fc65b7e27f1755c21050b8dfd710437b5d7af69660d77ee1fc5fb7ead39b016148e0fa730731d8dba5673ac1aeffc23dc2d4be3024ac15f2cbd9ab5bf3fa34eaaff9fcd1156141fa2a84ad72fda99cffefd68121189fed13d61d979e6f21f6f9ed4982911f1dc2543fd324acb1bff5b1c30daf4fad13361df47758ff86d767df084bc4e1056185fd2db0bca6cfaf6e09db8e1bcf4c2186fc18efbd12a6fce13a61aa9f3d256cd09ec6f9bf6ecbeb332b88bb952e968fed6f4985fac34b8f51bfd9204cfa05f667dbe7971dc2d5aefbdd3c23f6f9f92b614dfa2e095be47384f56fab0af1d98d672067adebec1fa03d3a3ebf6e2618db3b246c68bcdc20067d38bfec13ae2a8c4f90bfdd6ebdebec63df11437e8ce702c4aa86e905b65f741b5d8cbfb07ce1d3f34a8291cf02319487f1c107e11a6279e8b0ec36bb381f3f20067bb8fc364c30f61fda5b427b305ebc244ced892ce19a72e35fbf136e2a1cafc877053d8ef3d53962d087ed5f235cc7fcccf997ae861ec5f6370883c370f947887d7dd813e12af9a72e61af8ff2ab96c2f182bf1baf4f22bf8dcfafb0bf2cf410c68b686fb00ef2233c235c477b868f09467b30c24d85f38f6b9fa8400f3acc0788bd3ebe9b60d4b74398f4070f84495f5021dc26fb3abe892af428fabf087192df106e2a8c5f9b8485c6f9d9b547d4a0879c3ed527acbbe8ef2462af8f3d136e607bc301e116d64f617beb6061f4472f887d7a7544b889fda39e09b7b07ecaf967d1f0f9c52a61db457f748dd8e70f0f09537e4bf9bd7d4c9bb0d0e86f3e084bedf8ae5dbc259a5ebfc6fc4d5111e83f2e1127e545843ba8df7a4cfa14d6a705eb751c9f847dfd84f31710ecd7048ed713c449fbeb84db684f53230c2184cb5f4930c6c38ab0c2f6055784b5c6f181e577445db8f126ef117bfdfa817087ca538415b687a1fdbba221305e0a11fbfa9863c2945eb9784608b020f21beb23805e2e7df89c6057ff708db05438ff397f22a4cf2fba845b02f93c42ecf3b373c252213f9c3f170a2cecf8c6b07ca5048e7f1311d6c87fe3e27ba1c142e82f38629f3eba262c115bb497d6158dfe14eb67c042aeff38a637be3dc13161ea1ff1445823b62b887515f529b4af050bbafe08b7112b85fac26a825d7b851b4fb20216c278e510b1ff3d6810d688cd1d6183e5b33a62688fb3b7dd205cd3383e1d5f64152c8ae3e99030acf05d7b03c45ebf7df118f5eb3a61ab31be72fe4ad67c7e7549d8e0fe52b885d8d7cf0609c6fda00fc216b16e2518c7b34c30ce2fd8fe1ad8d7b52f7a265c437b5b93605cdf6e2718dbeff820ebbe7efa80b0a5fdb257c4be7efc8630d52f8a107bfdaa45b8a171bcbbf12c1b893ed41faf9f5dfba301e244df43825d7be51562df3e7b94606cdf3ee13a962fb17f9a5ebf1a12aee27e12c3fa36810f38febb849b1ae373c74f19af6fd17f61fe16a477f6e62b84ab8835dabfedd3eb27c275dc1fe1d81f6d9f3ed0846bd81ef94eb88eed09b60937b03d419b704b23ff5d7c2b3b5ebf1e126ed0fe15eaef4079e8cf2ce11a62db264cf68a9e08b735c6f3ce5fcbaed7a739e126ed9fe0f8e87a7d7a35c1185f62fd844fcff608b768ff00ed2da07cec4f45b881ed8f04e116f607c3f11aaf4fb1be387ea4b7176f10a6fc612bc1185f217f145808fd1f8e37e5d307bb84a9fdccad5fa58616e37c8bedd75e1fdf23dc44cc2e08b7703c9933c21decaf4012161afd19fa27588fd27ecc3a62d087f9cf0993bea84fb88dfa4c48b8ab717d564f30ae6fd05e162c86f3a922ac70bda8b0bfadd72f6f0993fe7095b034387e1c1f5525c92f086b5cdff14dc4901fe3c967c2d45eedc6a3aafaf4ea94b0a1f5da0d629fdfb40877b0ff831ae12ef68f70fda56a3e3fab20f6e92523aca8fe6ebcab3a58c0d547be22f6e9b921dcc5f6cb3e6181f6d5ce9e10dd55687df44ab84aeb9333c43e3fab2518e7ff3161d26776096b83f184e31b445fa4cf5c10aee17a85df2286fcc8cf2a6189fa6425c1b8bebc22ecdb8fe5b7bc3e31225cc7f5093f46ecf5471b842562b34ed8607dc5598271fde4c623445ba44f56093768bd3244eceb6b1e092be4ab6e13b606d7bfce9f43f445f9f519e126ae2722e45b07f263fcf29a608c474e096bb447b0ef31dac3387f08d115e9532b845b18ff73ec8f6ea26f8330e9b37dc206f5856f884d05ed13ac2518f79fddfc06c1451bd70716eb2bbc3ef346d8a23d03e4af305583f5433e49b000fa8723c4da607e7ee031d6275845ecf30bccafa085383eeb887d7a63085bc41ac76f1c1fe2f87842ecfb4735119b1aea0f3b84eb06d74fad04e37e37f2338e17717c058415c6b71cfbdf78fd01470cf6c3f91af9697d7a8b7cb6dede518f7015ed179e2718e7c357c2543f7b91609c1f9c3fd571fc88f1ef0031e4c7f95f2518e3bb63c23eff05e10662ad138cf38de3abae428b91ef06b1d717dc11ae219622c1b87fe37f6f60fdcd15e126ea57a81fe2418a7f0927fa2618f5ad11ae63ff055b845b06e335177fc1ec5ac1f854bd11ae627c667711437eb4ef71829d3e734d98f431b7ded70d9f5f9d13ae61fcc5b17d0d9f5faf106e10bf2ce136ead38e4f305b527e7d4eb88ef195d946ecf3739d609cef07847d7bb17e2d9f5f87841b142fa1bd5b606fe44f8d700bed2f1d1f75dba7d701e126c537b788213ff285116e21b61eb70dee2f20df3a5003ec6ffcbde3d3eb31e18ec178f088701731c3f677a106b87f718018f4637df1770125205e45ec7fb79d043bfb44fef70ee2604c1896782ebff3afe0ddbb387f877dc43ebd6d12a6fa9977c294dfd4138cfedc1096884d27c16efc48e49bf2e5c9066181f3b9467b29281ff11be12ee1f504bbfad847c2549ff088b02f5f1256583e437e6a6831da1bdba3bdfe684cd8a777f134786b85f329477b1a280fe3b367c212cbb7878495c17805cbb35022fa27e4bff5f9f93d61ca1f9c2718e3434698ea63fdef9af43b6c2a50433cefea21f6faf40e6185fac40b6163717fdaf93f53851aa2ff6920f6e9a377c206cb0b373ca6fc6ebd0bdea982f38f8c0857d1ff734598f4d92a618ded096f138ced71f6066f42f9c51ee11afa732608537ee37fa7fa29e7dfc05b507ab947b88efed48e081bcccff7138cf1c13d625bb158beeb4f18fd945f8e0837d07ff22e619f7f1d31e4c778cb8d5718fd945e0e0937c9bf55095bb467c411fbfccaf93f13fb1bdccff198d2f307c4901ee7ff1bc255acbfae2518e7ab6bc235c4519860dc8f73fed57492f27609b7d17f71ec9f8eb74f68087bfd1dc2a44fbb78ce747d7ed123dc417fc5914f5d5f5f2e138cfbfd6784499f443e0b9f5f5f12ee92bf3a460ce9f17cea25c158bf2ae13aea53680fe9f3b323c202fd0143fdd2e737f784eb16e737ca6f1b88a59b8f4dec7fd03f617d15a4c778fd34c1185f9f2418e79b16e186c5780cc757ec8fd0bf60ff6a9f3f3822dc202c083731bfc0fa19d080ebbd26625f5f734a98d2eb7e82717d8cfd6ffd78b1d83e0bbf637d25e116a60f77138cf1931b2fb6021a707c9f22f67ce5823095cf2ce11662fb9460d4bf49b88dfa95eb4f600be95303c2c4a74811267dbc93608c6f1f08933ee67fef58dc0f77f32ff43ee9934dc2c42ffd4898f4c907c26dc4c1907007f50b672fe83dca6faf09537a5e4b30d6a74d98ea23d13e0dcfa7f09430e90f5f128ce91d3fc0bac40f7d4b987ee72dc25d6aef6b8291ffaebfa175d4df22224cf60cf709537e354a30aeff4f080bc4f226c1b89e40fbb6bd3e51274cf6608630e50f9e128cf193222c110bb457c7e797cf84c93efa8a30e5679230e58f6e138ceb75ac6fd7e7976784a9bdfc9130e597d709c6f12a082bc4c2f903289df2eb8830b58f33c2943e6c2718e76fe7dfe2d2b03cbe4e98d2eb6a8231fd98b046cc102b9f9eaf11a6dfc55b8271fdfc48d82066681f9da41709c6f9744898d273e74f6284589c2718f7d3de095bc407d85f76827fe4477e9dfc70ee477eb5fc70ee477eb5fc70ee477eb5fc70ee477eb57c3fe738e3824baeb8e6865b1ef090472097fc8a5ff31b7ecbeff83d7f8034ec77b7fd477e8f7c27e7f82330ed893ff317fecadff87bae8cf907a459e13dbecad77eb7057ee457cb77708ef7f93adfe09b7cc0b716726d56b6f90edfe57b7c1f7ce3f0775be2477e957c9573c037c90ff8213f2ac1b57919f1637ef2e3f3feff90af700ef876cacff839cc955fe11bca05af80c7abf2feefb6c88ffcddb22ce7f890d780235bbcfe0d7c9bc4793bbcc19b3ffeee3f5b96e31c6ff136f8b7afcda779f20abeb3f3bbedf2237f9f2cc339de659cb1bf856f7e9e0d99f89965ff53a52ce798e46da6fe260f379123a6f92d33bfdb3a3ff2774839ce31cb0216fecd7c4b8445ecf277dbe747be5fca708e37d9d5b7ae193e933abbe627bfdb42fffec26ed8edefae435a8a728ef7f90344f74bcd93e0b1eed83d7b608fec89c5a7142f7cc45e58216dec8dbd7fcf3a968dd9075b613db6cad6589fadb30db6c9066cebcf891ba186db6c87ed7e973ede8716efb17d366407ec901d95cc3b62c7ec848dbfbf9dc538078c5b85756a9979f1949db17376c12aacca6aacce1aacc95aac8d3dcc3aac2b78415d1f8209f1d5760a2994881fa3b22909a03f564528a2efb7eb9275bc845a5d7d9bbe6b7123026aeb2ddb2e9397dd8a3bc875ff7d2360220539d7150fc5d70de2513c8967f1225ec59b78cfb4c6587c8895c2fc557cf52b6de47dd113ab622db63d1b8abe58171b621370dc1f03712bb644a9fef8bb44ec885d18037bdfa30d5a0d1e0e1907ff1d8a8392b90fc5911889e3ef6f6711cef1137152dcc389537126ce17b6e64254f84529aff9067e76e939908d8055d6f1ab2a6aa24e7fdd15bba2219aee9796687fbf6d7faf88e3f8ddd124dd3f29a2fb9c735c42245f981d12922fb4c4580a29cbf08df42aa9976d23eb01dbe287730c5b9966aeb432000f5095e1df319e7faf88ed645e35f20f891e503ee31c6ff1a0b84f9297f24a5ee76b9337f256de95671cc891bc970fcbb41078f5e818f70433d7dc6807af1bb191fcedfdf0ddc26ee54be2e5fe96a86c7959cc393e94af65f67fe51b6b2db08391cbb06d222bcbdcf3946388d89ce5e5c7efb6f6af12de972bb297706ec0367f778dd2b298737255ae9562c5a5bcc9d5752dfb72fd2b9c931b7209dbc901ac1a623fd7935be572421cb827b7d90afc7b67369a646371cd32dbcac672372b3a1475b927f7d9891ccadc689edd4e7b62b7dbb1c232fcf3276dde9287c9cc8a51c5dc3ea73c9223b92f8fe5893ccd8e95e5d974b962479ecb91881645d630675cc86db1270ef2ebbc8873fc943d9764c57df63ad58dbccad718e7e4bc7c5427abb2e6ec5e978dc279e2773db6645b76645771c5643b7e1bf084b330230f95943da5667382ad5795141b2a554f712c57d83af89d4b6560cd722bebac2fabc0a6995e018e6b65c5dda44fd909db8fdf9bab0271a34276286ec4502eec73141561049bf274eb6227e9090be3700b346b68dda53c64fbea4abea8ebf45e1cbb15fb71fb27bb7af240dd884b7129ebea16f2dd418dee451247c55ad583d8528fd0cac7b88d624b06f228abaef99ce36beaa9eccd38f59c670fd6562f5f665c5cc26bd9f955bda977dc2f009bd58b310ed61503e813258fc8dae398b7eac33389ddaa0fc7e3d6b446de572b714ad99ef815b6a57a2ade171ca855b5a642d557eb0cf44b037d325dd30757cffd894ea8b19d15b5f1b9d7735c4de581d1b1e97b46c6abd821c4783d3570f84c8cd456ec0be5fea4f7e4998adfea6b54b28b2477d5d64c4d8c4a78ac76d51efcadaff6d550c050743b02461dcadd79462ce0dc49c9793566c4911ae5f4fcf177300e4a3861399e344fc4b5b795926cc38ff6859cdb565b6c8d6d4fc63d1babd0f1e1d0e787ff43dfb93255d6b1706fe305cf483e91ddc0aa39de8f69b23db90bfd7d2ca4e8c98172f551a7e9fab85d58ab82893f5567338c1b00cb0f3ff773e258ad80b7f5dc7857e793b6c0ecb829362062d849a5be703b791b93541009c4ef290e5425f9cbdecc8efa4076448f746e41bd02b505ed72b76ee3530c5583911680179d8b68f238c7d7d51227abaaa19a399c6b7d0fe7f83b7b2e77df04c6e04612db04625df560a6fb9007f93d076bbe33369ed95519c57dc8f625ed3caa37377b19753ad5d7d2ed3c07ead2fb2255737f69415c789bae933c566de8b59a4aeddea84bc790a427e12fdd94af7a82197b471c17dba7041eddf99d1258af8fd3658b9dd9132de65a079e38890844843be6ea3eb140948a1007b2ad2ebc0d21b605bf1daf54d275837254fc57cd67fd721ee734d3621946c4ef70cdd4a7bf8b73724397bce304d17217e7d7a417b486394a9d2b5dc4ef39bb7ea855c87929c2a49766e224d74ad72becc0cf3930afb6630eea704edf2d4474e05be4636a2625cec9646763c239d0b9c146655a8d33753c67aa4f774ac02fb9b95806fe2f9e736212cf4d3807de1666ef8449f2231e57ec40cfec02aa6b7796b7ae676e0765734e5fa9527b2429ce5debccd59cbed577fafe7b58a71ff46319ebc7169463d188a3a814f302f5a8daaacb76646e143a119817db6e77b54a9c8168def5d2a148ed47ea27f7b7b63fc1d5cff17cc4fa5927e5a2eefa79a0925d47cf393648fee23937d02f6577ad259d7bc94355fd2c2d8c0d9c859373edc4cf25a365c239b6cfa6d60610bd815dd5e3dcda7e575d41fa35fd3afdf71ccebd2de7e51c2372e22d3dd61fdfc4baba5ec92e6391c07c361277102169dd9bf27a03f5c18eb3f73d527d12124f23af0df9045e29a98b3c93eeb449912e98df0ea1378289f7986185dbb5d5d6f7553ee7644b0d32eb752b4fd908d6bb07f38c943e9adb979fdc2881d655f064565df8bf2de05ca0a6635858a593f73b9f8947b6310294dd69eb66714e08bdfa052fb4a633bd06f4d23afff81e4fc7f8b2cfc3b231db95e72284a8792de5f56ec57e9e1f01e628b7d2437e26f307c4d4ebae076ac98a70e43c57e06f70c0ea25fe628b9417399a435c6ff8d9359773037195e9298ff506ac13bb6a5fdca88bd935b93c2ac23976cb56b4a55367abf9e79c936d39158f884351252b6ec80b3fe3c2083f712bdf58eba6b49f718e193df802e7b674ce2d0d71ae77f4ee77f83a75c2bf78bb491cc77b702a898a656f9a19ec16e6be11db84de5e8398cbafd80622898d44db7931abf790adb056a9b9be6bf99326f0ab2df8bd2773c6875c713db2efd3e7714e3ea95a66fe8bd48e88993d6b00d6e4722e6e9d6cb26d71a5f6a4914f5e8b1ea672e7f9b90d39b56e6293138f40056c15acba29427da0d6219a6bc66fd59f1d31599cd3856f19e5b0ee30ff5e893ed223bdf50d9eae9257427101cffb82379c9cdca5c6e88e7e912d7dac4fc0a247fa1456bef7e4e752f6d667183be36a4fc6ec8b531cf85585bcd03db7d61de5706ee47ab1ea63ec3cce29c932573afa5c3da66284997b77a29ecd39988fb754a498ded74fec44487624461077399faf8bccadabd35e2bfeb2169524217251ba129fdc282de3539c0b793ebf4337cf3958c35c7d910f5c2f885a754dd7bfe1199e974577098a8a1ca9a4cfd82a8e46986d76605608c44d7aa680b9d7602c9fb2f635f6b9eaeb4b1de993d8cba9f7c98e81041f12ff45e68c4058efc5b1f7aa5f85e4734e656a10db7a72a66ad58c9f93cfd99c038ec4df84db00be1dfbd6e90a9e0feac6e79c9b9d29216ac3f16844add8edd70cce3575f38b7eaeb5781dc8a46eeb8eee7e89d78aef7f03e78e2627e17a133927b761c61a405cdc4bb70263b3f4cacecda638b70562536de1fcab6e553216e496e18ea7399c536f6ee6ecf85dd3b29c63b76ad370dd03391677b3f19cd8c9e21c1bc43be4bac73ed2ad6363bc6b27138695e0dc05325f9d153d159ee79c597267ce4bfc1587cfcbe58ff1d70f96f777eac47cc39388f2791211a9fb987310e974dc989dd9519356adcd720e38b1929adb70ed96ba1d09bdbeea3c59ceb3ba300b175ab7e671ced9b11fdf0bc8d22f8ee73927daae4603636753e389c7329c13d7428ba935ef6732cb39dee7e62bef1f318199dbffccb1d6904b137d61967dfefa1becd847728638d06771cfb1ddd8b210a3cdec4d809fbb9de79cdca57b527e7e1eaaa93b7e6adbedfb66fa7d79e676afac9ea45e82730bda36c6182dcd393972b3bd9cbdd5c5fb6e0dbe14e7e814c24e4e2c3e9339ceb578895bc1738cbb345765ee908bb1b93637aac4cdf7945c167bc304782e60d0ec1e395a5a067e9700fae2107bc571e7607a6d065ab631e299e61cdbd29b69ce293b7d6a2f9b8ed330bbcedf8552bd988fb0c238f37f53fc7b39477b6efb93134f7612c712c0b9a99b4d60870bb4c3329c7311dd5a3c5fcfdfa080f5cad1fc1ed41ce79a7c7749bedd9a3b5398eb13310fe6d13c2d51deb37929a25f5ea83518eb2ff278f69c4b5dcb43daa35b633d64a53c703d05f1709a25d24a7ab6608673b7fad53fe7e2a43b5bba3a753bc7ab6a773a7e520ff1acaeded3e7adb8479ce61c5bfb929f73a344dc4c6ef3a96b7decc6c0c654ca91a2bdca09e7e401ae99529c3bc196ce730e4ac2fb2f57d31616c7ea5c1dce4629199c2bf5bc4d8a01afe64dbcce6a2f267c68decdd894dc2f5627acd01e9ddc71eb04889dd59a1c0809d1433f8e82e4875bbfe1aedb50500c0a63bee552afcb136403fc65177e0fb23817efb1a5f6c806ea6daef4f82eca40046625be2944658f55a402f8ab513c7d7f53a39fdb9adc24472f1a7ff97119ced1aa7a6de2e36175bde9d875cf06be75108f0dfd0e5d9a73eefe5530d93d917bc861b63abf3a055b5ee1bd1dffbc30b4f286eda9d82673f76c6739677a65673ab36ad64c5f7cf9d95bb36e364a965cf0d6b0dc5187607f3a75005b564507ef71ba31df1357e999571c2a17f9438a23118a7dd1d53d98212f63d6a977363353c058e6c4c7813ccc3a85176dd6539d3872971d5835dce93dd97627623dbd31bd57aa5c9d4cdaf3b9930a33504b3c7f04abdafd69d6b832aad4babae26cd36c0958b9ab00ace3da30d97b663726b6573f75eadfc3f3e19c33914371837716f48508d926db80083110f73ae3b6df1ce7b64b7bb81db3fb1defa316e766cfec9739a53085cfbfa4d5e7ba6156a66f80c99a5ad55c5e4cdb908de58a399071b435000fb3af847a90fb6c53bfaaa1d89d3f2f67bbe0c96ec1be1d1d66ef1680c6b138521fc919f95074d4307d33836ab925b6744fa64a602bfa584973b8cc9390bcaf76d499ba9b3d05117bb0b6de7723f05234d886da94db6c47f55485ed4d9e816563fd2a8dea4f6e3088ba8668505de53d9b0d6cde8058a59fb471dd1cb0edac387a8e73a5d69166648ecd37be51c49c9a3359d8db9952518e8ed8ae1c42bc5b633d71672e4c45699857324f59459d1dc17cb1ab2f6573c20cd090e9cde3930a3962bbf9ef5980f91956bef24429063dac7661759c71b2002c1900ef52bfc44f5d88de6cfc545480eb76fec6a4bb8fb9252379ae4f277703e66fd5c933f631fd1c36c4ba4750bfdcfb2d309b57630b8397db067b7ce4ddca9e8be76e0bf7b8fbfef272d6c817f11e7f85b8d8e918fba39edafc91a232e7e70adee7550dd3e69927cf5f97f8dbcb856af10da75f3ff2eb659673b6d09b6bccb365f6cbefadc917fc66e40fe7fe336519ceb1a7623b635f11de8fbffdb9b81e36e72ee48ffcd93217cf9d7dc6381b9abd5ff1ce36605d642f17d6a5f06d61f960aff82dab9823d3fb1575ffb5c299bde6b5e5da25c65cf0539e79d79fb7f8aabd92abf0ef9b72daf91adf875cb79a9997cf9f35e49f9c08d83b9bfbdcf432621feca37dcab3876ad9054f75b3827ece5eb137becdc7fc82d7d509bb624bae03131bf5d9a57d1127fc8371beb1a837789f1ff00adfe15b7cc06fd87b76df7e525a8baff01bbe91fd2b931081efc80db9214eb429f7764821ecab7d931b8c817ddab3ede02d7da84ef8b63a019b31fb6ec7459eb78bbf51a357a1c56f98d77ef0b9b78994db9f630f768927111689edd955bb66fb763dbbefec86ddccad4fa1a75298b4b3e326f3d982e2221ff895bf9ba0ea8b9e07b25be9f7cbcb3b5629cf3a60ed7b7c0f36e75735790ad986bcc08d9e743b6cd2db4cd999dd1b3eb4bb36c506e0d00dcf799234c9d367712dd2d60ee74f0be6fcdceaa29b1e76cf2cf56ea405bdb21feb15dc0eed813d9c7fca015a7e947bcfa5d0ee3cbb6433ab9172fb7a19751ed9c957cd764c233f25cce45363586ef0d2bbbbbce1f2be668fc9f49d6ebb5dee7973de4de73573fbfa30eff6a6de1f3d56f545be8ef7e5ead4ddcb23796f33fcc21ce71e6ceed9973db567d9a58931ac34cfed85adf07b5beafb49b6365542dd366cd3b6d2b337442bedacb79181df1e15b2ac044f3f9df78b6fb2348d94c6ba5d70bb85dff39979833198494acd80d631438bec7bd1363d1edf16d525a31dbdd468580ff87c0a3e34db33e7ef9736e7a96e21f853fae625f8c5679df99eda32f74a82b991c08741fc289d0a7460021b042e5558e6992cae66dffd1f44c1657095be2f105c0737f3b561aad84cf237736ea1b79de71cb4ef16e2ba32a3f297700e4670e60d0d21340bd2e70447fc32eb5df67c2db84bbf5910fe7f2fcf2716bd3f17dc070f694b058fc153f01cbce866f01a4c7d3f3328e5df837190719f2458097ac1ea84bbc15ad09f4bf5526c2d30cfb960bd4c0d33fa6a9a73770bcacee01c44120f65be7bf17b3917cf98a60731da24e23a02549d7eab387f0c36588a05f22ed8c8f671b1cc716ea89eb222ba603348226f711e6c05dbc1acf7f0294bbdd3d19e077bd97af851b01f10eb583b38982be7b0d8cd8279cea99c7572e1befa22e7400641e137e7ff6ece39fb5f06a3342becb6e5b6aa1f99b1d7102fbf839f4a73e6753e364ccbfcf3107ac566799ee3803caa780d4e83b31c9ec4294b45e8763dc87f73ec765009dc2d0b98c36bd3bfa993a0e059ef1fc9b971d028fafe8b3f8173d012c1f88c2ffae087fc1a56154fd3b7328226bf5ffc6d8579ce0547f3cf7d05ad80d65b4127e8e6d8d149c8c352f79a6c2b5cf0c44fd00fa5957c28de4335f3dbc7a2f5e294b5e6e3b92fbee9f41b38076b0fbec20ac5a37f06e7c0173d86faf3bb95f63d6f8d3191ace75bc18fce6832afa189ef7c84360c16971986e6747189d3c23a61f489c6cbf02abc0e2ad37f2dfe46b079ce850bdf4d52a0afbec039c6ecb6f717b2d0fb1bff14cec5519bfdeceec5887ffa3e9eece7f883b93357a01acc47e16d78177e72a752be973bfb5723f1e9b310e143f818cea49285efc1cf73ce2c78cf76a1be5a8a738cf1bd50d98e7eb383f0395ead6b018cf974dfe4cfe11c30e0852f78ab08ac227491157916e7c217f636ad4d0fc2d7f0edf3b7ec87efe1b8dcc998be0a97786f0ef4d8273be2a97e9fe3dc57df3bb104e7e21d8607cf2fdee78f9ab1677ec4de6cc6bb4fa7e54fe21c94d7c9ff726fd028b6f398fd5e263e77a3235c097b79654dc4dc8625bf9214be84a5df200b7258fc0b60f39c2bee2373faaa3ce75ee7f7afe54308ac8399f6932ffce03bb2fe14ce9917f190db2b392706b392fdfeb9b0bfdc9743c2f530e72c3a4fc2cdb0fc3ba0ea65deb4f927f8b9702b6b9f9c37e3b52044dd9d85f704aeff24cef1fdd9397022baa0bfc9e61c6f85dbcb3c611fee8425bfb81274c2bcfdb95c51f5624f53535be6e3b92f9eb796e75c5e7f86fb3073d6e3b82ecf6ff3167e4ff2cfe01c5f0b87f9fd62df8bac20f2df271c1ed8d24f8001e70e83927b5fe15138b74a5e2c729d3f95393bcaf0735fbceb599e7322777dca1fb975377e0cbb9c6f151f0677b85bfa67702e3c5ef8cde88b6054e46c28f7bde94ce7cfdbf99c3b297b63ddf4e4e27b99f3320a4bedc6cc73aee81c905be7f273eb82ef5886fbea09c6515d3cc84dbe9e9e83799f091f3dfd7ecef1357ec76677496765ccae3ebfad95ff7d083b2a1fd3856765e7d6b0d4978841b617f55fa6ade6f7e7967c2f6cd257dfca39777bc3d0d9cf8e0dcc3670a1ca845c65c1c4abe4722e7523439d94b30d4fbfc1f78d2f9ca138e3b7b3df318aef7aeac1dc3ef1213f593c0f2df826c93ac41aa5beb20ab6bdb02563a5b052b2846ad9e7b733fc5ccefdc7a2f2dd9cc31bbbc92d3f58cb8a133d989ec5f238a759ea76e1912d77d69de2abfdb00bbe8fcd0c3f9be2d618a2cc4d7e17c67734c73c98faed883d2f8eeb167defcbbcf04fce08e618510b4b3df10a3169a38c7e58e3158a52a7ca98df2b515f7b26e2fb39e7ee47dee5df5ccce71c13e91ba9e6bcccdd3c963e53dacaff925a781a1cf2a95b23f2958b4949ccd8abb0995e734244a0f26fb42dfeaea16165e7d7b01596b8091b764a697f2bb77aa07e9f3f6fbdd0acf8fe5e8655fe06ceb9d4ab41ee13ed799ce3359eba7f284e6ce1e72f999dbab39fbbe369b7a66fb7d97793f1f608f04f53a998022f9ac3ff4fbedfbac64bf921b06e37cab86f9a2d621ce5ee6967890d8a9d8acfb4619e73601156297e923167dfbf8b737dfd36f334c1e79ceb9b617a66933977d8e7f2315649e53bcafbe2863d0e46e9084b37d97bb607d38f7cea3dd47a6007d975f9ec3bd5e129f0b744546756a3c21e247c658f85351f4572b9e7b5b238075287f8f78137ec182276696f7813668b8e7c900feeb9bd5a780af2a24659d1e3dfc539772a761234b37646f338e776f00ed3e9ccd1e76ff716e380a7ee911ff1ebac1b96bc6f47d373265372c1896aa4c2ad74146ab7f959d64d8ccf38e7faac545417e9a8d0298195d127cf4ca7256c16bdbb9451ff9cdba51351275ad813986bced913447b03be1b49fec22fd995ed9aedd9fee0fb537b06dfc8b95860963a9c1fe5f99c8b9fa549df3e931b10a72df0e1c0a41b7e96e2c611bbcebe6d2e57cdf4939ee7a697afd7e5a9b169aebcd9ee3ceb3ee79c7b66a1c417e2f47d144405de291c4551e19d39bb1df6978dc082a3e84bdf1e8015ddcc7cc537d2678e59d14d927209cec16cf9c2c3595fb79073b07ae4e93da77124cd30fbab2d91e2c77c30f50cca207337ba2f37a777e3c403f8f74f7799ec7534fd6c433dd4b34fb816e15cbc7b981fdd664974b3f8dc35ba8deea2c26f9a63dab0e5579a10932ef9b65a928b607ddad630fb267d0633d482f7d9f22ac54c25df93c90c0fa677c3d81b5ff81407b3d1034bbf87fe024a8e421dd4ed2d8f9fc4bf0a38a0a6dc48f9d023f06367595fdc95d7fc606aafe68247b6e097e52132799eaafb45743d7d13bf18e7f850b3725f8d881ea3a7bc91295ea3e7a8f857abb7cc66b9a7f3e66abf0aac5be26bb4d8d74163f6194d88baeed0f303e336e79f539f48b81ffb58b99ef725e5051c326668d3a7e99fee29f235fdc69fed7bc1e87b3b68b2c08eb2c6321fdaf1f4335ce170f689eb45a2afa2d7e978864d4527c538e7f6ca1b6566d8f09dbd446fd1bb789bfab2c7bb10d138fa085e8beab1dbb6f3d5f7c64204b365ab86c94d534ac263be2a7598f13e20beceabf636ecf36afed34d287295efe59fb62eac35946186fa903d435c1965455c19791ecd8bd9e62b6193c5b3b397d892099277918428b507aba69c91cc87d1ab3d71efdab8805115f2d5725f698ef90ff3f01ecccd17b180d79b8ab58a722e167bacea65fd45b462a2a8171eb0f768355a8bfad17a89dc173016ffc6378efd270b5f679786d95d63a20dbe19de449bbc0dab21f6f9d30a130de129acdbbf744e0891a6fcfc7d258bc5de440f4b7e4564995cd7fc9bdf54f1237f8294e39c8b5036f4e01bbe11f789d86df5b42852fa917f5f29cb391741efc31c5ff2f4bf94d4f925c44a5fbcfdf1237faa94e75c2cbcc3cfcc8237c37d49b658a5e8bafc47fe1d6539cec52b13580b76d9dbb7fa3b58254503bbf3b59d911ff9d36559cec5c2877c9f0576b9f5c19c30151c16d9e9fe917f77f90ae762e16b5273b3e8e65711d14df5644bdfc6fc917f4ff92ae762017ff7681ad1161fc9b552fb77752d7845bdea37fef895fb6c3ff2ef25dfc1392fbc2557f9b17ae5bb9feca61c411c78ae0ff96d78a01ffff3de63fe238be53b3987c21f799357d93b6faba7709b1f46923dd9f87db803550fb76d378afd5ad7ee943f83fc91ff0cf97ecefdc88f2c961fcefdc8af961fcefdc8af967ffedffff98fff0759629c80</data> - </image> -</images> -<connections> - <connection> - <sender>cboSIPAccount</sender> - <signal>activated(int)</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotSIPAccountChange(int)</slot> - </connection> - <connection> - <sender>cboIAXAccount</sender> - <signal>activated(int)</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotIAXAccountChange(int)</slot> - </connection> - <connection> - <sender>buttonOk</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>accept()</slot> - </connection> - <connection> - <sender>Menu</sender> - <signal>clicked(QListBoxItem*)</signal> - <receiver>ConfigurationPanel</receiver> - <slot>changeTabSlot()</slot> - </connection> - <connection> - <sender>buttonSIPRegister</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotSIPRegister()</slot> - </connection> - <connection> - <sender>buttonIAXRegister</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotIAXRegister()</slot> - </connection> - <connection> - <sender>buttonTestSoundDriver</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotTestSoundDriver()</slot> - </connection> - <connection> - <sender>buttonReloadSoundDriver</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>slotReloadSoundDriver()</slot> - </connection> - <connection> - <sender>buttonCancel</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>reject()</slot> - </connection> - <connection> - <sender>buttonOk</sender> - <signal>clicked()</signal> - <receiver>ConfigurationPanel</receiver> - <slot>saveSlot()</slot> - </connection> - <connection> - <sender>Menu</sender> - <signal>clicked(QListBoxItem*)</signal> - <receiver>Tab_Signalisations</receiver> - <slot>setFocus()</slot> - </connection> - <connection> - <sender>stunButtonGroup</sender> - <signal>clicked(int)</signal> - <receiver>ConfigurationPanel</receiver> - <slot>useStunSlot(int)</slot> - </connection> - <connection> - <sender>SkinChoice</sender> - <signal>highlighted(const QString&)</signal> - <receiver>ConfigurationPanel</receiver> - <slot>applySkinSlot()</slot> - </connection> -</connections> -<tabstops> - <tabstop>cboSIPAccount</tabstop> - <tabstop>alias</tabstop> - <tabstop>fullName</tabstop> - <tabstop>userPart</tabstop> - <tabstop>hostPart</tabstop> - <tabstop>username</tabstop> - <tabstop>password</tabstop> - <tabstop>sipproxy</tabstop> - <tabstop>chkAutoregister</tabstop> - <tabstop>chkEnable</tabstop> - <tabstop>buttonSIPRegister</tabstop> - <tabstop>cboIAXAccount</tabstop> - <tabstop>IAXalias</tabstop> - <tabstop>IAXhost</tabstop> - <tabstop>IAXuser</tabstop> - <tabstop>IAXpass</tabstop> - <tabstop>chkIAXAutoregister</tabstop> - <tabstop>chkIAXEnable</tabstop> - <tabstop>buttonIAXRegister</tabstop> - <tabstop>buttonOk</tabstop> - <tabstop>buttonCancel</tabstop> - <tabstop>Tab_Signalisations</tabstop> - <tabstop>SkinChoice</tabstop> - <tabstop>useStunYes</tabstop> - <tabstop>STUNserver</tabstop> - <tabstop>playTones</tabstop> - <tabstop>pulseLength</tabstop> - <tabstop>sendDTMFas</tabstop> - <tabstop>Menu</tabstop> - <tabstop>Tab_Audio</tabstop> - <tabstop>cboDriverChoiceOut</tabstop> - <tabstop>cboDriverChoiceIn</tabstop> - <tabstop>cboDriverRate</tabstop> - <tabstop>buttonTestSoundDriver</tabstop> - <tabstop>buttonReloadSoundDriver</tabstop> - <tabstop>codec1</tabstop> - <tabstop>codec2</tabstop> - <tabstop>codec3</tabstop> - <tabstop>Tab_Preferences</tabstop> - <tabstop>Tab_About</tabstop> - <tabstop>useStunNo</tabstop> -</tabstops> -<includes> - <include location="local" impldecl="in implementation">ConfigurationPanel.ui.h</include> -</includes> -<signals> - <signal>needRegister(const QString&)</signal> - <signal>soundDriverChanged()</signal> -</signals> -<slots> - <slot>generate()</slot> - <slot>slotSIPAccountChange(int)</slot> - <slot>slotIAXAccountChange(int)</slot> - <slot>slotSIPRegister()</slot> - <slot>slotIAXRegister()</slot> - <slot>slotRegisterReturn( bool, QString )</slot> - <slot>slotTestSoundDriver()</slot> - <slot>slotReloadSoundDriver()</slot> - <slot>slotSoundDriverReturn( bool, QString )</slot> - <slot>saveSlot()</slot> - <slot>changeTabSlot()</slot> - <slot>useStunSlot( int id )</slot> - <slot>applySkinSlot()</slot> - <slot>updateSkins()</slot> - <slot>updateRingtones()</slot> - <slot>updateCodecs()</slot> - <slot>updateAudioDevices()</slot> - <slot>updateAudioDevicesIn()</slot> - <slot>updateAudioDevicesOut()</slot> - <slot>SkinChoice_selected( const QString & )</slot> -</slots> -<functions> - <function access="private" specifier="non virtual">init()</function> - <function access="private" specifier="non virtual">loadSIPAccount(int number)</function> - <function access="private" specifier="non virtual">saveSIPAccount(int number)</function> - <function access="private" specifier="non virtual">loadIAXAccount(int number)</function> - <function access="private" specifier="non virtual">saveIAXAccount(int number)</function> -</functions> -<variables> - <variable access="private">int lastSIPAccount;</variable> - <variable access="private">int lastIAXAccount;</variable> - <variable access="private">int _cutStringCombo;</variable> - <variable access="private">std::map < int, int > _deviceInMap</variable> - <variable access="private">std::map < int, int > _deviceOutMap</variable> -</variables> - - -<layoutdefaults spacing="6" margin="11"/> -</UI> diff --git a/src/gui/qt/ConfigurationPanel.ui.h b/src/gui/qt/ConfigurationPanel.ui.h deleted file mode 100644 index 54832125a4..0000000000 --- a/src/gui/qt/ConfigurationPanel.ui.h +++ /dev/null @@ -1,662 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ -#include <qdir.h> -#include <qmessagebox.h> -#include <qstringlist.h> -#include <qcolor.h> -#include <qvbuttongroup.h> - -#include "globals.h" -#include "ConfigurationManager.hpp" -#include "DebugOutput.hpp" -#include "QjListBoxPixmap.hpp" -#include "SkinManager.hpp" -#include "TransparentWidget.hpp" - -#include <map> - -#define SIGNALISATIONS_IMAGE "signalisations.png" -#define AUDIO_IMAGE "audio.png" -#define PREFERENCES_IMAGE "preferences.png" -#define ABOUT_IMAGE "about.png" - - -void ConfigurationPanel::init() -{ - _cutStringCombo = 30; - //DebugOutput::instance() << "ConfigurationPanel::init()\n"; - lblError->hide(); - lblIAXError->hide(); - Tab_Signalisations->show(); - Tab_Audio->hide(); - Tab_Preferences->hide(); - Tab_About->hide(); - - /* - // For reading settings at application startup - // List skin choice from "skins" directory - QDir dir(Skin::getPath(QString(SKINDIR))); - if ( !dir.exists() ) { - _debug("\nCannot find 'skins' directory\n"); - return; - } else { - dir.setFilter( QDir::Dirs | QDir::NoSymLinks); - dir.setSorting( QDir::Name ); - - QStringList list; - list = dir.entryList(); - for (unsigned int i = 0; i < dir.count(); i++) { - if (list[i] != "." && list[i] != ".." && list[i] != "CVS") { - SkinChoice->insertItem(list[i]); - } - } - } - */ - - // For preferences tab - - /* - SkinChoice->setCurrentText(QString(manager.getConfigString(PREFERENCES, SKIN_CHOICE))); - confirmationToQuit->setChecked(manager.getConfigInt(PREFERENCES, CONFIRM_QUIT)); - zoneToneChoice->setCurrentText(QString(manager.getConfigString( - PREFERENCES, ZONE_TONE))); - checkedTray->setChecked(manager.getConfigInt( - PREFERENCES, CHECKED_TRAY)); - voicemailNumber->setText(QString(manager.getConfigString( - PREFERENCES, VOICEMAIL_NUM))); - */ - // Init tab view order - - // Set items for QListBox - - new QjListBoxPixmap (QjListBoxPixmap::Above, - TransparentWidget::retreive(SIGNALISATIONS_IMAGE), - "Signalisation", - Menu); - new QjListBoxPixmap (QjListBoxPixmap::Above, - TransparentWidget::retreive(AUDIO_IMAGE), - "Audio", Menu ); - new QjListBoxPixmap (QjListBoxPixmap::Above, - TransparentWidget::retreive(PREFERENCES_IMAGE), - "Preferences", - Menu); - new QjListBoxPixmap (QjListBoxPixmap::Above, - TransparentWidget::retreive(ABOUT_IMAGE), - "About", - Menu); -} - -void -ConfigurationPanel::generate() -{ - // For audio tab - codec1->setCurrentText(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_CODEC1)); - codec2->setCurrentText(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_CODEC2)); - codec3->setCurrentText(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_CODEC3)); - - ringsChoice->setCurrentText(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_RINGTONE)); - - // For signalisations tab - - // Account - QComboBox* cbo = 0; - int nbItem = 0; - - // Load account - cbo = cboSIPAccount; - cbo->clear(); - nbItem = 4; - for (int iItem = 0; iItem < nbItem; iItem++) { - QString accountId = "SIP" + QString::number(iItem); - QString aliasName = ConfigurationManager::instance().get(accountId, ACCOUNT_ALIAS); - QString accountName; - if (aliasName.isEmpty()) { - accountName = QObject::tr("SIP Account #%1").arg(iItem+1); - } else { - if (aliasName.length() > 30) { - aliasName = aliasName.left(30) + "..."; - } - accountName = aliasName + " (" + QObject::tr("SIP Account #%1").arg(iItem+1) + ")"; - } - cbo->insertItem(accountName,iItem); - } - loadSIPAccount(0); - - // Load IAX Account - cbo = cboIAXAccount; - cbo->clear(); - nbItem = 1; - for (int iItem = 0; iItem < nbItem; iItem++) { - QString accountId = "IAX" + QString::number(iItem); - QString aliasName = ConfigurationManager::instance().get(accountId, ACCOUNT_ALIAS); - if (aliasName != "") { - QString accountName; - if (aliasName.isEmpty()) { - accountName = QObject::tr("IAX Account #%1").arg(iItem+1); - } else { - if (aliasName.length() > 30) { - aliasName = aliasName.left(30) + "..."; - } - accountName = aliasName + " (" + QObject::tr("IAX Account #%1").arg(iItem+1) + ")"; - } - cbo->insertItem(accountName,iItem); - } - } - loadIAXAccount(0); - - sendDTMFas->setCurrentItem(ConfigurationManager::instance().get(SIGNALISATION_SECTION, - SIGNALISATION_SEND_DTMF_AS).toUInt()); - playTones->setChecked(ConfigurationManager::instance().get(SIGNALISATION_SECTION, - SIGNALISATION_PLAY_TONES).toUInt()); - pulseLength->setValue(ConfigurationManager::instance().get(SIGNALISATION_SECTION, - SIGNALISATION_PULSE_LENGTH).toUInt()); - - - // select the position index (combobox of the device index) - // deviceIndexOut can be 8, but be at position 0 in the combo box - int deviceIndexOut = ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT).toInt(); - int deviceIndexIn = ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN).toInt(); - int positionIndexIn = 0; - int positionIndexOut = 0; - - // search for deviceIndexIn, and get the positionIndex (key) - std::map< int, int >::iterator it = _deviceInMap.begin(); - while (it != _deviceInMap.end()) { - if ( it->second == deviceIndexIn) { - // we found the deviceIndex - positionIndexIn = it->first; - break; - } - it++; - } - it = _deviceOutMap.begin(); - while (it != _deviceOutMap.end()) { - if ( it->second == deviceIndexOut) { - // we found the deviceIndex - positionIndexOut = it->first; - break; - } - it++; - } - cboDriverChoiceIn->setCurrentItem(positionIndexIn); - cboDriverChoiceOut->setCurrentItem(positionIndexOut); - - // fill cboDriverRate here - int nbRate = 5; - int allowedRate[5] = {8000,16000,32000,44100,48000}; - cboDriverRate->clear(); - for(int iRate = 0; iRate < nbRate; iRate++) { - cboDriverRate->insertItem(QString::number(allowedRate[iRate])); - } - cboDriverRate->setCurrentText(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_SAMPLERATE)); - - //preference tab - updateSkins(); -} - -// For saving settings at application 'save' -void ConfigurationPanel::saveSlot() -{ - saveSIPAccount(cboSIPAccount->currentItem()); - saveIAXAccount(cboIAXAccount->currentItem()); - - ConfigurationManager::instance().set(SIGNALISATION_SECTION, - SIGNALISATION_PULSE_LENGTH, - QString::number(pulseLength->value())); - ConfigurationManager::instance().set(SIGNALISATION_SECTION, - SIGNALISATION_PLAY_TONES, - QString::number(playTones->isChecked())); - ConfigurationManager::instance().set(SIGNALISATION_SECTION, - SIGNALISATION_SEND_DTMF_AS, - QString::number(sendDTMFas->currentItem())); - - if (codec1->currentText() != NULL) { - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_CODEC1, codec1->currentText()); - } - if (codec2->currentText() != NULL) { - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_CODEC2, codec2->currentText()); - } - if (codec3->currentText() != NULL) { - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_CODEC3, codec3->currentText()); - } - if (ringsChoice->currentText() != NULL) { - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_RINGTONE, ringsChoice->currentText()); - } - int cboPosition = 0; - int deviceIndex = 0; - if (cboDriverChoiceOut->currentText() != NULL) { - cboPosition = cboDriverChoiceOut->currentItem(); - deviceIndex = _deviceOutMap[cboPosition]; // return 0 if not found and create it, by STL - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(deviceIndex)); - } - if (cboDriverChoiceIn->currentText() != NULL) { - cboPosition = cboDriverChoiceIn->currentItem(); - deviceIndex = _deviceInMap[cboPosition]; // return 0 if not found and create it, by STL - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(deviceIndex)); - } - - SkinManager::instance().load(SkinChoice->currentText()); - SkinManager::instance().save(); - -#if 0 - QMessageBox::information(this, tr("Save settings"), - tr("You must restart SFLPhone"), - QMessageBox::Yes); -#endif - - ConfigurationManager::instance().save(); -} - -// Handle tab view according to current item of listbox -void ConfigurationPanel::changeTabSlot() -{ - switch (Menu->currentItem()) { - case 0: - TitleTab->setText(tr("Setup signalisation")); - Tab_Signalisations->show(); - Tab_Audio->hide(); - Tab_Preferences->hide(); - Tab_About->hide(); - break; - case 1: - TitleTab->setText(tr("Setup audio")); - Tab_Signalisations->hide(); - Tab_Audio->show(); - Tab_Preferences->hide(); - Tab_About->hide(); - break; - case 2: - updateSkins(); - TitleTab->setText(tr("Setup preferences")); - Tab_Signalisations->hide(); - Tab_Audio->hide(); - Tab_Preferences->show(); - Tab_About->hide(); - break; - case 3: - TitleTab->setText(tr("About")); - Tab_Signalisations->hide(); - Tab_Audio->hide(); - Tab_Preferences->hide(); - Tab_About->show(); - break; - } -} - - -void ConfigurationPanel::useStunSlot(int id) -{ - QString account = ACCOUNT_DEFAULT_NAME; - ConfigurationManager::instance().set(account, - SIGNALISATION_USE_STUN, - QString::number(id)); -} - - -void ConfigurationPanel::applySkinSlot() -{ - SkinManager::instance().load(SkinChoice->currentText()); -} - - -void ConfigurationPanel::updateSkins() -{ - SkinChoice->clear(); - SkinChoice->insertStringList(SkinManager::instance().getSkins()); - SkinChoice->setSelected(SkinChoice->findItem(SkinManager::instance().getCurrentSkin(), Qt::ExactMatch), true); -} - -void ConfigurationPanel::updateRingtones() -{ - std::list< Ringtone > rings = ConfigurationManager::instance().getRingtones(); - std::list< Ringtone >::iterator pos; - - ringsChoice->clear(); - - for (pos = rings.begin(); pos != rings.end(); pos++) { - ringsChoice->insertItem(pos->filename); - } -} - -void ConfigurationPanel::updateCodecs() -{ - std::list< Codec > codecs = ConfigurationManager::instance().getCodecs(); - std::list< Codec >::iterator pos; - - codec1->clear(); - codec2->clear(); - codec3->clear(); - - for (pos = codecs.begin(); pos != codecs.end(); pos++) { - codec1->insertItem(pos->codecName); - codec2->insertItem(pos->codecName); - codec3->insertItem(pos->codecName); - } -} - -void ConfigurationPanel::updateAudioDevicesIn() -{ - QComboBox* cbo = cboDriverChoiceIn; - std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesIn(); - std::list< AudioDevice >::iterator pos; - cbo->clear(); - _deviceInMap.clear(); - - int iPos = 0; - for (pos = audio.begin(); pos != audio.end(); pos++) { - QString hostApiName = pos->hostApiName; - QString deviceName = pos->deviceName; - - if (hostApiName.length() > _cutStringCombo) { - hostApiName = hostApiName.left(_cutStringCombo) + "..."; - } - QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate); - cbo->insertItem(name); - _deviceInMap[iPos] = pos->index.toInt(); - iPos++; - } -} - -void ConfigurationPanel::updateAudioDevicesOut() -{ - updateAudioDevices(); -} - -void ConfigurationPanel::updateAudioDevices() -{ - QComboBox* cbo = cboDriverChoiceOut; - std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesOut(); - std::list< AudioDevice >::iterator pos; - cbo->clear(); - _deviceOutMap.clear(); - - int iPos = 0; - for (pos = audio.begin(); pos != audio.end(); pos++) { - QString hostApiName = pos->hostApiName; - QString deviceName = pos->deviceName; - - if (hostApiName.length() > _cutStringCombo) { - hostApiName = hostApiName.left(_cutStringCombo) + "..."; - } - //DebugOutput::instance() << hostApiName << pos->defaultRate; - QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate); - cbo->insertItem(name); - _deviceOutMap[iPos] = pos->index.toInt(); - iPos++; - } -} - - -void -ConfigurationPanel::SkinChoice_selected( const QString & ) -{ - -} - -void -ConfigurationPanel::slotSIPRegister() -{ - saveSIPAccount(cboSIPAccount->currentItem()); - emit needRegister("SIP" + QString::number(cboSIPAccount->currentItem())); -} - -void -ConfigurationPanel::slotIAXRegister() -{ - saveIAXAccount(cboIAXAccount->currentItem()); - emit needRegister("IAX" + QString::number(cboIAXAccount->currentItem())); -} - -void -ConfigurationPanel::slotRegisterReturn( bool hasError, QString ) -{ - // here we check the current page... - if (hasError) { - lblError->setPaletteForegroundColor(red); // red - lblError->setText(QObject::tr("Register failed")); - lblIAXError->setPaletteForegroundColor(red); // red - lblIAXError->setText(QObject::tr("Register failed")); - } else { - lblError->setPaletteForegroundColor(black); // black - lblError->setText(QObject::tr("Register Succeed")); - lblIAXError->setPaletteForegroundColor(black); // black - lblIAXError->setText(QObject::tr("Register Succeed")); - } - lblError->show(); - lblIAXError->show(); -} - -/** - * Test sound driver (save them before) - */ -void -ConfigurationPanel::slotTestSoundDriver() -{ - // save driver in configuration manager - int cboPosition = 0; - int deviceIndex = 0; - if (cboDriverChoiceOut->currentText() != NULL) { - cboPosition = cboDriverChoiceOut->currentItem(); - deviceIndex = _deviceOutMap[cboPosition]; // return 0 if not found and create it, by STL - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(deviceIndex)); - } - if (cboDriverChoiceIn->currentText() != NULL) { - cboPosition = cboDriverChoiceIn->currentItem(); - deviceIndex = _deviceInMap[cboPosition]; // return 0 if not found and create it, by STL - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(deviceIndex)); - } - if (cboDriverRate->currentText() != NULL) { - ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_SAMPLERATE, cboDriverRate->currentText()); - } - - // save driver on portaudio - ConfigurationManager::instance().save(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT); - ConfigurationManager::instance().save(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN); - ConfigurationManager::instance().save(AUDIO_SECTION, AUDIO_SAMPLERATE); - emit soundDriverChanged(); -} - -void -ConfigurationPanel::slotReloadSoundDriver() -{ - ConfigurationManager::instance().reloadSoundDriver(); -} - - -void -ConfigurationPanel::slotSoundDriverReturn( bool hasError, QString message ) -{ - if (hasError) { // no error - lblSoundDriver->setPaletteForegroundColor(red); // error in red - } else { - lblSoundDriver->setPaletteForegroundColor(black); - } - lblSoundDriver->setText(message); - lblSoundDriver->show(); -} - -void -ConfigurationPanel::slotSIPAccountChange(int index) -{ - if (lastSIPAccount!=index) { - - QString account = "SIP" + QString::number(index); - //DebugOutput::instance() << "Selecting SIP account " << account << "\n"; - - saveSIPAccount(lastSIPAccount); - loadSIPAccount(index); - lblError->setText(""); - } -} - -void -ConfigurationPanel::loadSIPAccount(int number) -{ - QString account = "SIP" + QString::number(number); - QString type = ConfigurationManager::instance().get(account, ACCOUNT_TYPE); - - chkAutoregister->setChecked(ConfigurationManager::instance() - .get(account,ACCOUNT_AUTO_REGISTER).toUInt()); - - chkEnable->setChecked(ConfigurationManager::instance() - .get(account,ACCOUNT_ENABLE).toUInt()); - - QString aliasName = ConfigurationManager::instance().get(account, ACCOUNT_ALIAS); - alias->setText(aliasName); - // void QComboBox::changeItem ( const QString & t, int index); - // - - fullName->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_FULL_NAME)); - userPart->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_USER_PART)); - username->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_AUTH_USER_NAME)); - password->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_PASSWORD)); - hostPart->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_HOST_PART)); - sipproxy->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_PROXY)); - STUNserver->setText(ConfigurationManager::instance() - .get(account,SIGNALISATION_STUN_SERVER)); - ((QRadioButton*)stunButtonGroup->find(ConfigurationManager::instance() - .get(account,SIGNALISATION_USE_STUN).toUInt()))->setChecked(true); - lastSIPAccount = number; -} - -void -ConfigurationPanel::saveSIPAccount(int number) -{ - QString account = "SIP" + QString::number(number); - QString aliasName = alias->text(); - ConfigurationManager::instance().set(account, ACCOUNT_ALIAS, aliasName); - QString accountName; - if (aliasName.isEmpty()) { - accountName = QObject::tr("SIP Account #%1").arg(number+1); - } else { - if (aliasName.length() > 30) { - aliasName = aliasName.left(30) + "..."; - } - accountName = aliasName + " (" + QObject::tr("SIP Account #%1").arg(number+1) + ")"; - } - cboSIPAccount->changeItem(accountName, number); - ConfigurationManager::instance().set(account, - SIGNALISATION_FULL_NAME, - fullName->text()); - ConfigurationManager::instance().set(account, - SIGNALISATION_USER_PART, - userPart->text()); - ConfigurationManager::instance().set(account, - SIGNALISATION_AUTH_USER_NAME, - username->text()); - ConfigurationManager::instance().set(account, - SIGNALISATION_PASSWORD, - password->text()); - ConfigurationManager::instance().set(account, - SIGNALISATION_HOST_PART, - hostPart->text()); - ConfigurationManager::instance().set(account, - SIGNALISATION_PROXY, - sipproxy->text()); - ConfigurationManager::instance().set(account, - ACCOUNT_AUTO_REGISTER, - QString::number(chkAutoregister->isChecked())); - ConfigurationManager::instance().set(account, - ACCOUNT_ENABLE, - QString::number(chkEnable->isChecked())); - ConfigurationManager::instance().set(account, - SIGNALISATION_STUN_SERVER, - STUNserver->text()); -} - -void -ConfigurationPanel::slotIAXAccountChange(int index) -{ - if (lastIAXAccount!=index) { - - QString account = "IAX" + QString::number(index); - - saveIAXAccount(lastIAXAccount); - loadIAXAccount(index); - lblIAXError->setText(""); - } -} - -void -ConfigurationPanel::loadIAXAccount(int number) -{ - QString account = "IAX" + QString::number(number); - QString type = ConfigurationManager::instance().get(account, ACCOUNT_TYPE); - - chkIAXAutoregister->setChecked(ConfigurationManager::instance() - .get(account,ACCOUNT_AUTO_REGISTER).toUInt()); - - chkIAXEnable->setChecked(ConfigurationManager::instance() - .get(account,ACCOUNT_ENABLE).toUInt()); - - QString aliasName = ConfigurationManager::instance().get(account, ACCOUNT_ALIAS); - IAXalias->setText(aliasName); - - IAXuser->setText(ConfigurationManager::instance().get(account,SIGNALISATION_IAXUSER)); - IAXpass->setText(ConfigurationManager::instance().get(account,SIGNALISATION_IAXPASS)); - IAXhost->setText(ConfigurationManager::instance().get(account,SIGNALISATION_IAXHOST)); - lastIAXAccount = number; -} - -void -ConfigurationPanel::saveIAXAccount(int number) -{ - QString account = "IAX" + QString::number(number); - QString aliasName = IAXalias->text(); - ConfigurationManager::instance().set(account, ACCOUNT_ALIAS, aliasName); - QString accountName; - if (aliasName.isEmpty()) { - accountName = QObject::tr("IAX Account #%1").arg(number+1); - } else { - if (aliasName.length() > 30) { - aliasName = aliasName.left(30) + "..."; - } - accountName = aliasName + " (" + QObject::tr("IAX Account #%1").arg(number+1) + ")"; - } - cboIAXAccount->changeItem(accountName, number); - ConfigurationManager::instance().set(account, SIGNALISATION_IAXUSER, IAXuser->text()); - ConfigurationManager::instance().set(account, SIGNALISATION_IAXPASS, IAXpass->text()); - ConfigurationManager::instance().set(account, SIGNALISATION_IAXHOST, IAXhost->text()); - ConfigurationManager::instance().set(account, - ACCOUNT_AUTO_REGISTER, - QString::number(chkAutoregister->isChecked())); - ConfigurationManager::instance().set(account, - ACCOUNT_ENABLE, - QString::number(chkEnable->isChecked())); -} diff --git a/src/gui/qt/ConfigurationPanelImpl.cpp b/src/gui/qt/ConfigurationPanelImpl.cpp deleted file mode 100644 index 7c5053df2c..0000000000 --- a/src/gui/qt/ConfigurationPanelImpl.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qbutton.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qsizepolicy.h> - -#include "ConfigurationPanelImpl.hpp" - -ConfigurationPanelImpl::ConfigurationPanelImpl(QWidget *parent) - : QDialog(parent) -{ - mLayout = new QVBoxLayout(this); - -} - -void -ConfigurationPanelImpl::add(const ConfigEntry &entry) -{ - mEntries[entry.section].push_back(entry); -} - -void -ConfigurationPanelImpl::generate() -{ - std::map< QString, std::list< ConfigEntry > >::iterator pos = mEntries.begin(); - while(pos != mEntries.end()) { - QVBoxLayout *l = new QVBoxLayout(this); - - std::list< ConfigEntry > entries = pos->second; - std::list< ConfigEntry >::iterator entrypos = entries.begin(); - while(entrypos != entries.end()) { - QHBox *hbox = new QHBox(this); - mLayout->addWidget(hbox); - - QLabel *label = new QLabel(hbox); - label->setText((*entrypos).name); - QLineEdit *edit = new QLineEdit(hbox); - edit->setText((*entrypos).value); - - entrypos++; - } - - pos++; - } - - QButton *ok = new QButton(this); - ok->setText(QObject::tr("Ok")); - mLayout->addWidget(ok); - - show(); -} - - diff --git a/src/gui/qt/ConfigurationPanelImpl.hpp b/src/gui/qt/ConfigurationPanelImpl.hpp deleted file mode 100644 index b8aeeddafb..0000000000 --- a/src/gui/qt/ConfigurationPanelImpl.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CONFIGURATION_PANEL_IMPL_HPP__ -#define __CONFIGURATION_PANEL_IMPL_HPP__ - -#include <list> -#include <map> -#include <qlayout.h> -#include <qdialog.h> - -struct ConfigEntry -{ -public: - ConfigEntry(QString s, - QString n, - QString t, - QString d, - QString v) - { - section = s; - name = n; - type = t; - def = d; - value = v; - } - - QString section; - QString name; - QString type; - QString def; - QString value; -}; - -class ConfigurationPanelImpl : public QDialog -{ - Q_OBJECT - -public: - ConfigurationPanelImpl(QWidget *parent = NULL); - -public slots: - void add(const ConfigEntry &entry); - void generate(); - -private: - std::map< QString, std::list< ConfigEntry > > mEntries; - QVBoxLayout *mLayout; -}; - - -#endif diff --git a/src/gui/qt/DebugOutput.hpp b/src/gui/qt/DebugOutput.hpp deleted file mode 100644 index 0001320532..0000000000 --- a/src/gui/qt/DebugOutput.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __DEBUGOUTPUT_HPP__ -#define __DEBUGOUTPUT_HPP__ - -#include "utilspp/Singleton.hpp" -#include "DebugOutputImpl.hpp" - -typedef utilspp::SingletonHolder< DebugOutputImpl > DebugOutput; - -#endif - diff --git a/src/gui/qt/DebugOutputImpl.cpp b/src/gui/qt/DebugOutputImpl.cpp deleted file mode 100644 index 3714e6f9a4..0000000000 --- a/src/gui/qt/DebugOutputImpl.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" -#include <qfile.h> - -#include "DebugOutputImpl.hpp" - -DebugOutputImpl::DebugOutputImpl() -#ifdef SFLDEBUG - : QTextStream(stdout, IO_WriteOnly) -#else - : QTextStream(&mOutputString, IO_WriteOnly) -#endif -{} diff --git a/src/gui/qt/DebugOutputImpl.hpp b/src/gui/qt/DebugOutputImpl.hpp deleted file mode 100644 index 6416d01820..0000000000 --- a/src/gui/qt/DebugOutputImpl.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __DEBUGOUTPUTIMPL_HPP__ -#define __DEBUGOUTPUTIMPL_HPP__ -#include <qtextstream.h> - -class DebugOutputImpl : public QTextStream -{ -public: - DebugOutputImpl(); - -private: -#ifndef SFLDEBUG - QString mOutputString; -#endif -}; - -#endif diff --git a/src/gui/qt/Event.cpp b/src/gui/qt/Event.cpp deleted file mode 100644 index 67f0964704..0000000000 --- a/src/gui/qt/Event.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qobject.h> - -#include "globals.h" - -#include "Call.hpp" -#include "DebugOutput.hpp" -#include "Event.hpp" - -Event::Event(const QString &code, - const std::list< QString > &args) - : mCode(code) - , mUnusedArgs(args) - , mArgs(args) -{} - - -void -Event::execute() -{ - DebugOutput::instance() << QObject::tr("Event: Received: %1\n").arg(toString()); -} - -QString -Event::toString() -{ - QString output(mCode); - for(std::list< QString >::iterator pos = mArgs.begin(); - pos != mArgs.end(); - pos++) { - output += " "; - output += *pos; - } - - return output; -} - -CallRelatedEvent::CallRelatedEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{ - std::list< QString > l(getUnusedArgs()); - if(l.size() != 0) { - mCallId = *l.begin(); - l.pop_front(); - setUnusedArgs(l); - } -} - -QString -CallRelatedEvent::getCallId() -{ - return mCallId; -} diff --git a/src/gui/qt/Event.hpp b/src/gui/qt/Event.hpp deleted file mode 100644 index 52b3aa1a79..0000000000 --- a/src/gui/qt/Event.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __EVENT_HPP__ -#define __EVENT_HPP__ - -#include <list> -#include <qstring.h> - -class Event -{ -public: - Event(const QString &code, - const std::list< QString > &args); - virtual ~Event(){} - - virtual void execute(); - - virtual QString toString(); - - std::list< QString > getUnusedArgs() - {return mUnusedArgs;} - - void setUnusedArgs(const std::list< QString > &args) - {mUnusedArgs = args;} - -protected: - QString& getCode() { return mCode; } - -private: - QString mCode; - std::list< QString > mUnusedArgs; - std::list< QString > mArgs; -}; - -class CallRelatedEvent : public Event -{ -public: - CallRelatedEvent(const QString &code, - const std::list< QString > &args); - - QString getCallId(); - -private: - QString mCallId; -}; - - -#endif diff --git a/src/gui/qt/EventAccount.cpp b/src/gui/qt/EventAccount.cpp deleted file mode 100644 index fcd26a0da2..0000000000 --- a/src/gui/qt/EventAccount.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" - -#include "EventAccount.hpp" -#include "PhoneLineManager.hpp" - -AccountItemEvent::AccountItemEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{ - std::list< QString > l = getUnusedArgs(); - if(l.size() >= 3) { - mAccountId = *l.begin(); - l.pop_front(); - mStatus = *l.begin(); - l.pop_front(); - mAlias = *l.begin(); - l.pop_front(); - setUnusedArgs(l); - } -} - -void -AccountItemEvent::execute() -{ - bool isEnabled = false; - if (getCode() == "130") { - isEnabled = true; - } - PhoneLineManager::instance().addAccount(mAccountId, isEnabled, mAlias); - -} - diff --git a/src/gui/qt/EventAccount.hpp b/src/gui/qt/EventAccount.hpp deleted file mode 100644 index ca73b0bcee..0000000000 --- a/src/gui/qt/EventAccount.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __REQUESTACCOUNT_HPP__ -#define __REQUESTACCOUNT_HPP__ - -#include "Event.hpp" - -class AccountItemEvent : public Event -{ -public: - AccountItemEvent(const QString &code, - const std::list< QString > &args); - - void execute(); - -protected: - QString mAccountId; - QString mStatus; - QString mAlias; -}; - -#endif - diff --git a/src/gui/qt/EventFactory.hpp b/src/gui/qt/EventFactory.hpp deleted file mode 100644 index 1a21f15688..0000000000 --- a/src/gui/qt/EventFactory.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __EVENTFACTORY_HPP__ -#define __EVENTFACTORY_HPP__ - -#include <list> -#include <map> -#include <qstring.h> - -#include "Event.hpp" - -/** - * This is the base class that we will use to - * create an object from the "create" function. - */ -template< typename Base > -class EventCreatorBase -{ - public: - virtual ~EventCreatorBase(){} - virtual Base *create(const QString &code, - const std::list< QString > &args) = 0; - - virtual EventCreatorBase *clone() = 0; -}; - -/** - * This is the actual class that will create - * the request. It will return a Request - */ -template< typename Base, typename Actual > - class EventCreator : public EventCreatorBase< Base > -{ - public: - virtual Actual *create(const QString &code, - const std::list< QString > &args); - - virtual EventCreatorBase< Base > *clone(); -}; - - -/** - * This class is used to create object related to - * a string. However, thoses objects will be created - * with the default constructor. - */ -template< typename Base > -class EventFactoryImpl -{ -public: - EventFactoryImpl(); - - /** - * Ask for a new object linked to the string. - */ - Base *create(const QString &code, - const std::list< QString > &args); - - /** - * Register the string to return a Actual type. - */ - template< typename Actual > - void registerEvent(const QString &code); - - template< typename Actual > - void registerDefaultEvent(); - - private: - std::map< QString, EventCreatorBase< Base > * > mEventCreators; - EventCreatorBase< Base > *mDefaultCreator; -}; - -#include "EventFactory.inl" - -#include "utilspp/Singleton.hpp" - -typedef utilspp::SingletonHolder< EventFactoryImpl< Event > > EventFactory; - - -#endif diff --git a/src/gui/qt/EventFactory.inl b/src/gui/qt/EventFactory.inl deleted file mode 100644 index 369d47e217..0000000000 --- a/src/gui/qt/EventFactory.inl +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef __EVENTFACTORY_INL__ -#define __EVENTFACTORY_INL__ - -#include <qobject.h> -#include <stdexcept> - -#include "DebugOutput.hpp" - -template< typename Base, typename Actual > -Actual * -EventCreator< Base, Actual >::create(const QString &code, - const std::list< QString > &args) -{ - return new Actual(code, args); -} - -template< typename Base, typename Actual > -EventCreatorBase< Base > * -EventCreator< Base, Actual >::clone() -{ - return new EventCreator< Base, Actual >(); -} - -template< typename Base > -EventFactoryImpl< Base >::EventFactoryImpl() - : mDefaultCreator(NULL) -{} - -template< typename Base > -Base * -EventFactoryImpl< Base >::create(const QString &code, - const std::list< QString > &args) -{ - typename std::map< QString, EventCreatorBase< Base > * >::iterator pos = mEventCreators.find(code); - if(pos == mEventCreators.end()) { - if(mDefaultCreator) { - return mDefaultCreator->create(code, args); - } - else{ - DebugOutput::instance() << QObject::tr("The code %1 has no creator registered.\n" - "and there's no default creator").arg(code); - } - } - - return pos->second->create(code, args); -} - -template< typename Base > -template< typename Actual > -void -EventFactoryImpl< Base >::registerEvent(const QString &code) -{ - if(mEventCreators.find(code) != mEventCreators.end()) { - delete mEventCreators[code]; - } - - mEventCreators[code] = new EventCreator< Base, Actual >(); -} - -template< typename Base > -template< typename Actual > -void -EventFactoryImpl< Base >::registerDefaultEvent() -{ - if(mDefaultCreator) { - delete mDefaultCreator; - } - - mDefaultCreator = new EventCreator< Base, Actual >(); -} - - -#endif - diff --git a/src/gui/qt/Factory.hpp b/src/gui/qt/Factory.hpp deleted file mode 100644 index a89cf9212f..0000000000 --- a/src/gui/qt/Factory.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __FACTORY_HPP__ -#define __FACTORY_HPP__ - -template< typename T > -struct Creator -{ - virtual ~Creator(){} - - virtual T *create() = 0; -}; - -template< typename T > -class Factory -{ -public: - Factory(); - ~Factory(); - - /** - * This function will set the creator. The - * Factory owns the creator instance. - */ - void setCreator(Creator< T > *creator); - - /** - * It ask the creator to create a SessionIO. - * If there's no creator set, it will throw - * a std::logic_error. - */ - T *create(); - -private: - Creator< T > *mCreator; -}; - -#include "Factory.inl" - -#endif diff --git a/src/gui/qt/Factory.inl b/src/gui/qt/Factory.inl deleted file mode 100644 index 5b96b6474b..0000000000 --- a/src/gui/qt/Factory.inl +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <stdexcept> - -template< typename T > -Factory< T >::Factory() - : mCreator(0) -{} - -template< typename T > -Factory< T >::~Factory() -{ - delete mCreator; -} - -template< typename T > -void -Factory< T >::setCreator(Creator< T > *creator) -{ - mCreator = creator; -} - -template< typename T > -T * -Factory< T >::create() -{ - if(!mCreator) { - throw std::logic_error("Trying to create without a creator."); - } - else { - return mCreator->create(); - } -} - diff --git a/src/gui/qt/JPushButton.cpp b/src/gui/qt/JPushButton.cpp deleted file mode 100644 index 6e64b26290..0000000000 --- a/src/gui/qt/JPushButton.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jerome Oufella (jerome.oufella@savoirfairelinux.com) - * - * Portions (c) Jean-Philippe Barrette-LaPierre - * (jean-philippe.barrette-lapierre@savoirfairelinux.com) - * Portions (c) Valentin Heinitz - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, - * or (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with dpkg; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qbitmap.h> -#include <qevent.h> -#include <qimage.h> -#include <qevent.h> - -#include "globals.h" - -#include "DebugOutput.hpp" -#include "JPushButton.hpp" -#include "TransparentWidget.hpp" - -JPushButton::JPushButton(const QString &released, - const QString &pressed, - QWidget* parent) - : QLabel(parent) - , mIsPressed(false) - , mIsToggling(false) -{ - mImages[0] = transparize(released); - mImages[1] = transparize(pressed); - release(); -} - -JPushButton::~JPushButton() -{} - -void -JPushButton::setToggle(bool toggle) -{ - mIsToggling = toggle; -} - -QPixmap -JPushButton::transparize(const QString &image) -{ - return TransparentWidget::transparize(image); -} - -void -JPushButton::release() -{ - mIsPressed = false; - releaseImage(); -} - -void -JPushButton::press() -{ - mIsPressed = true; - pressImage(); -} - -void -JPushButton::releaseImage() -{ - setPixmap(mImages[0]); - if(mImages[0].hasAlpha()) { - setMask(*mImages[0].mask()); - } - resize(mImages[0].size()); -} - -void -JPushButton::pressImage() -{ - setPixmap(mImages[1]); - if(mImages[1].hasAlpha()) { - setMask(*mImages[1].mask()); - } - resize(mImages[1].size()); -} - -// Mouse button released -void -JPushButton::mousePressEvent(QMouseEvent *e) -{ - switch (e->button()) { - case Qt::LeftButton: - pressImage(); - break; - - default: - e->ignore(); - break; - } -} - -// Mouse button released -void -JPushButton::mouseReleaseEvent (QMouseEvent *e) { - switch (e->button()) { - case Qt::LeftButton: - if (this->rect().contains(e->pos())) { - if(mIsToggling) { - mIsPressed = !mIsPressed; - if(mIsPressed) { - press(); - } - else { - release(); - } - emit clicked(mIsPressed); - } - else { - release(); - emit clicked(); - } - } - else { - if(isPressed()) { - press(); - } - else { - release(); - } - } - break; - - default: - e->ignore(); - break; - } -} - -void -JPushButton::mouseMoveEvent(QMouseEvent *e) -{ - e->accept(); -} - diff --git a/src/gui/qt/JPushButton.hpp b/src/gui/qt/JPushButton.hpp deleted file mode 100644 index c71e3114bd..0000000000 --- a/src/gui/qt/JPushButton.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jerome Oufella (jerome.oufella@savoirfairelinux.com) - * - * Portions (c) Jean-Philippe Barrette-LaPierre - * (jean-philippe.barrette-lapierre@savoirfairelinux.com) - * Portions (c) Valentin Heinitz - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, - * or (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with dpkg; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __J_PUSH_BUTTON_H__ -#define __J_PUSH_BUTTON_H__ - -#include <qlabel.h> -#include <qpixmap.h> -#include <qimage.h> - -/** - * This class Emulate a PushButton but takes two - * images to display its state. - */ -class JPushButton : public QLabel -{ - Q_OBJECT - -public: - JPushButton(const QString &released, - const QString &pressed, - QWidget *parent); - ~JPushButton(); - - bool isPressed() - {return mIsPressed;} - - static QPixmap transparize(const QString &image); - -public slots: - /** - * This function will switch the button - */ - virtual void press(); - virtual void release(); - - virtual void setToggle(bool toggled); - - private slots: - virtual void pressImage(); - virtual void releaseImage(); - -protected: - QPixmap mImages[2]; - bool mIsPressed; - -protected: - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - -signals: - void clicked(bool); - void clicked(); - -private: - bool mIsToggling; -}; - -#endif // defined(__J_PUSH_BUTTON_H__) diff --git a/src/gui/qt/Launcher.cpp b/src/gui/qt/Launcher.cpp deleted file mode 100644 index dd9b50573a..0000000000 --- a/src/gui/qt/Launcher.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "DebugOutput.hpp" -#include "Launcher.hpp" - -Launcher::Launcher() - : mProc(NULL) -{} - -Launcher::~Launcher() -{ - delete mProc; -} - -void -Launcher::start() -{ - if(!mProc) { - DebugOutput::instance() << QObject::tr("Launcher::start()\n"); - mProc = new QProcess(this); - mProc->addArgument("sflphoned"); - - connect(mProc, SIGNAL(processExited()), - this, SLOT(stop())); - connect(mProc, SIGNAL(readyReadStdout()), - this, SLOT(readOutput())); - connect(mProc, SIGNAL(readyReadStderr()), - this, SLOT(readError())); - - if(!mProc->start()) { - DebugOutput::instance() << tr("Launcher: Couldn't launch sflphoned.\n"); - emit error(); - } - else { - DebugOutput::instance() << tr("Launcher: sflphoned launched.\n"); - emit started(); - } - } -} - -void -Launcher::stop() -{ - if(mProc) { - mProc->kill(); - delete mProc; - mProc = NULL; - emit stopped(); - } -} - -void -Launcher::readOutput() -{ - if(mProc) { - //emit daemonOutputAvailable(mProc->readLineStdout()); - DebugOutput::instance() << tr("%1\n").arg(mProc->readLineStdout()); - } - else { - DebugOutput::instance() << tr("Launcher: Trying to read output without " - "a valid process.\n"); - } -} - -void -Launcher::readError() -{ - if(mProc) { - DebugOutput::instance() << tr("%1\n").arg(mProc->readLineStderr()); - } - else { - DebugOutput::instance() << tr("Launcher: Trying to read error without " - "a valid process.\n"); - } -} diff --git a/src/gui/qt/Launcher.hpp b/src/gui/qt/Launcher.hpp deleted file mode 100644 index 346f10c840..0000000000 --- a/src/gui/qt/Launcher.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __LAUNCHER_HPP__ -#define __LAUNCHER_HPP__ - -#include <qobject.h> -#include <qprocess.h> - -class Launcher : public QObject -{ - Q_OBJECT - -public: - Launcher(); - virtual ~Launcher(); - -signals: - void started(); - void stopped(); - void error(); - void daemonOutputAvailable(QString); - void daemonErrorAvailable(QString); - -public slots: - void start(); - void stop(); - void readOutput(); - void readError(); - -private: - QProcess *mProc; -}; - -#endif diff --git a/src/gui/qt/Makefile.am b/src/gui/qt/Makefile.am deleted file mode 100644 index 07c7f7dc33..0000000000 --- a/src/gui/qt/Makefile.am +++ /dev/null @@ -1,144 +0,0 @@ -libexec_PROGRAMS = sflphone-qt - -BUILT_SOURCES = \ - ConfigurationPanelui.cpp \ - ConfigurationPanel.h \ - ConfigurationPanelmocpp.cpp \ - ConfigurationManagerImplmoc.cpp \ - ConfigurationPanelImplmoc.cpp \ - JPushButtonmoc.cpp \ - Launchermoc.cpp \ - NumericKeypadmoc.cpp \ - PhoneLinemoc.cpp \ - PhoneLineButtonmoc.cpp \ - PhoneLineManagerImplmoc.cpp \ - SFLLcdmoc.cpp \ - SFLPhoneAppmoc.cpp \ - SFLPhoneWindowmoc.cpp \ - SFLRequestmoc.cpp \ - Requestmoc.cpp \ - Sessionmoc.cpp \ - SessionIOmoc.cpp \ - TCPSessionIOmoc.cpp \ - TransparentWidgetmoc.cpp \ - VolumeControlmoc.cpp \ - qmake_image_collection.cpp - -IMAGES = $(top_srcdir)/images/*.png - -sflphone_qt_SOURCES = \ - $(BUILT_SOURCES) \ - Account.cpp \ - Account.hpp \ - Call.cpp \ - Call.hpp \ - CallManager.hpp \ - CallManagerImpl.cpp \ - CallManagerImpl.hpp \ - CallStatus.cpp \ - CallStatus.hpp \ - EventAccount.cpp \ - EventAccount.hpp \ - CallStatusFactory.hpp \ - ConfigurationManager.hpp \ - ConfigurationManagerImpl.cpp \ - ConfigurationManagerImpl.hpp \ - ConfigurationPanelImpl.cpp \ - ConfigurationPanelImpl.hpp \ - DebugOutput.hpp \ - DebugOutputImpl.cpp \ - DebugOutputImpl.hpp \ - Event.cpp \ - Event.hpp \ - EventFactory.hpp \ - EventFactory.inl \ - Factory.hpp \ - Factory.inl \ - JPushButton.cpp JPushButton.hpp \ - Launcher.cpp \ - Launcher.hpp \ - NumericKeypad.cpp \ - NumericKeypad.hpp \ - ObjectFactory.hpp \ - ObjectFactory.inl \ - ObjectPool.hpp \ - ObjectPool.inl \ - PhoneLine.cpp \ - PhoneLine.hpp \ - PhoneLineButton.cpp \ - PhoneLineButton.hpp \ - PhoneLineLocker.cpp \ - PhoneLineLocker.hpp \ - PhoneLineManager.hpp \ - PhoneLineManagerImpl.cpp \ - PhoneLineManagerImpl.hpp \ - QjListBoxPixmap.cpp \ - QjListBoxPixmap.hpp \ - Request.cpp \ - Request.hpp \ - Requester.hpp \ - RequesterImpl.cpp \ - RequesterImpl.hpp \ - RequesterImpl.inl \ - SFLCallStatus.hpp \ - SFLEvents.cpp \ - SFLEvents.hpp \ - SFLLcd.cpp \ - SFLLcd.hpp \ - SFLPhoneApp.cpp \ - SFLPhoneApp.hpp \ - SFLPhoneWindow.cpp \ - SFLPhoneWindow.hpp \ - SFLRequest.cpp \ - SFLRequest.hpp \ - Session.cpp \ - Session.hpp \ - SessionFactory.hpp \ - SessionIO.hpp \ - SessionIOFactory.hpp \ - SkinManager.hpp \ - SkinManagerImpl.cpp \ - SkinManagerImpl.hpp \ - TCPSessionIO.cpp \ - TCPSessionIO.hpp \ - TCPSessionIOCreator.cpp \ - TCPSessionIOCreator.hpp \ - TransparentWidget.cpp \ - TransparentWidget.hpp \ - Url.cpp \ - Url.hpp \ - VolumeControl.cpp \ - VolumeControl.hpp \ - globals.h \ - main.cpp \ - ConfigurationPanel.ui.h - -CLEANFILES = \ - $(BUILT_SOURCES) - -sflphone_qt_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DDATADIR=\"$(sflphone_datadir)\" -# add QT_LIBS because LIBS conflicts in sflphone.la and was set to "" in m4/gwqt.m4 -sflphone_qt_LDADD = $(top_srcdir)/libs/taxidermy/libtaxidermy.la $(QT_LIBS) - -AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_CXXFLAGS) $(X_INCLUDES) $(all_includes) -AM_LDFLAGS = $(QT_LDADD) $(X_LDFLAGS) $(all_libraries) -#AM_CPPFLAGS = -I$(top_srcdir)/libs $(QT_CXXFLAGS) -#sflphone_qt_LDADD = $(QT_LDADD) - - -qmake_image_collection.cpp: $(IMAGES) - $(UIC) -embed sflphone-qt $(IMAGES) -o $@ - -%.h: %.ui - $(UIC) -o $@ $< - -%mocpp.cpp: %.h - $(MOC) -o $@ $< - -%moc.cpp: %.hpp - $(MOC) -o $@ $< - -%ui.cpp: %.ui - $(UIC) -o $@ -impl $*.h $< - - diff --git a/src/gui/qt/NumericKeypad.cpp b/src/gui/qt/NumericKeypad.cpp deleted file mode 100644 index 8ded67b23f..0000000000 --- a/src/gui/qt/NumericKeypad.cpp +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <string> -#include <utility> // for std::make_pair -#include <qapplication.h> -#include <qevent.h> - -#include "DebugOutput.hpp" -#include "NumericKeypad.hpp" - -#define PIXMAP_KEYPAD_IMAGE QString("dtmf_main.png") -#define DTMF_0_RELEASED_IMAGE QString("dtmf_0_off.png") -#define DTMF_0_PRESSED_IMAGE QString("dtmf_0_on.png") -#define DTMF_1_RELEASED_IMAGE QString("dtmf_1_off.png") -#define DTMF_1_PRESSED_IMAGE QString("dtmf_1_on.png") -#define DTMF_2_RELEASED_IMAGE QString("dtmf_2_off.png") -#define DTMF_2_PRESSED_IMAGE QString("dtmf_2_on.png") -#define DTMF_3_RELEASED_IMAGE QString("dtmf_3_off.png") -#define DTMF_3_PRESSED_IMAGE QString("dtmf_3_on.png") -#define DTMF_4_RELEASED_IMAGE QString("dtmf_4_off.png") -#define DTMF_4_PRESSED_IMAGE QString("dtmf_4_on.png") -#define DTMF_5_RELEASED_IMAGE QString("dtmf_5_off.png") -#define DTMF_5_PRESSED_IMAGE QString("dtmf_5_on.png") -#define DTMF_6_RELEASED_IMAGE QString("dtmf_6_off.png") -#define DTMF_6_PRESSED_IMAGE QString("dtmf_6_on.png") -#define DTMF_7_RELEASED_IMAGE QString("dtmf_7_off.png") -#define DTMF_7_PRESSED_IMAGE QString("dtmf_7_on.png") -#define DTMF_8_RELEASED_IMAGE QString("dtmf_8_off.png") -#define DTMF_8_PRESSED_IMAGE QString("dtmf_8_on.png") -#define DTMF_9_RELEASED_IMAGE QString("dtmf_9_off.png") -#define DTMF_9_PRESSED_IMAGE QString("dtmf_9_on.png") -#define DTMF_STAR_RELEASED_IMAGE QString("dtmf_star_off.png") -#define DTMF_STAR_PRESSED_IMAGE QString("dtmf_star_on.png") -#define DTMF_POUND_RELEASED_IMAGE QString("dtmf_pound_off.png") -#define DTMF_POUND_PRESSED_IMAGE QString("dtmf_pound_on.png") -#define DTMF_CLOSE_RELEASED_IMAGE QString("dtmf_close_off.png") -#define DTMF_CLOSE_PRESSED_IMAGE QString("dtmf_close_on.png") - -NumericKeypad::NumericKeypad(QWidget* parent = 0, bool showAtStart=false) -//: TransparentWidget(PIXMAP_KEYPAD_IMAGE, NULL) - : QDialog(parent, - "DTMF Keypad", - false, - Qt::WStyle_Customize), mWinRef(0) -{ - TransparentWidget::setPaletteBackgroundPixmap(this, PIXMAP_KEYPAD_IMAGE); - resize(TransparentWidget::retreive(PIXMAP_KEYPAD_IMAGE).size()); - this->setCaption("DTMF Keypad"); - //setMaximumSize(getSourceImage().width(), getSourceImage().height()); - - // Buttons initialisation - mKey0 = new JPushButton(DTMF_0_RELEASED_IMAGE, - DTMF_0_PRESSED_IMAGE, - this); - mKey1 = new JPushButton(DTMF_1_RELEASED_IMAGE, - DTMF_1_PRESSED_IMAGE, - this); - mKey2 = new JPushButton(DTMF_2_RELEASED_IMAGE, - DTMF_2_PRESSED_IMAGE, - this); - mKey3 = new JPushButton(DTMF_3_RELEASED_IMAGE, - DTMF_3_PRESSED_IMAGE, - this); - mKey4 = new JPushButton(DTMF_4_RELEASED_IMAGE, - DTMF_4_PRESSED_IMAGE, - this); - mKey5 = new JPushButton(DTMF_5_RELEASED_IMAGE, - DTMF_5_PRESSED_IMAGE, - this); - mKey6 = new JPushButton(DTMF_6_RELEASED_IMAGE, - DTMF_6_PRESSED_IMAGE, - this); - mKey7 = new JPushButton(DTMF_7_RELEASED_IMAGE, - DTMF_7_PRESSED_IMAGE, - this); - mKey8 = new JPushButton(DTMF_8_RELEASED_IMAGE, - DTMF_8_PRESSED_IMAGE, - this); - mKey9 = new JPushButton(DTMF_9_RELEASED_IMAGE, - DTMF_9_PRESSED_IMAGE, - this); - mKeyStar = new JPushButton(DTMF_STAR_RELEASED_IMAGE, - DTMF_STAR_PRESSED_IMAGE, - this); - mKeyHash = new JPushButton(DTMF_POUND_RELEASED_IMAGE, - DTMF_POUND_PRESSED_IMAGE, - this); - mKeyClose = new JPushButton(DTMF_CLOSE_RELEASED_IMAGE, - DTMF_CLOSE_PRESSED_IMAGE, - this); - connect(mKey0, SIGNAL(clicked()), - this, SLOT(dtmf0Click())); - connect(mKey1, SIGNAL(clicked()), - this, SLOT(dtmf1Click())); - connect(mKey2, SIGNAL(clicked()), - this, SLOT(dtmf2Click())); - connect(mKey3, SIGNAL(clicked()), - this, SLOT(dtmf3Click())); - connect(mKey4, SIGNAL(clicked()), - this, SLOT(dtmf4Click())); - connect(mKey5, SIGNAL(clicked()), - this, SLOT(dtmf5Click())); - connect(mKey6, SIGNAL(clicked()), - this, SLOT(dtmf6Click())); - connect(mKey7, SIGNAL(clicked()), - this, SLOT(dtmf7Click())); - connect(mKey8, SIGNAL(clicked()), - this, SLOT(dtmf8Click())); - connect(mKey9, SIGNAL(clicked()), - this, SLOT(dtmf9Click())); - connect(mKeyStar, SIGNAL(clicked()), - this, SLOT(dtmfStarClick())); - connect(mKeyHash, SIGNAL(clicked()), - this, SLOT(dtmfHashClick())); - - - mKey0->move(58, 157); - mKey1->move(12, 22); - mKey2->move(58, 22); - mKey3->move(104, 22); - mKey4->move(12, 67); - mKey5->move(58, 67); - mKey6->move(104, 67); - mKey7->move(12, 112); - mKey8->move(58, 112); - mKey9->move(104, 112); - mKeyStar->move(12, 157); - mKeyHash->move(104, 157); - mKeyClose->move(141,5); - - mKeys.insert(std::make_pair(Qt::Key_0, mKey0)); - mKeys.insert(std::make_pair(Qt::Key_1, mKey1)); - mKeys.insert(std::make_pair(Qt::Key_2, mKey2)); - mKeys.insert(std::make_pair(Qt::Key_3, mKey3)); - mKeys.insert(std::make_pair(Qt::Key_4, mKey4)); - mKeys.insert(std::make_pair(Qt::Key_5, mKey5)); - mKeys.insert(std::make_pair(Qt::Key_6, mKey6)); - mKeys.insert(std::make_pair(Qt::Key_7, mKey7)); - mKeys.insert(std::make_pair(Qt::Key_8, mKey8)); - mKeys.insert(std::make_pair(Qt::Key_9, mKey9)); - mKeys.insert(std::make_pair(Qt::Key_Asterisk, mKeyStar)); - mKeys.insert(std::make_pair(Qt::Key_NumberSign, mKeyHash)); - - connect(mKeyClose, SIGNAL(clicked()), - this, SLOT(hide())); - connect(mKeyClose, SIGNAL(clicked()), - this, SLOT(slotHidden())); - - mAlreadySet = false; - if (showAtStart) { - mAlreadySet = true; - show(); - emit isShown(true); - } -} - -NumericKeypad::~NumericKeypad() -{} - -void -NumericKeypad::keyReleaseEvent (QKeyEvent* e) { - std::map< Qt::Key, JPushButton * >::iterator pos = mKeys.find(Qt::Key(e->key())); - if(pos != mKeys.end()) { - QMouseEvent me(QEvent::MouseButtonRelease, - QPoint(0,0), - Qt::LeftButton, - Qt::LeftButton); - QApplication::sendEvent(pos->second, - &me); - } -} - -void -NumericKeypad::keyPressEvent (QKeyEvent* e) { - //QApplication::sendEvent(QApplication::mainWindow, e); - // TODO: Key appears pressed when done. - std::map< Qt::Key, JPushButton * >::iterator pos = mKeys.find(Qt::Key(e->key())); - if(pos != mKeys.end()) { - QMouseEvent me(QEvent::MouseButtonPress, - QPoint(0,0), - Qt::LeftButton, - Qt::LeftButton); - QApplication::sendEvent(pos->second, - &me); - } - else { - emit keyPressed(Qt::Key(e->key())); - } -} - - -void -NumericKeypad::mousePressEvent(QMouseEvent *e) -{ - mLastPos = e->pos(); -} - -void -NumericKeypad::mouseMoveEvent(QMouseEvent *e) -{ - // Note that moving the windows is very slow - // 'cause it redraw the screen each time. - // Usually it doesn't. We could do it by a timer. - QPoint pt = e->globalPos() - mLastPos; - if (mWinRef) { - int range = 5; - int px0 = pt.x(); - int py0 = pt.y(); - int px1 = px0 + width(); - int py1 = py0 + height(); - -// DebugOutput::instance() << "Pt (x0,y0): " << px0 << " " << py0 << "\n"; -// DebugOutput::instance() << "Pt (x1,y1): " << px1 << " " << py1 << "\n"; - int wx0 = mWinRef->pos().x(); - int wy0 = mWinRef->pos().y(); - int wx1 = wx0 + mWinRef->width(); - int wy1 = wy0 + mWinRef->height(); -// DebugOutput::instance() << "mWinRef (x0,y0): " << wx0 << " " << wy0 << "\n"; -// DebugOutput::instance() << "mWinRef (x1,y1): " << wx1 << " " << wy1 << "\n"; - - // x and y - mIsDock = false; - if (abs(px0-wx1) <= range) { pt.setX(wx1); mIsDock = true; } - else if (abs(px1-wx0) <= range) { pt.setX(wx0-width()); mIsDock = true; } - - // top and down - if (abs(py0-wy0) <= range) { pt.setY(wy0); } - // the numeric under the telephone - else if (abs(py0-wy1) <= range) { pt.setY(wy1); mIsDock = true;} - // the numeric over the telephone - else if (abs(py1-wy0) <= range) { pt.setY(wy0-height()); mIsDock = true;} - } - - move(pt); -} - -void -NumericKeypad::dtmf0Click() -{ - emit keyPressed(Qt::Key_0); -} - -void -NumericKeypad::dtmf1Click() -{emit keyPressed(Qt::Key_1);} - -void -NumericKeypad::dtmf2Click() -{emit keyPressed(Qt::Key_2);} - -void -NumericKeypad::dtmf3Click() -{emit keyPressed(Qt::Key_3);} - -void -NumericKeypad::dtmf4Click() -{emit keyPressed(Qt::Key_4);} - -void -NumericKeypad::dtmf5Click() -{emit keyPressed(Qt::Key_5);} - -void -NumericKeypad::dtmf6Click() -{emit keyPressed(Qt::Key_6);} - -void -NumericKeypad::dtmf7Click() -{emit keyPressed(Qt::Key_7);} - -void -NumericKeypad::dtmf8Click() -{emit keyPressed(Qt::Key_8);} - -void -NumericKeypad::dtmf9Click() -{emit keyPressed(Qt::Key_9);} - -void -NumericKeypad::dtmfStarClick() -{emit keyPressed(Qt::Key_Asterisk);} - -void -NumericKeypad::dtmfHashClick() -{emit keyPressed(Qt::Key_NumberSign);} - -void -NumericKeypad::slotHidden() -{ - emit isShown(false); -} - -void -NumericKeypad::setDefaultPosition(const QPoint& point) { - if (mWinRef && !mAlreadySet) { - move(point); - mIsDock = true; - mAlreadySet = true; - } -} diff --git a/src/gui/qt/NumericKeypad.hpp b/src/gui/qt/NumericKeypad.hpp deleted file mode 100644 index 354e73db30..0000000000 --- a/src/gui/qt/NumericKeypad.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __NUMERIC_KEYPAD_HPP__ -#define __NUMERIC_KEYPAD_HPP__ - -#include <map> -#include <qdialog.h> -#include <qpoint.h> - -#include "JPushButton.hpp" -#include "TransparentWidget.hpp" - -class NumericKeypad : public QDialog -{ - Q_OBJECT -public: - // Default Constructor and destructor - NumericKeypad(QWidget* parent/*=0*/, bool showAtStart/*=false*/); - ~NumericKeypad(); - - JPushButton *mKey0; - JPushButton *mKey1; - JPushButton *mKey2; - JPushButton *mKey3; - JPushButton *mKey4; - JPushButton *mKey5; - JPushButton *mKey6; - JPushButton *mKey7; - JPushButton *mKey8; - JPushButton *mKey9; - JPushButton *mKeyStar; - JPushButton *mKeyHash; - JPushButton *mKeyClose; - - /** Set default position of the window */ - void setDefaultPosition(const QPoint&); - void setWindowReference(QWidget* widget) { mWinRef = widget; } - bool isDock() { return mIsDock; } - -public slots: - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void keyPressEvent(QKeyEvent *e); - void keyReleaseEvent(QKeyEvent *e); - - void dtmf0Click(); - void dtmf1Click(); - void dtmf2Click(); - void dtmf3Click(); - void dtmf4Click(); - void dtmf5Click(); - void dtmf6Click(); - void dtmf7Click(); - void dtmf8Click(); - void dtmf9Click(); - void dtmfStarClick(); - void dtmfHashClick(); - void slotHidden(); - -signals: - void keyPressed(Qt::Key k); - void isShown(bool); - -private: - QPoint mLastPos; - std::map< Qt::Key, JPushButton * > mKeys; - /** Window reference when moving the window (magnetic style) */ - QWidget* mWinRef; - bool mAlreadySet; // already set the default position or not? - bool mIsDock; // beside the ref window or not? -}; - -#endif // __NUMERIC_KEYPAD_H__ diff --git a/src/gui/qt/ObjectFactory.hpp b/src/gui/qt/ObjectFactory.hpp deleted file mode 100644 index 4cb8dd0a01..0000000000 --- a/src/gui/qt/ObjectFactory.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_OBJECTFACTORY_H -#define SFLPHONEGUI_OBJECTFACTORY_H - -#include <list> -#include <map> -#include <qstring.h> - -/** - * This is the base class that we will use to - * create an object from the "create" function. - */ -template< typename Base > -class ObjectCreatorBase -{ - public: - virtual ~ObjectCreatorBase(){} - virtual Base *create(const QString &command, - const QString &sequenceId, - const std::list< QString > &args) = 0; - - virtual ObjectCreatorBase *clone() = 0; -}; - -/** - * This is the actual class that will create - * the request. It will return a Request - */ -template< typename Base, typename Actual > - class ObjectCreator : public ObjectCreatorBase< Base > -{ - public: - virtual Actual *create(const QString &command, - const QString &sequenceId, - const std::list< QString > &args); - - virtual ObjectCreatorBase< Base > *clone(); -}; - - -/** - * This class is used to create object related to - * a string. However, thoses objects will be created - * with the default constructor. - */ -template< typename Base > -class ObjectFactory -{ -public: - ObjectFactory(); - - /** - * Ask for a new object linked to the string. - */ - Base *create(const QString &requestname, - const QString &sequenceId, - const std::list< QString > &args); - - /** - * Register the string to return a Actual type. - */ - template< typename Actual > - void registerObject(const QString &name); - - /** - * Register the default object to be created, - * when the object wanted isn't registered. - */ - template< typename Actual > - void registerDefaultObject(); - - private: - std::map< QString, ObjectCreatorBase< Base > * > mObjectCreators; - ObjectCreatorBase< Base > *mDefaultObjectCreator; -}; - -#include "ObjectFactory.inl" - -#endif diff --git a/src/gui/qt/ObjectFactory.inl b/src/gui/qt/ObjectFactory.inl deleted file mode 100644 index 09a5e643d1..0000000000 --- a/src/gui/qt/ObjectFactory.inl +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef SFLPHONEGUI_OBJECTFACTORY_INL -#define SFLPHONEGUI_OBJECTFACTORY_INL - -#include <qobject.h> -#include <stdexcept> - -#include "DebugOutput.hpp" - -template< typename Base, typename Actual > -Actual * -ObjectCreator< Base, Actual >::create(const QString &command, - const QString &sequenceId, - const std::list< QString > &args) -{ - return new Actual(sequenceId, command, args); -} - -template< typename Base, typename Actual > -ObjectCreatorBase< Base > * -ObjectCreator< Base, Actual >::clone() -{ - return new ObjectCreator< Base, Actual >(); -} - -template< typename Base > -ObjectFactory< Base >::ObjectFactory() - : mDefaultObjectCreator(NULL) -{} - -template< typename Base > -Base * -ObjectFactory< Base >::create(const QString &command, - const QString &sequenceId, - const std::list< QString > &args) -{ - typename std::map< QString, ObjectCreatorBase< Base > * >::iterator pos = mObjectCreators.find(command); - if(pos == mObjectCreators.end()) { - if(!mDefaultObjectCreator) { - throw std::logic_error("ObjectFactory: You need to specify a default creator.\n"); - } - - return mDefaultObjectCreator->create(command, sequenceId, args); - } - - return pos->second->create(command, sequenceId, args); -} - -template< typename Base > -template< typename Actual > -void -ObjectFactory< Base >::registerObject(const QString &name) -{ - if(mObjectCreators.find(name) != mObjectCreators.end()) { - delete mObjectCreators[name]; - } - - mObjectCreators[name] = new ObjectCreator< Base, Actual >(); -} - -template< typename Base > -template< typename Actual > -void -ObjectFactory< Base >::registerDefaultObject() -{ - if(mDefaultObjectCreator) { - delete mDefaultObjectCreator; - } - - mDefaultObjectCreator = new ObjectCreator< Base, Actual >(); -} - - -#endif - diff --git a/src/gui/qt/ObjectPool.hpp b/src/gui/qt/ObjectPool.hpp deleted file mode 100644 index 612161f9e5..0000000000 --- a/src/gui/qt/ObjectPool.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_OBJECTPOOL_H -#define SFLPHONEGUI_OBJECTPOOL_H - -#include <list> -#include <qstring.h> -#include <QMutex> -#include <QWaitCondition> - -template< typename T > -class ObjectPool -{ - public: - /** - * This function will push a line in the pool. - */ - void push(const T &line); - - /** - * This function will wait for an available line. - */ - bool pop(T &value, unsigned long time = ULONG_MAX); - - private: - std::list< T > mPool; - - QMutex mMutex; - QWaitCondition mDataAvailable; -}; - -#include "ObjectPool.inl" - -#endif - diff --git a/src/gui/qt/ObjectPool.inl b/src/gui/qt/ObjectPool.inl deleted file mode 100644 index b389eb92b1..0000000000 --- a/src/gui/qt/ObjectPool.inl +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_OBJECTPOOL_INL -#define SFLPHONEGUI_OBJECTPOOL_INL - -template< typename T > -void -ObjectPool< T >::push(const T &value) -{ - QMutexLocker guard(&mMutex); - mPool.push_back(value); - mDataAvailable.wakeOne(); -} - -template< typename T > -bool -ObjectPool< T >::pop(T &value, unsigned long time) -{ - QMutexLocker guard(&mMutex); - mDataAvailable.wait(guard.mutex(), time); - - if(mPool.begin() == mPool.end()) { - return false; - } - else { - typename std::list< T >::iterator pos = mPool.begin(); - mPool.pop_front(); - value = (*pos); - return true; - } -} - -#endif diff --git a/src/gui/qt/PhoneLine.cpp b/src/gui/qt/PhoneLine.cpp deleted file mode 100644 index d35dc4e5e0..0000000000 --- a/src/gui/qt/PhoneLine.cpp +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <iostream> - -#include "globals.h" -#include "Call.hpp" -#include "DebugOutput.hpp" -#include "PhoneLine.hpp" -#include "Request.hpp" -#include "Session.hpp" - -PhoneLine::PhoneLine(Session *session, - unsigned int line) - : mSession(session) - , mCall(NULL) - , mLine(line) - , mSelected(false) - , mLineStatus("test") - , mActionTimer(new QTimer(this)) - , mTalking(false) - , mIsOnError(false) - , mIsTransfering(false) -{ - QObject::connect(mActionTimer, SIGNAL(timeout()), - this, SLOT(resetAction())); - QObject::connect(this, SIGNAL(transfered()), - this, SLOT(finishTransfer())); -} - -PhoneLine::~PhoneLine() -{ - clearCall(); - mSession = 0; -} - -void -PhoneLine::clearCall() -{ - if(mCall) { - delete mCall; - mCall = NULL; - } - - clearPeer(); -} - -void -PhoneLine::setCall(const Call &call) -{ - setCall(new Call(call)); -} - -void -PhoneLine::setCall(Call *call) -{ - clearCall(); - - mCall = call; - setPeer(mCall->peer()); -} - - -void -PhoneLine::setPeer(const QString &peer) -{ - mPeer = peer; - emit peerUpdated(peer); -} - -void -PhoneLine::clearPeer() -{ - mPeer = ""; - emit peerCleared(); -} - -QString -PhoneLine::getLineStatus() -{ - return mLineStatus; -} - -void -PhoneLine::resetAction() -{ - setAction(""); -} - -void -PhoneLine::setLineStatus(QString status) -{ - mActionTimer->stop(); - mAction = ""; - - mLineStatus = status; - emit lineStatusChanged(mLineStatus); -} - -void -PhoneLine::setAction(QString status) -{ - mActionTimer->stop(); - mAction = status; - emit actionChanged(mAction); -} - -void -PhoneLine::setTempAction(QString status) -{ - mActionTimer->stop(); - mActionTimer->start(3000); - mAction = status; - emit actionChanged(mAction); -} - -unsigned int -PhoneLine::line() -{ - return mLine; -} - -void -PhoneLine::lock() -{ - //mPhoneLineMutex.lock(); -} - -void -PhoneLine::unlock() -{ - //mPhoneLineMutex.unlock(); -} - -void -PhoneLine::select(bool hardselect) -{ - if(!mSelected) { - mSelected = true; - - if(!hardselect) { - if(mCall) { - if(mIsOnError) { - close(); - } - else if(mCall->isIncomming()) { - answer(); - } - else { - unhold(); - } - } - else { - setLineStatus(QObject::tr("Ready.")); - setAction(""); - } - } - - emit selected(true); - } - -} - -void -PhoneLine::disconnect() -{ - mSelected = false; - close(); - - emit selected(false); -} - -void -PhoneLine::close() -{ - clearCall(); - mIsOnError = false; -} - -void -PhoneLine::error(QString message) -{ - setLineStatus(message); - mIsOnError = true; -} - -void -PhoneLine::unselect(bool hardselect) -{ - DebugOutput::instance() << tr("PhoneLine %1: I am unselected.\n").arg(mLine); - setAction(""); - mSelected = false; - if(mIsOnError) { - close(); - } - - if(mCall) { - if(!hardselect) { - DebugOutput::instance() << tr("PhoneLine: Forcing to Hold last call.\n"); - mCall->hold(); - } - emit backgrounded(); - } - else { - emit selected(false); - } -} - -void -PhoneLine::incomming(const Call &call) -{ - if(mCall) { - DebugOutput::instance() << tr("PhoneLine %1: Trying to set a phone line to an active call.\n").arg(mLine); - } - else { - setCall(call); - emit backgrounded(); - } -} - -void -PhoneLine::clear() -{ - mBuffer = ""; - emit bufferStatusChanged(mBuffer); -} - -void -PhoneLine::sendKey(Qt::Key c) -{ - DebugOutput::instance() << tr("PhoneLine %1: Received the character:%2.\n") - .arg(mLine) - .arg(c); - switch(c) { - case Qt::Key_Enter: - case Qt::Key_Return: - if(!mCall) { - return call(); - } - if(mCall && mIsTransfering) { - return transfer(); - } - break; - - case Qt::Key_Backspace: - if((!mCall || mIsTransfering) && mBuffer.length() > 0) { - mBuffer.remove(mBuffer.length() - 1, 1); - emit bufferStatusChanged(mBuffer); - } - break; - - default: - if(!mCall || mIsTransfering) { - mBuffer += c; - emit bufferStatusChanged(mBuffer); - } - - if (QChar(c).isDigit() || c == Qt::Key_Asterisk || c == Qt::Key_NumberSign) { - if(!mCall) { - mSession->playDtmf(c); - } - else { - mCall->sendDtmf(c); - } - } - } -} - -void -PhoneLine::call() -{ - if(mBuffer.length()) { - call(mBuffer); - } -} - -void -PhoneLine::call(const QString &to) -{ - if(!mCall) { - Call *call; - const Account* account = mSession->getSelectedAccount(); - if (account!=0) { - setLineStatus(tr("Calling %1...").arg(to)); - DebugOutput::instance() << tr("PhoneLine %1: Calling %2 on Account %3.\n").arg(mLine).arg(to).arg(account->id()); - Request *r = account->createCall(call, to); - // entry - connect(r, SIGNAL(entry(QString, QString)), - this, SLOT(setLineStatus(QString))); - - connect(r, SIGNAL(error(QString, QString)), - this, SLOT(error(QString))); - - connect(r, SIGNAL(success(QString, QString)), - this, SLOT(setTalkingState())); - - setCall(call); - clear(); - } else { - DebugOutput::instance() << tr("Phone Line has no active account to make a call\n"); - } - } -} - -void -PhoneLine::setTalkingState() -{ - mTalking = true; - mTalkingTime.start(); - talkingStarted(mTalkingTime); - setLineStatus(tr("Talking to: %1").arg(mPeer)); - setAction(""); -} - -void -PhoneLine::transfer() -{ - if(mCall) { - if(mBuffer.length() == 0) { - DebugOutput::instance() << tr("PhoneLine %1: We're now in transfer mode.\n").arg(mLine); - setAction(tr("Transfer to:")); - clear(); - unselect(true); - mIsTransfering = true; - } - else { - DebugOutput::instance() << tr("PhoneLine %1: Trying to transfer to \"%2\".\n") - .arg(mLine) - .arg(mBuffer); - connect(mCall->transfer(mBuffer), SIGNAL(success(QString, QString)), - this, SIGNAL(transfered())); - clear(); - - unselect(true); - } - } -} - -void -PhoneLine::finishTransfer() -{ - clearCall(); - unselect(true); - stopTalking(); - - if(mIsTransfering) { - mIsTransfering = false; - emit transfered(); - } -} - -void -PhoneLine::hold() -{ - if(mCall) { - setAction(tr("Holding...")); - DebugOutput::instance() << tr("PhoneLine %1: Trying to Hold.\n").arg(mLine); - mCall->hold(); - } - - unselect(); -} - -void -PhoneLine::unhold() -{ - if(mCall) { - setAction("Unholding..."); - DebugOutput::instance() << tr("PhoneLine %1: Trying to Unhold.\n").arg(mLine); - mCall->unhold(); - } -} - -void -PhoneLine::answer() -{ - if(mCall) { - setAction("Answering..."); - DebugOutput::instance() << tr("PhoneLine %1: Trying to answer.\n").arg(mLine); - mCall->answer(); - } -} - -void -PhoneLine::stopTalking() -{ - mTalking = false; - emit talkingStopped(); -} - -void -PhoneLine::hangup(bool sendrequest) -{ - stopTalking(); - - if(sendrequest) { - setAction(tr("Hanguping...")); - } - else { - setAction(tr("Hanguped.")); - } - - if(mCall) { - if(sendrequest) { - mCall->hangup(); - } - clearCall(); - } - emit hanguped(); - - clear(); - clearPeer(); - unselect(); -} - -QString -PhoneLine::getCallId() -{ - QString id; - if(mCall) { - id = mCall->id(); - } - - return id; -} - diff --git a/src/gui/qt/PhoneLine.hpp b/src/gui/qt/PhoneLine.hpp deleted file mode 100644 index 2b5cbc3968..0000000000 --- a/src/gui/qt/PhoneLine.hpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> -#include <qdatetime.h> - -class Call; -class Session; -class PhoneLine : public QObject -{ - Q_OBJECT - -public: - PhoneLine(Session *session, - unsigned int line); - ~PhoneLine(); - - void call(const QString &to); - void call(); - void answer(); - void hangup(bool sendrequest = true); - void hold(); - void unhold(); - - QString getCallId(); - - unsigned int line(); - - /** - * This will lock the current phone line. - * - * Note: this will only lock the phone line - * for those that uses this lock, unlock - * mechanism. PhoneLineManager always uses - * this mechanism. So, if you work only with - * PhoneLineManager, it will be thread safe. - */ - void lock(); - - /** - * This will unlock the current phone line. - * See the Note of the lock function. - */ - void unlock(); - - - /** - * This function will return true if there's no - * activity on this line. It means that even - * if we typed something on this line, but haven't - * started any communication, this will be available. - */ - bool isAvailable() - {return !mCall;} - - bool isTalking() - {return mTalking;} - - void sendKey(Qt::Key c); - - QTime getTalkingTime() - {return mTalkingTime;} - - QString getLineStatus(); - QString getBuffer() - {return mBuffer;} - -public slots: - void setLineStatus(QString); - void setAction(QString); - void setTempAction(QString); - void resetAction(); - void incomming(const Call &call); - - /** - * Clears the buffer of the line. - */ - void clear(); - - /** - * The user selected this line. - */ - void select(bool hardselect = false); - - /** - * This phoneline is no longer selected. - */ - void unselect(bool hardselect = false); - - /** - * This will do a hard unselect. it means it - * will remove the call if there's one. - */ - void disconnect(); - - /** - * This will close the current call. it means it - * will remove the call if there's one. - */ - void close(); - - /** - * This will close the current call. it means it - * will remove the call if there's one. The line - * will be in an error state. - */ - void error(QString); - - /** - * This function will put the line on hold - * and will wait for the numbre to compose. - */ - void transfer(); - - void finishTransfer(); - - void setPeer(const QString &peer); - void clearPeer(); - void setState(const QString &){} - - void setTalkingState(); - void stopTalking(); - -signals: - void selected(bool); - void backgrounded(); - void lineStatusChanged(QString); - void actionChanged(QString); - void bufferStatusChanged(QString); - void peerUpdated(QString); - void peerCleared(); - void talkingStarted(QTime); - void talkingStopped(); - void transfered(); - /** when the call is hangup */ - void hanguped(); - -private: - void setCall(Call *call); - void setCall(const Call &call); - void clearCall(); - - Session *mSession; - Call *mCall; - unsigned int mLine; - - bool mSelected; - bool mInUse; - //This is the buffer when the line is not in use; - QString mBuffer; - - QString mLineStatus; - QString mAction; - QTimer *mActionTimer; - QTime mTalkingTime; - bool mTalking; - QString mPeer; - - bool mIsOnError; - bool mIsTransfering; -}; diff --git a/src/gui/qt/PhoneLineButton.cpp b/src/gui/qt/PhoneLineButton.cpp deleted file mode 100644 index d1dfad00b8..0000000000 --- a/src/gui/qt/PhoneLineButton.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" - -#include "PhoneLineButton.hpp" - -#include <qevent.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qpainter.h> - - -PhoneLineButton::PhoneLineButton(unsigned int line, - QWidget *parent) - : QPushButton(parent) - , mLine(line) - , mFace(0) -{ - setName(QObject::tr("line%1").arg(line)); - setToggleButton(true); - mTimer = new QTimer(this); - connect(mTimer, SIGNAL(timeout()), - this, SLOT(swap())); - connect(this, SIGNAL(clicked()), - this, SLOT(sendClicked())); - mIsFlashing = false; -} - -void -PhoneLineButton::setToolTip(QString tip) -{ - QToolTip::add(this, tip); -} - -void -PhoneLineButton::swap() -{ - toggle(); -} - -void -PhoneLineButton::clearToolTip() -{ - QToolTip::remove(this); -} - -void -PhoneLineButton::suspend() -{ - setDown(false); - mIsFlashing = true; - mTimer->start(500); -} - -void -PhoneLineButton::sendClicked() -{ - if(isOn()) { - stopFlashing(); - emit selected(mLine); - } - else { - if (mIsFlashing) { - stopFlashing(); - emit selected(mLine); - } else { - emit unselected(mLine); - } - } -} - -void -PhoneLineButton::stopFlashing() { - mIsFlashing = false; - mTimer->stop(); -} diff --git a/src/gui/qt/PhoneLineButton.hpp b/src/gui/qt/PhoneLineButton.hpp deleted file mode 100644 index c7e7418970..0000000000 --- a/src/gui/qt/PhoneLineButton.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef __PHONELINEBUTTON_HPP__ -#define __PHONELINEBUTTON_HPP__ - -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpushbutton.h> - -class QTimer; - - -/** - * This class Emulate a PushButton but takes two - * images to display its state. - */ -class PhoneLineButton : public QPushButton -{ - Q_OBJECT - -public: - PhoneLineButton(unsigned int line, - QWidget *parent); - - virtual ~PhoneLineButton(){} - -signals: - void selected(unsigned int); - void unselected(unsigned int); - -public slots: - virtual void suspend(); - virtual void setToolTip(QString); - virtual void clearToolTip(); - virtual void swap(); - virtual void sendClicked(); - /** - * Stop the timer and the flashing - */ - void stopFlashing(); - -private: - unsigned int mLine; - QTimer *mTimer; - unsigned int mFace; - - /** - * If the line is flashing, we want to retreive it - * on or off - */ - bool mIsFlashing; -}; - -#endif // defined(__J_PUSH_BUTTON_H__) diff --git a/src/gui/qt/PhoneLineLocker.cpp b/src/gui/qt/PhoneLineLocker.cpp deleted file mode 100644 index c6092c359b..0000000000 --- a/src/gui/qt/PhoneLineLocker.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "PhoneLineLocker.hpp" -#include "PhoneLine.hpp" - -PhoneLineLocker::PhoneLineLocker(PhoneLine *line, bool lock) - : mPhoneLine(line) -{ - if(mPhoneLine && lock) { - mPhoneLine->lock(); - } -} - -PhoneLineLocker::~PhoneLineLocker() -{ - if(mPhoneLine) { - mPhoneLine->unlock(); - } -} - - diff --git a/src/gui/qt/PhoneLineLocker.hpp b/src/gui/qt/PhoneLineLocker.hpp deleted file mode 100644 index f28f369198..0000000000 --- a/src/gui/qt/PhoneLineLocker.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_PHONELINELOCKER_HPP -#define SFLPHONEGUI_PHONELINELOCKER_HPP - -class PhoneLine; - -/** - * This class is used as a Lock. It means - * that it will lock a phone line on its - * constructor, and unlock it in its - * destructor. This is generaly used to - * be exception safe. - */ -class PhoneLineLocker -{ -public: - /** - * Retreive the "line" PhoneLine and - * locks it. - */ - PhoneLineLocker(PhoneLine *line, bool lock = true); - - /** - * Unlock the currently locked PhoneLine. - */ - ~PhoneLineLocker(); - -private: - PhoneLine *mPhoneLine; -}; - -#endif diff --git a/src/gui/qt/PhoneLineManager.hpp b/src/gui/qt/PhoneLineManager.hpp deleted file mode 100644 index c9a02c5f0a..0000000000 --- a/src/gui/qt/PhoneLineManager.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __PHONELINEMANAGER_HPP__ -#define __PHONELINEMANAGER_HPP__ - -#include "utilspp/Singleton.hpp" -#include "PhoneLineManagerImpl.hpp" - -typedef utilspp::SingletonHolder< PhoneLineManagerImpl > PhoneLineManager; - -#endif - diff --git a/src/gui/qt/PhoneLineManagerImpl.cpp b/src/gui/qt/PhoneLineManagerImpl.cpp deleted file mode 100644 index 916a1f6f19..0000000000 --- a/src/gui/qt/PhoneLineManagerImpl.cpp +++ /dev/null @@ -1,849 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <iostream> -#include <stdexcept> - -#include "globals.h" - -#include "CallStatusFactory.hpp" -#include "ConfigurationManager.hpp" -#include "SFLEvents.hpp" -#include "SFLCallStatus.hpp" -#include "EventAccount.hpp" -#include "PhoneLine.hpp" -#include "PhoneLineLocker.hpp" -#include "PhoneLineManager.hpp" -#include "Request.hpp" - -#include <qmessagebox.h> - -PhoneLineManagerImpl::PhoneLineManagerImpl() - : mSession(NULL) - , mCurrentLine(NULL) - , mIsInitialized(false) - , mVolume(-1) - , mMicVolume(-1) - , mIsConnected(false) - , mIsStopping(false) - , mShouldStopDaemon(false) - , mLastNumber("") -{ - EventFactory::instance().registerDefaultEvent< DefaultEvent >(); - EventFactory::instance().registerEvent< GetEventEvent >("000"); - EventFactory::instance().registerEvent< IncommingEvent >("001"); - EventFactory::instance().registerEvent< HangupEvent >("002"); - - EventFactory::instance().registerEvent< RegisterSucceededEvent >("003"); - EventFactory::instance().registerEvent< RegisterFailedEvent >("004"); - - // TODO: 020 - EventFactory::instance().registerEvent< LoadSetupEvent >("010"); - EventFactory::instance().registerEvent< CallRelatedEvent >("020"); - EventFactory::instance().registerEvent< VolumeEvent >("021"); - EventFactory::instance().registerEvent< MicVolumeEvent >("022"); - EventFactory::instance().registerEvent< MessageTextEvent >("030"); - EventFactory::instance().registerEvent< TryingStatus >("110"); - EventFactory::instance().registerEvent< RingingStatus >("111"); - EventFactory::instance().registerEvent< HoldStatus >("112"); - EventFactory::instance().registerEvent< EstablishedStatus >("113"); - EventFactory::instance().registerEvent< BusyStatus >("114"); - EventFactory::instance().registerEvent< CongestionStatus >("115"); - EventFactory::instance().registerEvent< WrongNumberStatus >("116"); - - EventFactory::instance().registerEvent< AccountItemEvent >("130"); - EventFactory::instance().registerEvent< AccountItemEvent >("131"); - - // if TCPSessionIO::!connected! -> this::!connected! -> handleEvents (getEvents) - // if this::!getEventReady! -> this->readyToGetAccount -> startSession() -> getAccountList - // if this::!readyToGetStatus! -> getCallStatus() - // if this::!readyToShow! -> ... - QObject::connect(this, SIGNAL(disconnected()), this, SLOT(closeSession())); - QObject::connect(this, SIGNAL(connected()), this, SLOT(handleEvents())); - QObject::connect(this, SIGNAL(readyToGetAccount()), this, SLOT(startSession())); - QObject::connect(this, SIGNAL(readyToGetCallStatus()),this, SLOT(getCallStatus())); - QObject::connect(this, SIGNAL(readyToShow()), this, SLOT(slotPreShow())); -} - -PhoneLineManagerImpl::~PhoneLineManagerImpl() -{ - //delete mSession; - for(std::vector< PhoneLine * >::iterator pos = mPhoneLines.begin(); - pos != mPhoneLines.end(); - pos++) { - delete *pos; - } -} - - -void -PhoneLineManagerImpl::hasDisconnected() -{ - if(!mIsStopping) { - emit disconnected(); - } - else { - emit stopped(); - } -} - -void -PhoneLineManagerImpl::initialize(Session* session) -{ - if(!mIsInitialized) { - mIsInitialized = true; - mSession = session; - } -} - -void PhoneLineManagerImpl::isInitialized() -{ - if(!mIsInitialized) { - throw std::logic_error("Trying to use PhoneLineManager without prior initialize."); - } -} - -void -PhoneLineManagerImpl::connect() -{ - isInitialized(); - - emit globalStatusSet(QString(tr("Trying to connect to sflphone server.."))); - mSession->connect(); -} - -void -PhoneLineManagerImpl::slotRegisterToServer(const QString& account) -{ - isInitialized(); - - Request *r = mSession->registerToServer(account); - QObject::connect(r, SIGNAL(success(QString, QString)), - this, SLOT(slotRegisterSucceed(QString, QString))); - QObject::connect(r, SIGNAL(error(QString, QString)), - this, SLOT(slotRegisterFailed(QString,QString))); -} - -void -PhoneLineManagerImpl::slotRegisterSucceed(QString message, QString /* code */) -{ - emit registerReturn(false, message); -} - -void -PhoneLineManagerImpl::slotRegisterFailed(QString message, QString /* code */) -{ - // it's true, we have error - emit registerReturn(true, message); -} - -void -PhoneLineManagerImpl::slotReloadSoundDriver() -{ - Request *r = mSession->switchAudioDriver(); - QObject::connect(r, SIGNAL(success(QString, QString)), - this, SLOT(slotSoundDriverSucceed(QString, QString))); - QObject::connect(r, SIGNAL(error(QString, QString)), - this, SLOT(slotSoundDriverFailed(QString,QString))); -} - -void -PhoneLineManagerImpl::slotSoundDriverSucceed(QString message, QString /* code */) -{ - emit testSoundDriverReturn(false, message); -} - -void -PhoneLineManagerImpl::slotSoundDriverFailed(QString message, QString /* code */) -{ - // it's true, we have error - emit testSoundDriverReturn(true, message); -} - -void -PhoneLineManagerImpl::slotHasEnabledAccount(bool /* enable */) -{ - emit readyToGetCallStatus(); -} - -void -PhoneLineManagerImpl::stop() -{ - isInitialized(); - - emit globalStatusSet(QString(tr("Stopping sflphone server.."))); - mIsStopping = true; - if(mIsConnected) { - if (mShouldStopDaemon) { - mSession->stop(); - emit stopped(); - } else { - mSession->quit(); - } - } - else { - emit stopped(); - } -} - -void -PhoneLineManagerImpl::startSession() -{ - isInitialized(); - - closeSession(); - - mIsConnected = true; - emit globalStatusSet(QString(tr("Trying to get account status...."))); - mSession->getAccountList(); -} - -void -PhoneLineManagerImpl::getCallStatus() -{ - emit globalStatusSet(QString(tr("Trying to get line status..."))); - mSession->getCallStatus(); -} - -void -PhoneLineManagerImpl::slotPreShow() -{ - emit globalStatusSet(QString(tr("Welcome to SFLPhone"))); -} - -void -PhoneLineManagerImpl::handleEvents() -{ - isInitialized(); - - mSession->getEvents(); - - Request *r; - r = mSession->list("ringtones"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - &ConfigurationManager::instance(), SLOT(addRingtone(QString, QString))); - QObject::connect(r, SIGNAL(success(QString, QString)), - &ConfigurationManager::instance(), SIGNAL(ringtonesUpdated())); - -/* - r = mSession->list("audiodevice"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - &ConfigurationManager::instance(), SLOT(addAudioDevice(QString, - QString, - QString, QString))); - QObject::connect(r, SIGNAL(success(QString, QString)), - &ConfigurationManager::instance(), SIGNAL(audioDevicesUpdated())); -*/ - r = mSession->list("audiodevicein"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - &ConfigurationManager::instance(), SLOT(addAudioDeviceIn(QString, - QString, - QString, QString))); - QObject::connect(r, SIGNAL(parsedEntry(const QString& )), - &ConfigurationManager::instance(), SLOT(setRateMode(const QString& ))); - - QObject::connect(r, SIGNAL(success(QString, QString)), - &ConfigurationManager::instance(), SIGNAL(audioDevicesInUpdated())); - - r = mSession->list("audiodeviceout"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - &ConfigurationManager::instance(), SLOT(addAudioDeviceOut(QString, - QString, - QString, QString))); - QObject::connect(r, SIGNAL(success(QString, QString)), - &ConfigurationManager::instance(), SIGNAL(audioDevicesOutUpdated())); - - r = mSession->list("codecdescriptor"); - QObject::connect(r, SIGNAL(parsedEntry(QString, QString, QString, QString, QString)), - &ConfigurationManager::instance(), SLOT(addCodec(QString, QString))); - QObject::connect(r, SIGNAL(success(QString, QString)), - &ConfigurationManager::instance(), SIGNAL(codecsUpdated())); - - emit handleEventsSent(); -} - - -void -PhoneLineManagerImpl::closeSession() -{ - isInitialized(); - - mCurrentLine = NULL; - mIsConnected = false; - - unsigned int i = 0; - while(i < mPhoneLines.size()) { - mPhoneLines[i]->disconnect(); - i++; - } - - emit lineStatusSet(""); - emit bufferStatusSet(""); - emit actionSet(""); - emit globalStatusSet("Disconnected."); -} - - -PhoneLine * -PhoneLineManagerImpl::getCurrentLine() -{ - isInitialized(); - - return mCurrentLine; -} - -void -PhoneLineManagerImpl::setNbLines(unsigned int nb) -{ - isInitialized(); - - mPhoneLines.clear(); - for(unsigned int i = 0; i < nb; i++) { - PhoneLine *p = new PhoneLine(mSession, i + 1); - QObject::connect(p, SIGNAL(lineStatusChanged(QString)), - this, SIGNAL(unselectedLineStatusSet(QString))); - mPhoneLines.push_back(p); - } -} - -PhoneLine * -PhoneLineManagerImpl::getNextAvailableLine() -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - PhoneLine *current = mCurrentLine; - - - unsigned int i = 0; - while(i < mPhoneLines.size() && !selectedLine) { - if(mPhoneLines[i]->isAvailable() && - mPhoneLines[i] != current) { - selectedLine = mPhoneLines[i]; - } - else { - i++; - } - } - - return selectedLine; -} - -PhoneLine * -PhoneLineManagerImpl::getLine(const Call &call) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - - unsigned int i = 0; - while(i < mPhoneLines.size() && !selectedLine) { - if(mPhoneLines[i]->getCallId() == call.id()) { - selectedLine = mPhoneLines[i]; - } - else { - i++; - } - } - - return selectedLine; -} - -PhoneLine * -PhoneLineManagerImpl::getLine(unsigned int line) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - - if(line < mPhoneLines.size()) { - selectedLine = mPhoneLines[line]; - } - - return selectedLine; -} - -void -PhoneLineManagerImpl::select(PhoneLine *line, bool hardselect) -{ - if(line && (mCurrentLine != line)) { - unselect(); - - QObject::disconnect(line, SIGNAL(lineStatusChanged(QString)), - this, SIGNAL(unselectedLineStatusSet(QString))); - QObject::connect(line, SIGNAL(lineStatusChanged(QString)), - this, SIGNAL(lineStatusSet(QString))); - QObject::connect(line, SIGNAL(actionChanged(QString)), - this, SIGNAL(actionSet(QString))); - QObject::connect(line, SIGNAL(bufferStatusChanged(QString)), - this, SIGNAL(bufferStatusSet(QString))); - QObject::connect(line, SIGNAL(talkingStarted(QTime)), - this, SIGNAL(talkingStarted(QTime))); - QObject::connect(line, SIGNAL(talkingStopped()), - this, SIGNAL(talkingStopped())); - QObject::connect(line, SIGNAL(transfered()), - this, SLOT(unselect())); - - - mCurrentLine = line; - mCurrentLine->select(hardselect); - if(mCurrentLine->isAvailable() && !hardselect) { - mSession->playTone(); - } - if(mCurrentLine->isTalking()) { - emit talkingStarted(mCurrentLine->getTalkingTime()); - } - emit lineStatusSet(mCurrentLine->getLineStatus()); - emit bufferStatusSet(mCurrentLine->getBuffer()); - } -} - -void -PhoneLineManagerImpl::unselect() -{ - if(mCurrentLine) { - QObject::disconnect(mCurrentLine, SIGNAL(lineStatusChanged(QString)), - this, SIGNAL(lineStatusSet(QString))); - QObject::disconnect(mCurrentLine, SIGNAL(actionChanged(QString)), - this, SIGNAL(actionSet(QString))); - QObject::disconnect(mCurrentLine, SIGNAL(bufferStatusChanged(QString)), - this, SIGNAL(bufferStatusSet(QString))); - QObject::disconnect(mCurrentLine, SIGNAL(talkingStarted(QTime)), - this, SIGNAL(talkingStarted(QTime))); - QObject::disconnect(mCurrentLine, SIGNAL(talkingStopped()), - this, SIGNAL(talkingStopped())); - QObject::disconnect(mCurrentLine, SIGNAL(transfered()), - this, SLOT(unselect())); - QObject::connect(mCurrentLine, SIGNAL(lineStatusChanged(QString)), - this, SIGNAL(unselectedLineStatusSet(QString))); - if(mCurrentLine->isAvailable()) { - mSession->stopTone(); - } - mCurrentLine->unselect(); - mCurrentLine = NULL; - - emit lineStatusSet(""); - emit actionSet(""); - emit bufferStatusSet(""); - emit talkingStopped(); - } -} - -PhoneLine * -PhoneLineManagerImpl::selectNextAvailableLine() -{ - isInitialized(); - - PhoneLine *selectedLine = getNextAvailableLine(); - - // If we found one available line. - if(selectedLine) { - unselect(); - select(selectedLine); - } - - return selectedLine; -} - - - -PhoneLine * -PhoneLineManagerImpl::getPhoneLine(unsigned int line) -{ - isInitialized(); - - if(mPhoneLines.size() <= line) { - throw std::runtime_error("Trying to get an invalid Line"); - } - - return mPhoneLines[line]; -} - -PhoneLine * -PhoneLineManagerImpl::getPhoneLine(const QString &callId) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - - unsigned int i = 0; - while(i < mPhoneLines.size() && - !selectedLine) { - if(mPhoneLines[i]->getCallId() == callId) { - selectedLine = mPhoneLines[i]; - } - else { - i++; - } - } - - return selectedLine; -} - - -void -PhoneLineManagerImpl::sendKey(Qt::Key c) -{ - isInitialized(); - - PhoneLine *selectedLine = getCurrentLine(); - - // Only digits that select a line if there's - // no current line. - switch(c) { - case Qt::Key_F1: - case Qt::Key_F2: - case Qt::Key_F3: - case Qt::Key_F4: - case Qt::Key_F5: - case Qt::Key_F6: - selectLine(c - Qt::Key_F1); - break; - - case Qt::Key_Escape: - if (selectedLine) { - selectedLine->hangup(true); - } - - default: - if (!selectedLine) { - selectedLine = selectNextAvailableLine(); - } - - if(selectedLine) { - if (c == Qt::Key_Enter || c == Qt::Key_Return) { - mLastNumber = selectedLine->getBuffer(); - } - selectedLine->sendKey(c); - } - } -} - - -void -PhoneLineManagerImpl::selectLine(const QString &callId, bool hardselect) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - unsigned int line = 0; - while(!selectedLine && line < mPhoneLines.size()) { - if(mPhoneLines[line]->getCallId() == callId) { - selectedLine = mPhoneLines[line]; - } - else { - line++; - } - } - - if(selectedLine) { - selectLine(line, hardselect); - } - else { - DebugOutput::instance() << QObject::tr("PhoneLineManager: Tried to selected line with call ID (%1), " - "which appears to be invalid.\n").arg(callId); - } -} - -void -PhoneLineManagerImpl::unselectLine(unsigned int line) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - // getting the wanted line; - { - if(mPhoneLines.size() > line) { - selectedLine = mPhoneLines[line]; - } - } - - if(selectedLine == mCurrentLine) { - unselect(); - } -} - -/** - * Warning: This function might 'cause a problem if - * we select 2 line in a very short time. - */ -void -PhoneLineManagerImpl::selectLine(unsigned int line, bool hardselect) -{ - isInitialized(); - - PhoneLine *selectedLine = NULL; - // getting the wanted line; - { - if(mPhoneLines.size() > line) { - selectedLine = mPhoneLines[line]; - } - } - - if(selectedLine != NULL) { - PhoneLine *oldLine = mCurrentLine; - - if(oldLine != selectedLine) { - select(selectedLine, hardselect); - } - } - else { - DebugOutput::instance() << QObject::tr("PhoneLineManager: Tried to selected line %1, " - "which appears to be invalid.\n").arg(line); - } -} - -void -PhoneLineManagerImpl::call(const QString &to) -{ - PhoneLine *current = getCurrentLine(); - if(current) { - current->call(to); - mLastNumber = to; - } -} - - -void -PhoneLineManagerImpl::call() -{ - PhoneLine *current = getCurrentLine(); - if(current) { - mLastNumber = current->getBuffer(); - current->call(); - } -} - -void -PhoneLineManagerImpl::makeNewCall(const QString& to) -{ - selectNextAvailableLine(); - call(to); -} - - -void -PhoneLineManagerImpl::transfer() -{ - if(mCurrentLine) { - mCurrentLine->transfer(); - } -} - - - -void -PhoneLineManagerImpl::hold() -{ - PhoneLine *selectedLine = mCurrentLine; - mCurrentLine = NULL; - - if(selectedLine) { - if(selectedLine->isAvailable()) { - mSession->stopTone(); - } - selectedLine->hold(); - } -} - -void -PhoneLineManagerImpl::redial() -{ - PhoneLine *phoneLine = selectNextAvailableLine(); - if(phoneLine && !mLastNumber.isEmpty()) { - phoneLine->call(mLastNumber); - } -} - -void -PhoneLineManagerImpl::hangup(bool sendrequest) -{ - PhoneLine *selectedLine = mCurrentLine; - mCurrentLine = NULL; - - if(selectedLine) { - if(selectedLine->isAvailable()) { - mSession->stopTone(); - } - selectedLine->hangup(sendrequest); - lineStatusSet(""); - } -} - -void -PhoneLineManagerImpl::mute(bool muting) -{ - if(muting) { - mute(); - } - else { - unmute(); - } -} - -void -PhoneLineManagerImpl::mute() -{ - isInitialized(); - - mSession->mute(); -} - -void -PhoneLineManagerImpl::setup() -{ - isInitialized(); - - mSession->configGetAll(); -} - -void -PhoneLineManagerImpl::unmute() -{ - isInitialized(); - - mSession->unmute(); -} - -void -PhoneLineManagerImpl::hangup(const QString &callId, bool sendrequest) -{ - PhoneLine *selectedLine = getPhoneLine(callId); - hangup(selectedLine, sendrequest); -} - -void -PhoneLineManagerImpl::hangup(unsigned int line, bool sendrequest) -{ - PhoneLine *selectedLine = getPhoneLine(line); - hangup(selectedLine, sendrequest); -} - -void -PhoneLineManagerImpl::hangup(PhoneLine *line, bool sendrequest) -{ - if(line) { - line->hangup(sendrequest); - if(mCurrentLine == line) { - unselect(); - } - } -} - -void -PhoneLineManagerImpl::clear() -{ - PhoneLine *selectedLine = mCurrentLine; - - if(selectedLine) { - selectedLine->clear(); - } -} - -void -PhoneLineManagerImpl::incomming(const QString &accountId, - const QString &callId, - const QString &peer) -{ - Call call(mSession->id(), accountId, callId, peer, true); - PhoneLine *line = addCall(call, QObject::tr("Incomming")); - if(line) { - line->setLineStatus(QObject::tr("Ringing (%1)...").arg(peer)); - } -} - -PhoneLine * -PhoneLineManagerImpl::addCall(const QString &accountId, - const QString &callId, - const QString &peer, - const QString &state) -{ - return addCall(Call(mSession->id(), accountId, callId, peer), state); -} - -PhoneLine * -PhoneLineManagerImpl::addCall(Call call, - const QString &state) -{ - PhoneLine *selectedLine = getNextAvailableLine(); - - if(selectedLine) { - selectedLine->incomming(call); - selectedLine->setLineStatus(state); - } - else { - DebugOutput::instance() << QObject::tr("PhoneLineManager: There's no available lines" - "here for the incomming call ID: %1.\n") - .arg(call.id()); - call.notAvailable(); - } - - return selectedLine; -} - -void -PhoneLineManagerImpl::updateVolume(int volume) -{ - mVolume = volume; - emit volumeUpdated((unsigned int)volume); -} - -void -PhoneLineManagerImpl::updateMicVolume(int volume) -{ - mMicVolume = volume; - emit micVolumeUpdated((unsigned int)volume); -} - -void -PhoneLineManagerImpl::setVolume(int volume) -{ - if(mVolume != volume) { - mSession->volume(volume); - updateVolume(volume); - } -} - -void -PhoneLineManagerImpl::setMicVolume(int volume) -{ - if(mMicVolume != volume) { - mSession->micVolume(volume); - updateMicVolume(volume); - } - } - -void -PhoneLineManagerImpl::incomingMessageText(const QString& message) -{ - QMessageBox messageBox; - messageBox.setText(message); - messageBox.exec(); -} - -void -PhoneLineManagerImpl::addAccount(const QString& name, bool isEnabled, const QString& alias) -{ - if (mSession!=0) { - mSession->addAccount(name, isEnabled, alias); - } -} - diff --git a/src/gui/qt/PhoneLineManagerImpl.hpp b/src/gui/qt/PhoneLineManagerImpl.hpp deleted file mode 100644 index 2afc5f73fa..0000000000 --- a/src/gui/qt/PhoneLineManagerImpl.hpp +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __PHONELINEMANAGERIMPL_HPP__ -#define __PHONELINEMANAGERIMPL_HPP__ - -//#include <qt.h> -#include <qobject.h> -#include <qdatetime.h> -#include <utility> -#include <vector> - -class PhoneLine; - -#include "Account.hpp" -#include "Call.hpp" -#include "EventFactory.hpp" -#include "Session.hpp" - -/** - * This is the class that manages phone lines - */ -class PhoneLineManagerImpl : public QObject -{ - Q_OBJECT - -public: - PhoneLineManagerImpl(); - ~PhoneLineManagerImpl(); - - /** - * Will return the PhoneLine linked to the line - * number. - */ - PhoneLine *getPhoneLine(unsigned int line); - - /** - * Will return the PhoneLine with the call ID. - * If there's no PhoneLine of call ID, it will - * return NULL. - */ - PhoneLine *getPhoneLine(const QString &callId); - - PhoneLine *getCurrentLine(); - - void setNbLines(unsigned int line); - void shouldStopDaemon(bool shouldStop) { mShouldStopDaemon = shouldStop; } - - bool isConnected() { return mIsConnected; } - void emitReadyAccount() { emit readyToGetAccount(); } - void emitReadyToShow() { emit readyToShow(); } - void addAccount(const QString& name, bool isEnabled, const QString& alias); - -signals: - void unselected(unsigned int); - void selected(unsigned int); - void connected(); - void disconnected(); - void readyToGetAccount(); - void readyToGetCallStatus(); - void readyToShow(); - void handleEventsSent(); - void gotErrorOnGetEvents(QString); - void gotErrorOnCallStatus(QString); - void globalStatusSet(QString); - void bufferStatusSet(QString); - void actionSet(QString); - void unselectedLineStatusSet(QString); - void lineStatusSet(QString); - void talkingStarted(QTime); - void talkingStopped(); - void registerReturn(bool, QString); - void testSoundDriverReturn(bool, QString); - void stopped(); - - void volumeUpdated(int); - void micVolumeUpdated(int); - -public slots: - - void redial(); - void transfer(); - - void hasDisconnected(); - - void slotRegisterToServer(const QString&); - void slotRegisterFailed(QString, QString); - void slotRegisterSucceed(QString, QString); - void slotReloadSoundDriver(); - void slotSoundDriverFailed(QString, QString); - void slotSoundDriverSucceed(QString, QString); - void slotHasEnabledAccount(bool); - void getCallStatus(); - void slotPreShow(); - - /** - * You need to call this function once. It must be - * call before doing anything in this class. - */ - void initialize(Session* session); - - /** - * This function will make the process to start. - * It will connect to the server, and start the - * event handling. - */ - void connect(); - - void sendKey(Qt::Key c); - - /** - * This function will put the current line - * on hold. If there's no current line, - * it will do nothing. - */ - void hold(); - - /** - * This function will hanp up the current line - * If there's no current line, it will do nothing. - */ - void hangup(bool sendrequest = true); - - /** - * This function will mute the microphone if muting - * is true, it will unmute otherwise. - */ - void mute(bool); - - /** - * This function will mute the microphone - */ - void mute(); - - /** - * This function will unmute the microphone - */ - void unmute(); - - void setup(); - - /** - * This function will hanp up the line number given - * argument. Be aware that the first line is 1, not - * zero. - */ - void hangup(unsigned int line, bool sendrequest = true); - - /** - * This function will hanp up the line with the - * following call ID. If there's no line with - * the call ID, it will do nothing. - */ - void hangup(const QString &callId, bool sendrequest = true); - - /** - * This function will hanp up the given line. If the - * line is NULL, nothing will be done. - */ - void hangup(PhoneLine *line, bool sendrequest = true); - - /** - * This function will make a call on the - * current line. If there's no selected - * line, it will choose the first available. - */ - void call(const QString &to); - - /** - * This function will add an incomming call - * on a phone line. - */ - void incomming(const QString &accountId, - const QString &callId, - const QString &peer); - - /** - * This function is used to add a call on a - * phone line. - */ - PhoneLine *addCall(Call call, - const QString &state); - PhoneLine *addCall(const QString &accountId, - const QString &callId, - const QString &peer, - const QString &state); - - /** - * This function will make a call on the - * current line. If there's no selected - * line. It will do nothing. It will call - * the destination contained in the - * PhoneLine buffer, if any. - */ - void call(); - - /** - * This function make select a new line and make a call - */ - void makeNewCall(const QString& to); - - /** - * This function will switch the lines. If the line - * is invalid, it just do nothing. - */ - void selectLine(unsigned int line, - bool hardselect = false); - - /** - * This function will switch the lines. If the line - * is invalid, it just do nothing. - */ - void unselectLine(unsigned int line); - - /** - * This function will switch the line to the line having - * the given call id. If the line is invalid, it just do - * nothing. - */ - void selectLine(const QString &callId, - bool hardselect = false); - - /** - * This function will clear the buffer of the active - * line. If there's no active line, it will do nothing. - */ - void clear(); - - /** - * This function will return the next available line. - * The line is locked, So you'll need to unlock it. - */ - PhoneLine *getNextAvailableLine(); - - /** - * This function will return the PhoneLine with the - * given id. If there's no such line, it will return - * NULL. The line is locked, So you'll need to unlock it. - */ - PhoneLine *getLine(unsigned int line); - - /** - * This function will return the PhoneLine with the - * given call id. If there's no such line, it will - * return NULL. The line is locked, So you'll need to - * unlock it. - */ - PhoneLine *getLine(const Call &call); - - /** - * This function will return the next available line. - * The line is NOT locked. - */ - PhoneLine *selectNextAvailableLine(); - - /** - * This function will send the getevents request - * to the server. - * - * NOTE: This function MUST be called AFTER getcallstatus's - * completion. - */ - void handleEvents(); - - /** - * This function will simply signal the volume change. - */ - void updateVolume(int volume); - - /** - * This function will send a request to sflphoned - * to change the volume to the given percentage. - */ - void setVolume(int volume); - - /** - * This function will simply signal the mic volume change. - */ - void updateMicVolume(int volume); - - /** - * This function will send a request to sflphoned - * to change the mic volume to the given percentage. - */ - void setMicVolume(int volume); - - /** - * This function will simply signal a incoming text message - */ - void incomingMessageText(const QString &message); - - void errorOnGetEvents(const QString &message) - {emit gotErrorOnGetEvents(message);} - - void errorOnCallStatus(const QString &message) - {emit gotErrorOnCallStatus(message);} - - void stop(); - - void finishStop() - {emit stopped();} - - void unselect(); - - private slots: - /** - * This will send all the command needed when a - * connection has just been established. - */ - void startSession(); - - /** - * This function is called when we are disconnected - * from the server. This will unselect all phone lines. - */ - void closeSession(); - - -private: - /** - * Check if the PhoneLineManager is initialized - * or return an std::logic_error exception - */ - void isInitialized(); - void select(PhoneLine *line, bool hardselect = false); - -private: - Session *mSession; - - std::vector< PhoneLine * > mPhoneLines; - PhoneLine *mCurrentLine; - bool mIsInitialized; - - int mVolume; - int mMicVolume; - - bool mIsConnected; - bool mIsStopping; - bool mShouldStopDaemon; - - QString mLastNumber; -}; - - -#endif diff --git a/src/gui/qt/QjListBoxPixmap.cpp b/src/gui/qt/QjListBoxPixmap.cpp deleted file mode 100644 index ab57fd5e9b..0000000000 --- a/src/gui/qt/QjListBoxPixmap.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - Copyright(C)2004 Johan Thelin - johan.thelin -at- digitalfanatics.org - - Visit: http://www.digitalfanatics.org/e8johan/projects/jseries/index.html - - This file is part of the JSeries. - - JSeries is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - JSeries is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with JSeries; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <qpainter.h> -#include <qstyle.h> - -#include "QjListBoxPixmap.hpp" - -QjListBoxPixmap::QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox ) : QListBoxItem( listbox ) -{ - m_location = location; - m_pixmap = pixmap; - setText( text ); -} - -QjListBoxPixmap::QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox, QListBoxItem *after ) : QListBoxItem( listbox, after ) -{ - m_location = location; - m_pixmap = pixmap; - setText( text ); -} - -QjListBoxPixmap::PixmapLocation QjListBoxPixmap::location() const -{ - return m_location; -} - -const QPixmap *QjListBoxPixmap::pixmap() const -{ - return &m_pixmap; -} - -void QjListBoxPixmap::setPixmap( const QPixmap &pixmap ) -{ - m_pixmap = pixmap; - listBox()->repaint(); -} - -int QjListBoxPixmap::height( const QListBox *lb ) const -{ - switch( m_location ) - { - case Above: - case Under: - - return 6 + m_pixmap.height() + lb->fontMetrics().height(); - - case Left: - case Right: - - if( m_pixmap.height() > lb->fontMetrics().height() ) - return 4 + m_pixmap.height(); - else - return 4 + lb->fontMetrics().height(); - - default: - return 0; - } -} - -int QjListBoxPixmap::width( const QListBox *lb ) const -{ - int tw; - - switch( m_location ) - { - case Above: - case Under: - - tw = lb->fontMetrics().width( text() ); - - if( tw > m_pixmap.width() ) - return 4 + tw; - else - return 4 + m_pixmap.width(); - - case Left: - case Right: - - return 6 + m_pixmap.width() + lb->fontMetrics().width( text() ); - - default: - return 0; - } -} - -void QjListBoxPixmap::setLocation( PixmapLocation location ) -{ - if( m_location == location ) - return; - - m_location = location; - listBox()->repaint(); -} - -void QjListBoxPixmap::paint( QPainter *p ) -{ - if( !( listBox() && listBox()->viewport() == p->device() ) ) - return; - - QRect r( 0, 0, listBox()->width(), height( listBox() ) ); - - if( isSelected() ) - p->eraseRect( r ); - - int tw = listBox()->fontMetrics().width( text() ); - int th = listBox()->fontMetrics().height(); - int pw = m_pixmap.width(); - int ph = m_pixmap.height(); - int xo = (listBox()->width() - width( listBox() ))/2; - int tyo = listBox()->fontMetrics().ascent(); - - switch( m_location ) - { - case Above: - p->drawText( (listBox()->width()-tw)/2, ph+4+tyo, text() ); - p->drawPixmap( (listBox()->width()-pw)/2, 2, m_pixmap ); - - break; - case Under: - p->drawText( (listBox()->width()-tw)/2, 2+tyo, text() ); - p->drawPixmap( (listBox()->width()-pw)/2, 4+th, m_pixmap ); - - break; - case Left: - p->drawText( xo+2+pw, (height( listBox() )-th)/2+tyo, text() ); - p->drawPixmap( xo, (height( listBox() )-ph)/2, m_pixmap ); - - break; - case Right: - p->drawText( xo, (height( listBox() )-th)/2+tyo, text() ); - p->drawPixmap( xo+2+tw, (height( listBox() )-ph)/2, m_pixmap ); - - break; - } - - if( isCurrent() ) - listBox()->style().drawPrimitive( QStyle::PE_FocusRect, p, r, listBox()->colorGroup() ); -} diff --git a/src/gui/qt/QjListBoxPixmap.hpp b/src/gui/qt/QjListBoxPixmap.hpp deleted file mode 100644 index d8839e30f4..0000000000 --- a/src/gui/qt/QjListBoxPixmap.hpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright(C)2004 Johan Thelin - johan.thelin -at- digitalfanatics.org - - Visit: http://www.digitalfanatics.org/e8johan/projects/jseries/index.html - - This file is part of the JSeries. - - JSeries is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - JSeries is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with JSeries; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef QjLISTBOXPIXMAP_H -#define QjLISTBOXPIXMAP_H - -#include <qlistbox.h> -#include <qstring.h> -#include <qpixmap.h> - -/** \brief The JPixmapItem is a listbox item showing a pixmap and a text. The location of the pixmap in relation to the text can be altered. - * - * \image html jpmi.png - * The location of the pixmap in relation to the text can be altered using the location and setLocation members. - */ -class QjListBoxPixmap : public QListBoxItem -{ -public: - /** Specifies the location of the pixmap in relation to the text. */ - enum PixmapLocation - { Above, /**< The pixmap is above the text. */ - Under, /**< The pixmap is under the text. */ - Left, /**< The pixmap is to the left of the text. */ - Right /**< The pixmap is to the right of the text. */ - }; - - /** Creates a JPixmapItem. */ - QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox=0 ); - /** Creates a JPixmapItem at a certain position in the listbox. */ - QjListBoxPixmap( PixmapLocation location, const QPixmap &pixmap, const QString &text, QListBox *listbox, QListBoxItem *after ); - - /** Returns the pixmap location in relation to the text. */ - PixmapLocation location() const; - /** Sets the pixmap location in relation to the text. This does not generate a re-paint of the listbox. */ - void setLocation( PixmapLocation ); - - /** Returns the pixmap. */ - const QPixmap *pixmap() const; - /** Sets the pixmap. This does not generate a re-paint of the listbox. */ - void setPixmap( const QPixmap &pixmap ); - - int height( const QListBox *lb ) const; - int width( const QListBox *lb ) const; - -protected: - void paint( QPainter *p ); - -private: - QPixmap m_pixmap; - PixmapLocation m_location; -}; - -#endif // QjLISTBOXPIXMAP_H diff --git a/src/gui/qt/Request.cpp b/src/gui/qt/Request.cpp deleted file mode 100644 index 6371174d52..0000000000 --- a/src/gui/qt/Request.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qobject.h> -#include <qstringlist.h> -#include <qurl.h> - -#include "globals.h" -#include "DebugOutput.hpp" -#include "CallManager.hpp" -#include "Request.hpp" -#include "Requester.hpp" -#include "Url.hpp" - -Request::Request(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : mSequenceId(sequenceId) - , mCommand(command) - , mArgs(args) -{} - -std::list< QString > -Request::parseArgs(const QString &message) -{ - QStringList list(QStringList::split(" ", message)); - std::list< QString > args; - for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) { - QString qs(*it); - Url::decode(qs); - args.push_back(qs); - } - - return args; -} - -void -Request::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("Received an error: " - "Code/SeqID: %1/%2\t" - "Message: %3\n") - .arg(code) - .arg(mSequenceId) - .arg(message); - QString messageDecoded = message; - Url::decode(messageDecoded); - - emit error(messageDecoded, code); -} - -void -Request::onEntry(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("Received a temp info: " - "Code/SeqID: %1/%2\t" - "Message: %3\n") - .arg(code) - .arg(mSequenceId) - .arg(message); - - emit entry(message, code); - - // This is bad code, I know. I need to find a better way. - std::list< QString > args = parseArgs(message); - QString arg1, arg2, arg3, arg4, arg5; - if(args.size() >= 1) { - arg1 = *args.begin(); - args.pop_front(); - } - if(args.size() >= 1) { - arg2 = *args.begin(); - args.pop_front(); - } else { // if we have only one argument, we send a signal with one parameter - emit parsedEntry(arg1); - return; - } - if(args.size() >= 1) { - arg3 = *args.begin(); - args.pop_front(); - } - if(args.size() >= 1) { - arg4 = *args.begin(); - args.pop_front(); - } - if(args.size() >= 1) { - arg5 = *args.begin(); - args.pop_front(); - } - emit parsedEntry(arg1, arg2, arg3, arg4, arg5); -} - -void -Request::onSuccess(const QString &code, const QString &message) -{ -// DebugOutput::instance() << QObject::tr("Received a success info: " -// "Code/SeqID: %1/%2\t" -// "Message: %3\n") -// .arg(code) -// .arg(mSequenceId) -// .arg(message); - QString messageDecoded = message; - Url::decode(messageDecoded); - - emit success(messageDecoded, code); -} - -QString -Request::toString() -{ - QString output = mCommand + " " + mSequenceId; - for(std::list< QString >::const_iterator pos = mArgs.begin(); - pos != mArgs.end(); - pos++) { - QString ostring(*pos); - QUrl::encode(ostring); - output += " " + ostring; - } - output += "\n"; - - return output; -} - - -CallRelatedRequest::CallRelatedRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{ - if(args.begin() != args.end()) { - mCallId = *args.begin(); - } -} - -void -CallRelatedRequest::onError(const QString &code, const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - onError(CallManager::instance().getCall(mCallId), - code, - message); - } - else { - DebugOutput::instance() << QObject::tr("CallRelatedRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - -void -CallRelatedRequest::onError(Call, const QString &, const QString &) -{} - -void -CallRelatedRequest::onEntry(const QString &code, const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - onEntry(CallManager::instance().getCall(mCallId), - code, - message); - } - else { - DebugOutput::instance() << QObject::tr("CallRelatedRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - -void -CallRelatedRequest::onEntry(Call, const QString &, const QString &) -{} - -void -CallRelatedRequest::onSuccess(const QString &code, const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - onSuccess(CallManager::instance().getCall(mCallId), - code, - message); - } - else { - DebugOutput::instance() << QObject::tr("CallRelatedRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - -void -CallRelatedRequest::onSuccess(Call, const QString &, const QString &) -{} - -AccountRequest::AccountRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) - , mAccountId(*args.begin()) -{} - -void -AccountRequest::onError(const QString &code, const QString &message) -{ - onError(Account(Requester::instance().getSessionIdFromSequenceId(getSequenceId()), - mAccountId), - code, - message); -} - -void -AccountRequest::onError(Account, const QString &, const QString &) -{} - -void -AccountRequest::onEntry(const QString &code, const QString &message) -{ - onEntry(Account(Requester::instance().getSessionIdFromSequenceId(getSequenceId()), - mAccountId), - code, - message); -} - -void -AccountRequest::onEntry(Account, const QString &, const QString &) -{} - -void -AccountRequest::onSuccess(const QString &code, const QString &message) -{ - onSuccess(Account(Requester::instance().getSessionIdFromSequenceId(getSequenceId()), - mAccountId), - code, - message); -} - -void -AccountRequest::onSuccess(Account, const QString &, const QString &) -{} - diff --git a/src/gui/qt/Request.hpp b/src/gui/qt/Request.hpp deleted file mode 100644 index baa442c1ca..0000000000 --- a/src/gui/qt/Request.hpp +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_REQUEST_H -#define SFLPHONEGUI_REQUEST_H - -#include <list> -#include <qobject.h> -#include <qstring.h> - - -#include "Account.hpp" -#include "Call.hpp" - -class Request : public QObject -{ - Q_OBJECT - -signals: - /** - * Be aware that the first string is the message, - * and the second is the code. This is done that - * way because usually the message is more important - * than the code. - */ - void error(QString, QString); - void success(QString, QString); - void entry(QString, QString); - void parsedEntry(const QString& ); - void parsedEntry(QString, QString, QString, QString, QString); - -public: - Request(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - virtual ~Request(){} - - /** - * This function will parse the message and will cut the message - * in many arguments. - */ - static std::list< QString > parseArgs(const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(const QString &code, const QString &message); - - /** - * This function will translate the function into a string. - * This is used for sending the request through a text channel. - */ - QString toString(); - - /** - * Return the sequence ID. - */ - QString getSequenceId() - {return mSequenceId;} - - /** - * Return the command. - */ - QString getCommand() - {return mCommand;} - - /** - * Return the args. - */ - std::list< QString > getArgs() - {return mArgs;} - - - private: - const QString mSequenceId; - const QString mCommand; - const std::list< QString > mArgs; -}; - -class CallRelatedRequest : public Request -{ - public: - CallRelatedRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(Call call, - const QString &code, - const QString &message); - - private: - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. This function will call the onError, but with - * the call linked to this request. - */ - virtual void onError(const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the there's other answer to - * come. This function will call the onEntry, but with - * the call linked to this request. - */ - virtual void onEntry(const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. This function will call the onSuccess function, - * but with the call linked to this request. - */ - virtual void onSuccess(const QString &code, - const QString &message); - - - private: - QString mCallId; -}; - -class AccountRequest : public Request -{ - public: - AccountRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(Account account, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(Account account, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(Account account, - const QString &code, - const QString &message); - - private: - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. This function will call the onError, but with - * the account linked to this request. - */ - virtual void onError(const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the there's other answer to - * come. This function will call the onEntry, but with - * the account linked to this request. - */ - virtual void onEntry(const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. This function will call the onSuccess function, - * but with the account linked to this request. - */ - virtual void onSuccess(const QString &code, - const QString &message); - - - private: - const QString mAccountId; -}; - -#endif diff --git a/src/gui/qt/Requester.hpp b/src/gui/qt/Requester.hpp deleted file mode 100644 index 2d6e4b20cd..0000000000 --- a/src/gui/qt/Requester.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_REQUESTER_H -#define SFLPHONEGUI_REQUESTER_H - -#include "utilspp/Singleton.hpp" -#include "RequesterImpl.hpp" - -typedef utilspp::SingletonHolder< RequesterImpl > Requester; - -#endif - diff --git a/src/gui/qt/RequesterImpl.cpp b/src/gui/qt/RequesterImpl.cpp deleted file mode 100644 index 4220539902..0000000000 --- a/src/gui/qt/RequesterImpl.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qtextstream.h> -#include <iostream> -#include <stdexcept> -#include <sstream> - -#include "globals.h" -#include "DebugOutput.hpp" -#include "RequesterImpl.hpp" -#include "SessionIO.hpp" - -RequesterImpl::RequesterImpl() - : mCallIdCount(0) - , mSessionIdCount(0) - , mSequenceIdCount(0) -{} - -SessionIO * -RequesterImpl::getSessionIO(const QString &sessionId) -{ - std::map< QString, SessionIO * >::iterator pos = mSessions.find(sessionId); - if(pos == mSessions.end()) { - throw std::runtime_error("The session is not valid."); - } - - return (*pos).second; -} - -Request * -RequesterImpl::send(const QString &sessionId, - const QString &command, - const std::list< QString > &args) -{ - // We retreive the internal of a session. - SessionIO *session = getSessionIO(sessionId); - - // We ask the factory to create the request. - QString sequenceId = generateSequenceId(); - Request *request = mRequestFactory.create(command, sequenceId, args); - - registerRequest(sessionId, sequenceId, request); - session->send(request->toString()); - - return request; -} - -void -RequesterImpl::registerRequest(const QString &sessionId, - const QString &sequenceId, - Request *request) -{ - if(mRequests.find(sequenceId) != mRequests.end()) { - throw std::logic_error("Registering an already know sequence ID"); - } - - mRequests.insert(std::make_pair(sequenceId, request)); - mSequenceToSession.insert(std::make_pair(sequenceId, sessionId)); -} - -Request * -RequesterImpl::getRequest(const QString &sequenceId) -{ - Request *r = NULL; - - std::map< QString, Request * >::iterator pos = mRequests.find(sequenceId); - if(pos == mRequests.end()) { - r = pos->second; - } - - return r; -} - -void -RequesterImpl::registerSession(const QString &id, - SessionIO *s) -{ - if(mSessions.find(id) != mSessions.end()) { - throw std::logic_error("Registering an already know Session ID"); - } - - mSessions.insert(std::make_pair(id, s)); -} - -void -RequesterImpl::connect(const QString &id) -{ - std::map< QString, SessionIO * >::iterator pos = mSessions.find(id); - if(pos == mSessions.end()) { - throw std::logic_error("Trying to connect an unknown session."); - } - - pos->second->connect(); -} - - -int -RequesterImpl::getCodeCategory(const QString &code) -{ - return code.toInt() / 100; -} - -void -RequesterImpl::receiveAnswer(const QString &answer) -{ - QString a(answer); - QString code; - QString seq; - QString message; - - QTextStream s(&a, IO_ReadOnly); - s >> code >> seq; - message = s.readLine(); - message.remove(0, 1); - receiveAnswer(code, seq, message); -} - - -void -RequesterImpl::receiveAnswer(const QString &code, - const QString &sequence, - const QString &message) -{ - int c = getCodeCategory(code); - - std::map< QString, Request * >::iterator pos; - pos = mRequests.find(sequence); - if(pos == mRequests.end()) { - DebugOutput::instance() << QObject::tr("Requester: We received an answer " - "with an unknown sequence (%1).\n") - .arg(sequence); - return; - } - - if(c <= 1) { - //Other answers will come for this request. - pos->second->onEntry(code, message); - } - else{ - //This is the final answer of this request. - if(c == 2) { - pos->second->onSuccess(code, message); - } - else { - pos->second->onError(code, message); - } - delete pos->second; - mRequests.erase(pos); - } -} - -QString -RequesterImpl::generateCallId() -{ - return QString("cCallID:%1").arg(mCallIdCount++); -} - -QString -RequesterImpl::generateSessionId() -{ - return QString("cSessionID:%1").arg(mSequenceIdCount++); -} - -QString -RequesterImpl::generateSequenceId() -{ - return QString("cSequenceID:%1").arg(mSequenceIdCount++); -} - -void -RequesterImpl::inputIsDown(const QString &sessionId) -{ - std::map< QString, SessionIO * >::iterator pos; - pos = mSessions.find(sessionId); - if(pos == mSessions.end()) { - // we will not thow an exception, but this is - // a logic error - DebugOutput::instance() << QObject::tr("Requester: SessionIO input for session %1 is down, " - "but we don't have that session.\n") - .arg(sessionId); - } -} diff --git a/src/gui/qt/RequesterImpl.hpp b/src/gui/qt/RequesterImpl.hpp deleted file mode 100644 index ec3a2f0231..0000000000 --- a/src/gui/qt/RequesterImpl.hpp +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_REQUESTERIMPL_H -#define SFLPHONEGUI_REQUESTERIMPL_H - -#include <list> - -#include "Request.hpp" -#include "ObjectFactory.hpp" - -class Call; -class SessionIO; - -class RequesterImpl -{ - public: - RequesterImpl(); - - /** - * Will send the command to the sflphone's server. - * This command is non-blocking. The command linked - * to this command will be executed. - */ - Request *send(const QString &sessionId, - const QString &command, - const std::list< QString > &args); - - void receiveAnswer(const QString &answer); - void receiveAnswer(const QString &code, - const QString &sequence, - const QString &message); - - - static int getCodeCategory(const QString &code); - - /** - * Generate a unique call ID. - */ - QString generateCallId(); - - /** - * Generate a unique session ID. - */ - QString generateSessionId(); - - /** - * Generate a unique sequence ID. - */ - QString generateSequenceId(); - - /** - * Register the string to return a Actual type. - */ - template< typename Actual > - void registerObject(const QString &name); - - /** - * Register the default request to be created if - * the command isn't registered. - */ - template< typename Actual > - void registerDefaultObject(); - - - QString getSessionIdFromSequenceId(const QString &sequence) - {return mSequenceToSession[sequence];} - - /** - * Register the session. - */ - void registerSession(const QString &id, SessionIO *io); - - /** - * Will ask the session IO with id to connect. - */ - void connect(const QString &id); - - /** - * This function is used to notify that the SessionIO - * input of a session is down. It means that we no longer - * can receive answers. - * - * Note: Only SessionIO related classes should call this function. - */ - void inputIsDown(const QString &sessionId); - - /** - * This function is used to notify that the SessionIO - * output of a session is down. It means that we no longer - * can send requests. - * - * Note: Only SessionIO related classes should call this function. - */ - void outputIsDown(const QString &sessionId); - - private: - - /** - * Return the SessionIO instance related to - * the session ID. - */ - SessionIO *getSessionIO(const QString &sessionId); - - /** - * Register the string to return a Actual type. - */ - void registerRequest(const QString &sessionId, - const QString &sequenceId, - Request *request); - - Request *getRequest(const QString &sessionId); - - - private: - ObjectFactory< Request > mRequestFactory; - std::map< QString, SessionIO * > mSessions; - std::map< QString, Request * > mRequests; - std::map< QString, QString > mSequenceToSession; - - - /** - * This is the integer used to generate the call IDs. - */ - unsigned long mCallIdCount; - unsigned long mSessionIdCount; - unsigned long mSequenceIdCount; -}; - -#include "RequesterImpl.inl" - -#endif diff --git a/src/gui/qt/RequesterImpl.inl b/src/gui/qt/RequesterImpl.inl deleted file mode 100644 index ed09e3a187..0000000000 --- a/src/gui/qt/RequesterImpl.inl +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef SFLPHONEGUI_REQUESTERIMPL_INL -#define SFLPHONEGUI_REQUESTERIMPL_INL - -template< typename Actual > -void -RequesterImpl::registerObject(const QString &name) -{ - mRequestFactory.registerObject< Actual >(name); -} - -template< typename Actual > -void -RequesterImpl::registerDefaultObject() -{ - mRequestFactory.registerDefaultObject< Actual >(); -} - - -#endif diff --git a/src/gui/qt/SFLCallStatus.hpp b/src/gui/qt/SFLCallStatus.hpp deleted file mode 100644 index e322da49f9..0000000000 --- a/src/gui/qt/SFLCallStatus.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SFLCALLSTATUS_HPP__ -#define __SFLCALLSTATUS_HPP__ - -#include "CallStatus.hpp" - - -typedef CallStatus TryingStatus; -typedef CallStatus RingingStatus; -typedef CallStatus HoldStatus; -typedef CallStatus EstablishedStatus; -typedef CallStatus BusyStatus; -typedef CallStatus CongestionStatus; -typedef CallStatus WrongNumberStatus; - -#endif diff --git a/src/gui/qt/SFLEvents.cpp b/src/gui/qt/SFLEvents.cpp deleted file mode 100644 index 52304fc699..0000000000 --- a/src/gui/qt/SFLEvents.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" - -#include "PhoneLineManager.hpp" -#include "SFLEvents.hpp" - -DefaultEvent::DefaultEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{ -} - -void -DefaultEvent::execute() -{ - DebugOutput::instance() << QObject::tr("DefaultEvent: We don't handle: %1\n").arg(toString()); -} - -void GetEventEvent::execute() -{ - PhoneLineManager::instance().emitReadyAccount(); -} - -HangupEvent::HangupEvent(const QString &code, - const std::list< QString > &args) - : CallRelatedEvent(code, args) -{} - -void -HangupEvent::execute() -{ - QString id = getCallId(); - if(id.length() > 0) { - DebugOutput::instance() << QObject::tr("Hangup Event received for call ID: %1.\n") - .arg(id); - PhoneLineManager::instance().hangup(id, false); - } - else { - DebugOutput::instance() << QObject::tr("Hangup Event invalid (missing call ID): %1\n") - .arg(toString()); - } -} - -RegisterSucceededEvent::RegisterSucceededEvent(const QString &code, const std::list< QString > &args) - : Event(code, args) -{} - -void -RegisterSucceededEvent::execute() -{ - DebugOutput::instance() << QObject::tr("Register succedded\n"); -} - -RegisterFailedEvent::RegisterFailedEvent(const QString &code, const std::list< QString > &args) - : Event(code, args) -{} - -void -RegisterFailedEvent::execute() -{ - DebugOutput::instance() << QObject::tr("Register failed\n"); -} - -IncommingEvent::IncommingEvent(const QString &code, - const std::list< QString > &args) - : CallRelatedEvent(code, args) -{ - std::list< QString > l = getUnusedArgs(); - if(l.size() >= 2) { - mAccountId = *l.begin(); - l.pop_front(); - mOrigin = *l.begin(); - l.pop_front(); - setUnusedArgs(l); - } -} - -void -IncommingEvent::execute() -{ - QString id = getCallId(); - if(id.length() > 0) { - DebugOutput::instance() << QObject::tr("Incomming Event received for call ID: %1.\n") - .arg(id); - PhoneLineManager::instance().incomming(mAccountId, getCallId(), mOrigin); - } - else { - DebugOutput::instance() << QObject::tr("Incomming Event invalid: %1\n") - .arg(toString()); - } -} - -VolumeEvent::VolumeEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{ - std::list< QString > l = getUnusedArgs(); - if(l.size() >= 1) { - mVolume = l.begin()->toUInt(); - l.pop_front(); - setUnusedArgs(l); - } -} - -void -VolumeEvent::execute() -{ - PhoneLineManager::instance().updateVolume(mVolume); -} - -MicVolumeEvent::MicVolumeEvent(const QString &code, - const std::list< QString > &args) - : VolumeEvent(code, args) -{} - -void -MicVolumeEvent::execute() -{ - PhoneLineManager::instance().updateMicVolume(mVolume); -} - -MessageTextEvent::MessageTextEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{ - std::list< QString > l = getUnusedArgs(); - if(l.size() >= 1) { - mMessage = *l.begin(); - l.pop_front(); - setUnusedArgs(l); - } -} - -void -MessageTextEvent::execute() -{ - PhoneLineManager::instance().incomingMessageText(mMessage); -} - -LoadSetupEvent::LoadSetupEvent(const QString &code, - const std::list< QString > &args) - : Event(code, args) -{} - -void -LoadSetupEvent::execute() -{ - PhoneLineManager::instance().setup(); -} diff --git a/src/gui/qt/SFLEvents.hpp b/src/gui/qt/SFLEvents.hpp deleted file mode 100644 index 1b2ec2d617..0000000000 --- a/src/gui/qt/SFLEvents.hpp +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SFLEVENTS_HPP__ -#define __SFLEVENTS_HPP__ - -#include <list> -#include "Event.hpp" - -class DefaultEvent : public Event -{ -public: - DefaultEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); -}; - -class GetEventEvent : public Event -{ -public: - GetEventEvent(const QString &code, - const std::list< QString > &args) : Event(code, args) {} - - virtual void execute(); -}; - -class HangupEvent : public CallRelatedEvent -{ -public: - HangupEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); -}; - -class RegisterSucceededEvent : public Event -{ -public: - RegisterSucceededEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); -}; - -class RegisterFailedEvent : public Event -{ -public: - RegisterFailedEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); -}; - -class IncommingEvent : public CallRelatedEvent -{ -public: - IncommingEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); - -private: - QString mAccountId; - QString mOrigin; -}; - - -class VolumeEvent : public Event -{ -public: - VolumeEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); - -protected: - unsigned int mVolume; -}; - -class MicVolumeEvent : public VolumeEvent -{ -public: - MicVolumeEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); - -}; - -class MessageTextEvent : public Event -{ -public: - MessageTextEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); - -protected: - QString mMessage; -}; - -class LoadSetupEvent : public Event -{ -public: - LoadSetupEvent(const QString &code, - const std::list< QString > &args); - - virtual void execute(); -}; - -#endif diff --git a/src/gui/qt/SFLLcd.cpp b/src/gui/qt/SFLLcd.cpp deleted file mode 100644 index 8aec04b319..0000000000 --- a/src/gui/qt/SFLLcd.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qdatetime.h> -#include <qpainter.h> -#include <qevent.h> -#include <qdragobject.h> - -#include "globals.h" -#include "JPushButton.hpp" -#include "SFLLcd.hpp" -#include "TransparentWidget.hpp" -// should send a signal... not include this -#include "PhoneLineManager.hpp" - -#include "DebugOutput.hpp" // to remove after testing - - -#define FONT_FAMILY "Courier" -// Others fixed font support "Monospace", "Fixed", "MiscFixed" -#define FONT_SIZE 10 - - -SFLLcd::SFLLcd(QWidget *parent) - : QLabel(parent, "screen", Qt::WNoAutoErase) - , mOverscreen(parent, "overscreen") - , mGlobalStatusPos(-1) - , mUnselectedLineStatusPos(-1) - , mLineStatusPos(-1) - , mBufferStatusPos(-1) - , mActionPos(-1) - , mIsTimed(false) - , mFont(FONT_FAMILY, FONT_SIZE) -{ - setPaletteBackgroundColor(QColor("gray")); - mOverscreen.setPaletteBackgroundColor(QColor("gray")); - mOverscreen.show(); - mOverscreen.setText("test"); - mUnselectedLineTimer = new QTimer(this); - QObject::connect(mUnselectedLineTimer, SIGNAL(timeout()), - this, SLOT(updateGlobalText())); - - mTimer = new QTimer(this); - QObject::connect(mTimer, SIGNAL(timeout()), - this, SLOT(updateText())); - QObject::connect(mTimer, SIGNAL(timeout()), - this, SLOT(update())); - mTimer->start(100); - - setAcceptDrops(TRUE); -} - -void -SFLLcd::updateText() -{ - if(mGlobalStatusPos >= 0) { - mGlobalStatusPos++; - } - - if(mLineStatusPos >= 0) { - mLineStatusPos++; - } - - if(mBufferStatusPos >= 0) { - mBufferStatusPos++; - } - - if(mActionPos >= 0) { - mActionPos++; - } -} - -void -SFLLcd::updateGlobalText() -{ - mUnselectedLineStatus = ""; -} - -void -SFLLcd::setLineTimer(QTime time) -{ - mIsTimed = true; - mTime = time; -} - -void -SFLLcd::clearLineTimer() -{ - mIsTimed = false; -} - -void -SFLLcd::setGlobalStatus(QString global) -{ - if(textIsTooBig(global)) { - mGlobalStatusPos = 0; - } - else { - mGlobalStatusPos = -1; - } - mGlobalStatus = global; -} - -void -SFLLcd::setBufferStatus(QString buffer) -{ - if(textIsTooBig(buffer)) { - mBufferStatusPos = 0; - } - else { - mBufferStatusPos = -1; - } - mBufferStatus = buffer; -} - -void -SFLLcd::setLineStatus(QString line) -{ - if(textIsTooBig(line)) { - mLineStatusPos = 0; - } - else { - mLineStatusPos = -1; - } - mLineStatus = line; -} - -void -SFLLcd::setUnselectedLineStatus(QString line) -{ - if(textIsTooBig(line)) { - mUnselectedLineStatusPos = 0; - } - else { - mUnselectedLineStatusPos = -1; - } - mUnselectedLineStatus = line; - mUnselectedLineTimer->start(3000, true); -} - -void -SFLLcd::setAction(QString line) -{ - if(textIsTooBig(line)) { - mActionPos = 0; - } - else { - mActionPos = -1; - } - mAction = line; -} - -QString -SFLLcd::getTimeStatus() -{ - if(mIsTimed) { - int seconds = mTime.elapsed() / 1000 ; - return QTime(seconds / 60 / 60, seconds / 60, seconds % 60).toString("hh:mm:ss"); - } - else { - QTime t(QTime::currentTime()); - QString s; - if(t.second() % 2) { - s = t.toString("hh:mm"); - } - else { - s = t.toString("hh mm"); - } - - return s; - } -} - -void -SFLLcd::paintEvent(QPaintEvent *event) -{ - static QPixmap pixmap(size()); - pixmap.resize(size()); - QRect rect = event->rect(); - QSize newSize = rect.size().expandedTo(pixmap.size()); - pixmap.resize(newSize); - pixmap.fill(this, rect.topLeft()); - QPainter p(&pixmap, this); - - // Painter settings - QFontMetrics fm(mFont); - - int *globalStatusPos; - QString globalStatus; - if(mUnselectedLineStatus.length() > 0) { - globalStatus = mUnselectedLineStatus; - globalStatusPos = &mUnselectedLineStatusPos; - } - else { - globalStatus = mGlobalStatus; - globalStatusPos = &mGlobalStatusPos; - } - - int margin = 2; - p.setFont(mFont); - QPoint pointtest(margin, fm.height()); - - p.drawText(QPoint(margin, fm.height()), - extractVisibleText(globalStatus, *globalStatusPos)); - p.drawText(QPoint(margin, 2*fm.height()), - extractVisibleText(mLineStatus, mLineStatusPos)); - p.drawText(QPoint(margin, 3*fm.height()), - extractVisibleText(mAction, mActionPos)); - p.drawText(QPoint(margin, 4*fm.height()), - extractVisibleText(mBufferStatus, mBufferStatusPos)); - - p.drawText(QPoint(margin, pixmap.size().height() - margin), getTimeStatus()); - const QPixmap *pix = mOverscreen.paletteBackgroundPixmap(); - if(pix != NULL && !pix->isNull()) { - p.drawPixmap(0,0, *pix); - } - p.end(); - - bitBlt(this, QPoint(0,0), &pixmap); -} - -bool -SFLLcd::textIsTooBig(const QString &text) -{ - QFontMetrics fm(mFont); - - int screenWidth = width() - 4; - int textWidth = fm.boundingRect(text).width(); - - if(textWidth > screenWidth) { - return true; - } - else { - return false; - } -} - -QString -SFLLcd::extractVisibleText(const QString &text, int &pos) -{ - QFontMetrics fm(mFont); - QString tmp(text); - - int nbCharBetween = 8; - - if(pos > 0 && ((unsigned int)pos >= tmp.length() + nbCharBetween)) { - pos = 0; - } - - // Chop the text until it's not too big - if(textIsTooBig(tmp)) { - // We add automatiquely the space the the text again at - // the end. - tmp += QString().fill(QChar(' '), nbCharBetween); - tmp += text; - - if(pos == -1) { - pos = 0; - } - - tmp.remove(0, pos); - while(textIsTooBig(tmp)) { - tmp.remove(tmp.length() - 1, 1); - } - } - - return tmp; -} - -/** - * Drag and drop handler : accept text drag - */ -void -SFLLcd::dragEnterEvent(QDragEnterEvent* event) -{ - event->accept( - QTextDrag::canDecode(event) - ); -} - -/** - * Drag and drop handler : make a call with text - */ -void -SFLLcd::dropEvent(QDropEvent* event) -{ - QString text; - - if ( QTextDrag::decode(event, text) && !text.isEmpty() ) { - PhoneLineManager::instance().makeNewCall(text); - } -} - -void -SFLLcd::mousePressEvent( QMouseEvent *e) -{ - if (e && e->button() == Qt::MidButton) { - emit midClicked(); - } - // pass the event to the widget - QWidget::mousePressEvent( e ); -} diff --git a/src/gui/qt/SFLLcd.hpp b/src/gui/qt/SFLLcd.hpp deleted file mode 100644 index 00772c5291..0000000000 --- a/src/gui/qt/SFLLcd.hpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SFLLCD_HPP__ -#define __SFLLCD_HPP__ - -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qdatetime.h> -#include <qtimer.h> - -class SFLLcd : public QLabel -{ - Q_OBJECT - -public: - SFLLcd(QWidget *parent = NULL); - - bool textIsTooBig(const QString &text); - -protected: - virtual void mousePressEvent( QMouseEvent * ); - -signals: - void midClicked(); - -public slots: - virtual void paintEvent(QPaintEvent *event); - QString getTimeStatus(); - - void setGlobalStatus(QString global); - void setUnselectedLineStatus(QString line); - void setLineStatus(QString line); - void setAction(QString line); - void setBufferStatus(QString line); - void setLineTimer(QTime time); - void clearLineTimer(); - - void updateText(); - void updateGlobalText(); - QString extractVisibleText(const QString &text, int &pos); - -private: - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - - QLabel mOverscreen; - - QString mGlobalStatus; - QString mUnselectedLineStatus; - QString mLineStatus; - QString mBufferStatus; - QString mAction; - int mGlobalStatusPos; - int mUnselectedLineStatusPos; - int mLineStatusPos; - int mBufferStatusPos; - int mActionPos; - - bool mIsTimed; - QTime mTime; - QTimer *mTimer; - QTimer *mUnselectedLineTimer; - - QFont mFont; -}; - -#endif diff --git a/src/gui/qt/SFLPhoneApp.cpp b/src/gui/qt/SFLPhoneApp.cpp deleted file mode 100644 index 567d31331d..0000000000 --- a/src/gui/qt/SFLPhoneApp.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" - -#include "taxidermy/Hunter.hpp" - -#include "ConfigurationManager.hpp" -#include "Launcher.hpp" -#include "NumericKeypad.hpp" -#include "PhoneLine.hpp" -#include "PhoneLineButton.hpp" -#include "Requester.hpp" -#include "Session.hpp" -#include "SessionIOFactory.hpp" -#include "SFLLcd.hpp" -#include "SFLPhoneApp.hpp" -#include "SFLPhoneWindow.hpp" -#include "SFLRequest.hpp" -#include "SkinManager.hpp" -#include "TCPSessionIOCreator.hpp" -#include "VolumeControl.hpp" -#include <qclipboard.h> // paste - -SFLPhoneApp::SFLPhoneApp(int argc, char **argv) - : QApplication(argc, argv) - , mLauncher(new Launcher()) -{ - SessionIOFactory::instance().setCreator(new TCPSessionIOCreator(QString("localhost"), 3999)); - - mSession = new Session(); - connect(mSession, SIGNAL(firstSessionIOConnectionFailed()), this, SLOT(launch())); - - ConfigurationManager::instance().setSession(mSession); - - PhoneLineManager::instance().initialize(mSession); - PhoneLineManager::instance().setNbLines(NB_PHONELINES); - PhoneLineManager::instance().shouldStopDaemon(false); - - Requester::instance().registerDefaultObject< Request >(); - Requester::instance().registerObject< Request >(QString("playtone")); - Requester::instance().registerObject< Request >(QString("stoptone")); - Requester::instance().registerObject< Request >(QString("playdtmf")); - - Requester::instance().registerObject< Request >(QString("register")); - Requester::instance().registerObject< Request >(QString("switch")); - Requester::instance().registerObject< ConfigGetAllRequest >(QString("configgetall")); - Requester::instance().registerObject< ConfigSaveRequest >(QString("configsave")); - Requester::instance().registerObject< StopRequest >(QString("stop")); - - - Requester::instance().registerObject< EventRequest >(QString("getevents")); - Requester::instance().registerObject< CallStatusRequest >(QString("getcallstatus")); - Requester::instance().registerObject< AccountStatusRequest >(QString("getaccount")); - Requester::instance().registerObject< PermanentRequest >(QString("answer")); - Requester::instance().registerObject< PermanentRequest >(QString("notavailable")); - Requester::instance().registerObject< PermanentRequest >(QString("refuse")); - Requester::instance().registerObject< PermanentRequest >(QString("hangup")); - Requester::instance().registerObject< TemporaryRequest >(QString("unmute")); - Requester::instance().registerObject< TemporaryRequest >(QString("hold")); - Requester::instance().registerObject< TemporaryRequest >(QString("unhold")); - Requester::instance().registerObject< TemporaryRequest >(QString("senddtmf")); - Requester::instance().registerObject< Request >(QString("setspkrvolume")); - Requester::instance().registerObject< Request >(QString("setmicvolume")); - Requester::instance().registerObject< Request >(QString("mute")); -} - -SFLPhoneApp::~SFLPhoneApp() -{ - delete mSession; mSession = 0; -} - -void -SFLPhoneApp::handleArg() -{ - if (argc() > 1) { - PhoneLineManager::instance().makeNewCall(QString(argv()[1])); - } -} - -void -SFLPhoneApp::launch() -{ - if(mLauncher) { - PhoneLineManager::instance().shouldStopDaemon(true); - mLauncher->start(); - } -} - -void -SFLPhoneApp::initConnections(SFLPhoneWindow *w) -{ - // We connect the phone line buttons to the PhoneLineManager - unsigned int i = 0; - for(std::list< PhoneLineButton * >::iterator pos = w->mPhoneLineButtons.begin(); - pos != w->mPhoneLineButtons.end(); - pos++) { - PhoneLine *line = PhoneLineManager::instance().getPhoneLine(i); - QObject::connect(*pos, SIGNAL(selected(unsigned int)), - &PhoneLineManager::instance(), SLOT(selectLine(unsigned int))); - QObject::connect(*pos, SIGNAL(unselected(unsigned int)), - &PhoneLineManager::instance(), SLOT(unselectLine(unsigned int))); - QObject::connect(line, SIGNAL(selected(bool)), - *pos, SLOT(setOn(bool))); - QObject::connect(line, SIGNAL(backgrounded()), - *pos, SLOT(suspend())); - QObject::connect(line, SIGNAL(transfered()), - *pos, SLOT(stopFlashing())); - QObject::connect(line, SIGNAL(hanguped()), - *pos, SLOT(stopFlashing())); - QObject::connect(line, SIGNAL(peerUpdated(QString)), - *pos, SLOT(setToolTip(QString))); - QObject::connect(line, SIGNAL(peerCleared()), - *pos, SLOT(clearToolTip())); - - i++; - } - - - QObject::connect(w, SIGNAL(needRegister(const QString&)), - &PhoneLineManager::instance(), SLOT(slotRegisterToServer(const QString&))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(registerReturn(bool, QString)), - w, SIGNAL(registerReturn(bool, QString))); - - QObject::connect(w, SIGNAL(soundDriverChanged()), - &PhoneLineManager::instance(), SLOT(slotReloadSoundDriver())); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(testSoundDriverReturn(bool, QString)), - w, SIGNAL(testSoundDriverReturn(bool, QString))); - - - //QObject::connect(&PhoneLineManager::instance(), SIGNAL(registered()), - // w, SIGNAL(registered())); - QObject::connect(w->mOk, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(call())); - QObject::connect(w->mMute, SIGNAL(toggled(bool)), - &PhoneLineManager::instance(), SLOT(mute(bool))); - QObject::connect(w->mSetup, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(setup())); - QObject::connect(w->mHangup, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(hangup())); - QObject::connect(w->mHold, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(hold())); - QObject::connect(w->mClear, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(clear())); - QObject::connect(w->mTransfer, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(transfer())); - QObject::connect(w->mRedial, SIGNAL(clicked()), - &PhoneLineManager::instance(), SLOT(redial())); - - QObject::connect(w, SIGNAL(keyPressed(Qt::Key)), - &PhoneLineManager::instance(), SLOT(sendKey(Qt::Key))); - - QObject::connect(w, SIGNAL(shortcutPressed(QKeyEvent*)), - this, SLOT(shortcutPressed(QKeyEvent*))); - - - // Keypad connections - QObject::connect(w->mKeypad, SIGNAL(keyPressed(Qt::Key)), - &PhoneLineManager::instance(), SLOT(sendKey(Qt::Key))); - - // LCD Connections. - QObject::connect(&PhoneLineManager::instance(), SIGNAL(lineStatusSet(QString)), - w->mLcd, SLOT(setLineStatus(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(unselectedLineStatusSet(QString)), - w->mLcd, SLOT(setUnselectedLineStatus(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(actionSet(QString)), - w->mLcd, SLOT(setAction(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(globalStatusSet(QString)), - w->mLcd, SLOT(setGlobalStatus(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(bufferStatusSet(QString)), - w->mLcd, SLOT(setBufferStatus(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(talkingStarted(QTime)), - w->mLcd, SLOT(setLineTimer(QTime))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(talkingStopped()), - w->mLcd, SLOT(clearLineTimer())); - - - //Volume connections - QObject::connect(w->mVolume, SIGNAL(valueUpdated(int)), - &PhoneLineManager::instance(), SLOT(setVolume(int))); - QObject::connect(w->mMicVolume, SIGNAL(valueUpdated(int)), - &PhoneLineManager::instance(), SLOT(setMicVolume(int))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(volumeUpdated(int)), - w->mVolume, SLOT(setValue(int))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(micVolumeUpdated(int)), - w->mMicVolume, SLOT(setValue(int))); - - - //Line events connections - QObject::connect(&PhoneLineManager::instance(), SIGNAL(disconnected()), - w, SLOT(askReconnect())); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(disconnected()), - w, SLOT(show())); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(readyToShow()), w, SLOT(show())); - QObject::connect(w, SIGNAL(reconnectAsked()), - &PhoneLineManager::instance(), SLOT(connect())); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(stopped()), w, SLOT(close())); - QObject::connect(w, SIGNAL(needToCloseDaemon()), - &PhoneLineManager::instance(), SLOT(stop())); - - //sflphoned launch - QObject::connect(w, SIGNAL(launchAsked()), - mLauncher, SLOT(start())); - QObject::connect(mLauncher, SIGNAL(error()), - w, SLOT(askLaunch())); - QObject::connect(mLauncher, SIGNAL(started()), - &PhoneLineManager::instance(), SLOT(connect())); - - QObject::connect(&PhoneLineManager::instance(), SIGNAL(gotErrorOnCallStatus(QString)), - w, SLOT(askResendStatus(QString))); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(gotErrorOnGetEvents(QString)), - w, SLOT(askResendStatus(QString))); - QObject::connect(w, SIGNAL(resendStatusAsked()), - &PhoneLineManager::instance(), SLOT(getCallStatus())); - - - //Configuration events. - QObject::connect(&ConfigurationManager::instance(), SIGNAL(updated()), - w, SLOT(showSetup())); - QObject::connect(&ConfigurationManager::instance(), SIGNAL(ringtonesUpdated()), - w, SIGNAL(ringtonesUpdated())); - QObject::connect(&ConfigurationManager::instance(), SIGNAL(audioDevicesUpdated()), - w, SIGNAL(audioDevicesUpdated())); - QObject::connect(&ConfigurationManager::instance(), SIGNAL(audioDevicesInUpdated()), - w, SIGNAL(audioDevicesInUpdated())); - QObject::connect(&ConfigurationManager::instance(), SIGNAL(audioDevicesOutUpdated()), - w, SIGNAL(audioDevicesOutUpdated())); - QObject::connect(&ConfigurationManager::instance(), SIGNAL(codecsUpdated()), - w, SIGNAL(codecsUpdated())); - //QObject::connect(&ConfigurationManager::instance(), SIGNAL(saved()), - // w, SLOT(hideSetup())); - - QObject::connect(w->mLcd, SIGNAL(midClicked()), this, SLOT(paste())); - -} - -void -SFLPhoneApp::loadSkin() -{ - SkinManager::instance().setApplication(this); - SkinManager::instance().load(); -} - -void -SFLPhoneApp::paste() -{ -// Seen on: http://doc.trolltech.com/3.3/showimg-example.html#x1078 -#ifndef QT_NO_MIMECLIPBOARD - QString text = QApplication::clipboard()->text(); - if ( !text.isEmpty() && !text.isNull() ) { - DebugOutput::instance() << QObject::tr("paste %1\n").arg(text); - PhoneLineManager::instance().makeNewCall(text); - } -#endif -} - -void -SFLPhoneApp::shortcutPressed(QKeyEvent* e) { - if (e && e->state() & Qt::ControlButton) { - switch(e->key()) { - case Qt::Key_V: - paste(); - break; - } - } -} diff --git a/src/gui/qt/SFLPhoneApp.hpp b/src/gui/qt/SFLPhoneApp.hpp deleted file mode 100644 index f2382f1b7a..0000000000 --- a/src/gui/qt/SFLPhoneApp.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SFLPHONEAPP_HPP__ -#define __SFLPHONEAPP_HPP__ - -#include <qapplication.h> -#include <qsettings.h> -#include <qevent.h> - -#include "PhoneLineManager.hpp" -#include "Session.hpp" -#include "Account.hpp" - -class SFLPhoneWindow; -class Launcher; -class NumericKeypad; -class Session; - -class SFLPhoneApp : public QApplication -{ - Q_OBJECT - -public: - SFLPhoneApp(int argc, char **argv); - virtual ~SFLPhoneApp(); - - /** - * This function will make the widgets - * connections. - */ - void initConnections(SFLPhoneWindow *w); - void loadSkin(); - - -public slots: - /** - * Handle argc/argv if any left - */ - void handleArg(); - void paste(); - void shortcutPressed(QKeyEvent* e); - -private slots: - void launch(); - -signals: - void registerFailed(const QString); - void registerSucceed(const QString); - -private: - - Launcher *mLauncher; - Session *mSession; -}; - -#endif diff --git a/src/gui/qt/SFLPhoneWindow.cpp b/src/gui/qt/SFLPhoneWindow.cpp deleted file mode 100644 index 34c141e673..0000000000 --- a/src/gui/qt/SFLPhoneWindow.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "SFLPhoneWindow.hpp" - -#include <qbitmap.h> - -//To test if we are in QT4 -#ifdef QT3_SUPPORT -#include <QIcon> -#endif - - -#include <qlabel.h> -#include <qmessagebox.h> -#include <qevent.h> -#include <qpixmap.h> -#include <iostream> - -#include "globals.h" -#include "JPushButton.hpp" -#include "PhoneLineButton.hpp" -#include "SFLLcd.hpp" -#include "VolumeControl.hpp" -#include "NumericKeypad.hpp" - -#define LOGO_IMAGE "logo_ico.png" -#define BACKGROUND_IMAGE "main.png" -#define VOLUME_IMAGE "volume.png" - - -SFLPhoneWindow::SFLPhoneWindow() -#ifdef QT3_SUPPORT - : QMainWindow(NULL, Qt::FramelessWindowHint) -#else - : QMainWindow(NULL, NULL, - Qt::WDestructiveClose | - Qt::WStyle_Customize | - Qt::WStyle_NoBorder) -#endif -{ - mLastWindowPos = pos(); - mSetupPanel = new ConfigurationPanel(this, "ConfigurationPanel"); - mKeypad = new NumericKeypad(NULL, false); - mKeypad->setWindowReference(this); - - - connect(this, SIGNAL(ringtonesUpdated()), mSetupPanel, SLOT(updateRingtones())); - connect(this, SIGNAL(audioDevicesUpdated()), mSetupPanel, SLOT(updateAudioDevices())); - connect(this, SIGNAL(audioDevicesInUpdated()), mSetupPanel, SLOT(updateAudioDevicesIn())); - connect(this, SIGNAL(audioDevicesOutUpdated()),mSetupPanel, SLOT(updateAudioDevicesOut())); - connect(this, SIGNAL(codecsUpdated()), mSetupPanel, SLOT(updateCodecs())); - - connect(mSetupPanel, SIGNAL(needRegister(const QString&)), this, SIGNAL(needRegister(const QString&))); - connect(this, SIGNAL(registerReturn(bool, QString)), mSetupPanel, SLOT(slotRegisterReturn(bool, QString))); - - // when we receive a signal from mSetupPanel, we should resend one to... - connect(mSetupPanel, SIGNAL(soundDriverChanged()), this, SIGNAL(soundDriverChanged())); - - // we are an intermediate... - connect(this, SIGNAL(testSoundDriverReturn(bool, QString)), mSetupPanel, SLOT(slotSoundDriverReturn(bool, QString))); - - // Initialize the background image - setName("main"); - - mPaintTimer = new QTimer(this); - connect(mPaintTimer, SIGNAL(timeout()), - this, SLOT(delayedPaint())); - mPaintTimer->start(50); - - - - QPixmap logo(QPixmap::fromMimeSource(LOGO_IMAGE)); -#ifdef QIcon - setWindowIcon(QIcon(logo)); -#else - setIcon(logo); -#endif - - mLastPos = pos(); - - initGUIButtons(); - initWindowButtons(); - initLineButtons(); - initLCD(); -} - -SFLPhoneWindow::~SFLPhoneWindow() -{} - -void -SFLPhoneWindow::initLCD() -{ - mLcd = new SFLLcd(this); - mLcd->show(); -} - -void -SFLPhoneWindow::initGUIButtons() -{ - mHangup = new QPushButton(QObject::tr("Hangup"), this, "hangup"); - mHold = new QPushButton(QObject::tr("Hold"), this, "hold"); - mOk = new QPushButton(QObject::tr("Ok"), this, "ok"); - mClear = new QPushButton(QObject::tr("Clear"), this, "clear"); - mMute = new QPushButton(QObject::tr("Mute"), this, "mute"); - mMute->setToggleButton(true); - mDtmf = new QPushButton(QObject::tr("DTMF"), this, "dtmf"); - mDtmf->setToggleButton(true); - connect(mKeypad, SIGNAL(isShown(bool)), mDtmf, SLOT(setOn(bool))); - connect(mDtmf, SIGNAL(toggled(bool)), this, SLOT(toggleDtmf(bool))); - - mSetup = new QPushButton(QObject::tr("Setup"), this, "setup"); - mTransfer = new QPushButton(QObject::tr("Transfer"), this, "transfer"); - mRedial = new QPushButton(QObject::tr("Redial"), this, "redial"); - mVolume = new VolumeControl(QString(VOLUME_IMAGE), - this); - mVolume->setOrientation(VolumeControl::Vertical); - mVolume->move(365,91); - QObject::connect(mVolume, SIGNAL(valueUpdated(int)), - this, SIGNAL(volumeUpdated(int))); - - mMicVolume = new VolumeControl(QString(VOLUME_IMAGE), - this); - mMicVolume->setOrientation(VolumeControl::Vertical); - mMicVolume->move(347,91); - QObject::connect(mVolume, SIGNAL(valueUpdated(int)), - this, SIGNAL(micVolumeUpdated(int))); - -} - -void -SFLPhoneWindow::initLineButtons() -{ - for(int i = 0; i < NB_PHONELINES; i++) { - PhoneLineButton *line = new PhoneLineButton(i, this); - mPhoneLineButtons.push_back(line); - } -} - -void SFLPhoneWindow::initWindowButtons() -{ - mCloseButton = new QPushButton(QObject::tr("Close"), this, "close"); - QObject::connect(mCloseButton, SIGNAL(clicked()), - this, SLOT(finish())); - mMinimizeButton = new QPushButton(QObject::tr("Minimize"), this, "minimize"); - QObject::connect(mMinimizeButton, SIGNAL(clicked()), - this, SLOT(showMinimized())); -} - -void -SFLPhoneWindow::keyPressEvent(QKeyEvent *e) { - // Misc. key - int key = e->key(); - if (e->state() & Qt::ControlButton || key == Qt::Key_Control) { - emit shortcutPressed(e); - } else if (key != Qt::Key_Shift && - key != Qt::Key_Meta && - key != Qt::Key_Alt /* && - key != Qt::Key_Mode_switch // this is not in gentoo (same qt version) - */ - ) { - emit keyPressed(Qt::Key(key)); - } -} - -void -SFLPhoneWindow::finish() -{ - emit needToCloseDaemon(); -} - -void -SFLPhoneWindow::askReconnect() -{ - QMessageBox::critical(NULL, - tr("SFLPhone error"), - tr("We got an error launching sflphone. Check the debug \n" - "output with \"[sflphoned]\" for more details. The \n" - "application will close."), - tr("Quit")); - close(); -} - -void -SFLPhoneWindow::askLaunch() -{ - QMessageBox::critical(NULL, - tr("SFLPhone daemon problem"), - tr("The SFLPhone daemon couldn't be started. Check \n" - "if sflphoned is in your PATH. The application will \n" - "close.\n"), - tr("Quit")); - close(); -} - - -void -SFLPhoneWindow::showSetup() -{ - mSetupPanel->generate(); - mSetupPanel->show(); -} - -void -SFLPhoneWindow::hideSetup() -{ - mSetupPanel->hide(); -} - -void -SFLPhoneWindow::askResendStatus(QString message) -{ - int ret = QMessageBox::critical(NULL, - tr("SFLPhone status error"), - tr("The server returned an error for the lines status.\n" - "\n%1\n\n" - "Do you want to try to resend this command? If not,\n" - "the application will close.").arg(message), - QMessageBox::Retry | QMessageBox::Default, - QMessageBox::No | QMessageBox::Escape); - if (ret == QMessageBox::Retry) { - emit resendStatusAsked(); - } - else { - close(); - } -} - -void -SFLPhoneWindow::mousePressEvent(QMouseEvent *e) -{ - mLastPos = e->pos(); // this is relative to the widget -} - -void -SFLPhoneWindow::mouseMoveEvent(QMouseEvent *e) -{ - // Note that moving the windows is very slow - // 'cause it redraw the screen each time. - // Usually it doesn't. We could do it by a timer. - delayedMove(e->globalPos() - mLastPos); -} - -void -SFLPhoneWindow::delayedMove(const QPoint &point) -{ - mLastWindowPos = point; -} - -void -SFLPhoneWindow::delayedPaint() -{ - if(pos() != mLastWindowPos) { - if (mLastWindowPos.x() < 0) { mLastWindowPos.setX(0); } - QPoint diff = mLastWindowPos - pos(); - move(mLastWindowPos); - if (mKeypad && mKeypad->isDock()) { - // Use (mKeypad->pos() - diff) for a cool effects - mKeypad->move(mKeypad->pos() + diff); - } - } -} - -void -SFLPhoneWindow::toggleDtmf(bool toggle) -{ - if (mKeypad) { - if (toggle) { - mKeypad->setDefaultPosition(QPoint(pos().x()+width(), pos().y())); - } - mKeypad->setShown(toggle); - } -} diff --git a/src/gui/qt/SFLPhoneWindow.hpp b/src/gui/qt/SFLPhoneWindow.hpp deleted file mode 100644 index ce32bf5984..0000000000 --- a/src/gui/qt/SFLPhoneWindow.hpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qlabel.h> -#include <qmainwindow.h> -#include <qobject.h> -#include <qpoint.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <list> - -#include "ConfigurationPanel.h" -#include "PhoneLineManager.hpp" - -class JPushButton; -class PhoneLineButton; -class SFLLcd; -class VolumeControl; -class NumericKeypad; - -class SFLPhoneWindow : public QMainWindow -{ - Q_OBJECT; - - friend class SFLPhoneApp; - -public: - SFLPhoneWindow(); - ~SFLPhoneWindow(); - -private: - void initLCD(); - void initGUIButtons(); - void initLineButtons(); - void initWindowButtons(); - -signals: - void keyPressed(Qt::Key); - void shortcutPressed(QKeyEvent *e); - void launchAsked(); - void reconnectAsked(); - void resendStatusAsked(); - void volumeUpdated(int); - void micVolumeUpdated(int); - void needToCloseDaemon(); - void ringtonesUpdated(); - void audioDevicesUpdated(); - void audioDevicesInUpdated(); - void audioDevicesOutUpdated(); - void codecsUpdated(); - - void needRegister(const QString&); - void registerReturn(bool, QString); - - void soundDriverChanged(); - void testSoundDriverReturn(bool, QString); - -public slots: - void delayedMove(const QPoint &point); - void delayedPaint(); - - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); - - /** - * This function will prompt a message box, to ask - * if the user want to reconnect to sflphoned. - */ - void askReconnect(); - - /** - * This function will prompt a message box, to ask - * if the user want to launch sflphoned. - */ - void askLaunch(); - - /** - * This function will ask if you want to close - * sflphoned. - */ - void finish(); - - /** - * This function will prompt a message box, to ask - * if the user want to resend the getcallstatus request. - */ - void askResendStatus(QString); - - void showSetup(); - void hideSetup(); - - /** - * toggle the dtmf window - */ - void toggleDtmf(bool); - -protected: - void keyPressEvent(QKeyEvent *e); - -private: - std::list< PhoneLineButton * > mPhoneLineButtons; - - QPushButton *mCloseButton; - QPushButton *mMinimizeButton; - - QPushButton *mHangup; - QPushButton *mHold; - QPushButton *mOk; - QPushButton *mClear; - QPushButton *mMute; - QPushButton *mDtmf; - QPushButton *mSetup; - QPushButton *mTransfer; - QPushButton *mRedial; - - VolumeControl *mVolume; - VolumeControl *mMicVolume; - - SFLLcd *mLcd; - QLabel *mMain; - - QPoint mLastPos; - QPoint mLastWindowPos; - QTimer *mPaintTimer; - - NumericKeypad *mKeypad; - ConfigurationPanel *mSetupPanel; -}; diff --git a/src/gui/qt/SFLRequest.cpp b/src/gui/qt/SFLRequest.cpp deleted file mode 100644 index 0f84dd17fa..0000000000 --- a/src/gui/qt/SFLRequest.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <iostream> -#include <memory> // for std::auto_ptr -#include <sstream> -#include <string> -#include <qstring.h> - -#include "globals.h" -#include "CallManager.hpp" -#include "CallStatus.hpp" -#include "CallStatusFactory.hpp" -#include "EventAccount.hpp" -#include "ConfigurationManager.hpp" -#include "PhoneLine.hpp" -#include "PhoneLineLocker.hpp" -#include "PhoneLineManager.hpp" -#include "SFLRequest.hpp" -#include "EventAccount.hpp" - -EventRequest::EventRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - - -void -EventRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("EventRequest error: (%1) %1\n") - .arg(code) - .arg(message); - PhoneLineManager::instance().errorOnGetEvents(message); -} - -void -EventRequest::onEntry(const QString &code, const QString &message) -{ - std::auto_ptr< Event > - e(EventFactory::instance().create(code, Request::parseArgs(message))); - e->execute(); -} - -void -EventRequest::onSuccess(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("EventRequest success: (%1) %1\n") - .arg(code) - .arg(message); - PhoneLineManager::instance().connect(); -} - -CallStatusRequest::CallStatusRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - -void -CallStatusRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("CallStatusRequest error: (%1) %1\n") - .arg(code) - .arg(message); - PhoneLineManager::instance().errorOnCallStatus(message); -} - -void -CallStatusRequest::onEntry(const QString &code, const QString &message) -{ - std::auto_ptr< Event > - e(EventFactory::instance().create(code, Request::parseArgs(message))); - e->execute(); -} - -void -CallStatusRequest::onSuccess(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("CallStatusRequest success: (%1) %1\n") - .arg(code) - .arg(message); - if(code == "206") { - std::list< QString > args = Request::parseArgs(message); - if(args.size() >= 2) { - PhoneLineManager::instance().selectLine(*args.begin(), true); - } - else { - DebugOutput::instance() << QObject::tr("CallStatusRequest Error: cannot get current line.\n"); - } - } - PhoneLineManager::instance().emitReadyToShow(); -} - -AccountStatusRequest::AccountStatusRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - -void -AccountStatusRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("AccountStatusRequest error: (%1) %1\n") - .arg(code) - .arg(message); - PhoneLineManager::instance().slotHasEnabledAccount(false); -} - -void -AccountStatusRequest::onEntry(const QString &code, const QString &message) -{ - DebugOutput::instance() << "AccountStatusRequest: " << code << " : " << message << "\n"; - std::auto_ptr< Event > - e(EventFactory::instance().create(code, Request::parseArgs(message))); - e->execute(); -} - -void -AccountStatusRequest::onSuccess(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("AccountStatusRequest success: (%1) %1\n").arg(code).arg(message); - PhoneLineManager::instance().slotHasEnabledAccount(true); -} - - -PermanentRequest::PermanentRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : CallRelatedRequest(sequenceId, command, args) -{} - -void -PermanentRequest::onError(Call call, - const QString &, - const QString &message) -{ - DebugOutput::instance() << QObject::tr("PermanentRequest: Error: %1").arg(toString()); - PhoneLine *line = PhoneLineManager::instance().getLine(call); - if(line) { - PhoneLineLocker guard(line, false); - line->error(message); - line->setAction(""); - } - else { - DebugOutput::instance() << - QObject::tr("We received an error on a call " - "that doesn't have a phone line (%1).\n") - .arg(call.id()); - } -} - -void -PermanentRequest::onEntry(Call call, - const QString &, - const QString &message) -{ - PhoneLine *line = PhoneLineManager::instance().getLine(call); - if(line) { - PhoneLineLocker guard(line, false); - line->setLineStatus(message); - line->setAction(""); - } - else { - DebugOutput::instance() << - QObject::tr("We received a status on a call related request " - "that doesn't have a phone line (%1).\n") - .arg(call.id()); - } -} - -void -PermanentRequest::onSuccess(Call call, - const QString &, - const QString &message) -{ - PhoneLine *line = PhoneLineManager::instance().getLine(call); - if(line) { - PhoneLineLocker guard(line, false); - line->setLineStatus(message); - line->setAction(""); - } - else { - DebugOutput::instance() << - QObject::tr("We received a success on a call related request " - "that doesn't have a phone line (%1).\n") - .arg(call.id()); - } -} - -TemporaryRequest::TemporaryRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : CallRelatedRequest(sequenceId, command, args) -{} - -void -TemporaryRequest::onError(Call call, - const QString &code, - const QString &message) -{ - onSuccess(call, code, message); -} - -void -TemporaryRequest::onEntry(Call call, - const QString &code, - const QString &message) -{ - onSuccess(call, code, message); -} - -void -TemporaryRequest::onSuccess(Call call, - const QString &, - const QString &message) -{ - PhoneLine *line = PhoneLineManager::instance().getLine(call); - if(line) { - PhoneLineLocker guard(line, false); - line->setTempAction(message); - } - else { - DebugOutput::instance() << - QObject::tr("We received an answer on a temporary call " - "related request that doesn't have a phone " - "line (%1).\n") - .arg(call.id()); - } -} - -CallRequest::CallRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : AccountRequest(sequenceId, command, args) -{ - - std::list< QString >::const_iterator pos = args.begin(); - pos++; - mCallId = *pos; -} - -void -CallRequest::onError(Account, - const QString &, - const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - PhoneLine *line = - PhoneLineManager::instance().getLine(CallManager::instance().getCall(mCallId)); - if(line) { - PhoneLineLocker guard(line, false); - line->error(message); - } - else { - DebugOutput::instance() << - QObject::tr("We received an error on a call " - "that doesn't have a phone line (%1).\n") - .arg(mCallId); - } - } - else { - DebugOutput::instance() << QObject::tr("CallRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - -void -CallRequest::onEntry(Account, - const QString &, - const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - PhoneLine *line = - PhoneLineManager::instance().getLine(CallManager::instance().getCall(mCallId)); - if(line) { - PhoneLineLocker guard(line, false); - line->setLineStatus(message); - } - else { - DebugOutput::instance() << - QObject::tr("We received a status on a call related request " - "that doesn't have a phone line (%1).\n") - .arg(mCallId); - } - } - else { - DebugOutput::instance() << QObject::tr("CallRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - -void -CallRequest::onSuccess(Account, - const QString &, - const QString &message) -{ - if(CallManager::instance().exist(mCallId)) { - PhoneLine *line = - PhoneLineManager::instance().getLine(CallManager::instance().getCall(mCallId)); - if(line) { - PhoneLineLocker guard(line, false); - line->setLineStatus(message); - } - else { - DebugOutput::instance() << - QObject::tr("We received a success on a call related request " - "that doesn't have a phone line (%1).\n") - .arg(mCallId); - } - } - else { - DebugOutput::instance() << QObject::tr("CallRequest: Trying to retreive an unregistred call (%1)\n").arg(mCallId); - } -} - - - -ConfigGetAllRequest::ConfigGetAllRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - - -void -ConfigGetAllRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("ConfigGetAllRequest error: (%1) %1\n") - .arg(code) - .arg(message); -} - -void -ConfigGetAllRequest::onEntry(const QString &, const QString &message) -{ - std::list< QString > args = Request::parseArgs(message); - if(args.size() >= 3) { - QString section, variable, type, def, val; - section = *args.begin(); - args.pop_front(); - variable = *args.begin(); - args.pop_front(); - type = *args.begin(); - args.pop_front(); - if(args.size() >= 1) { - val = *args.begin(); - args.pop_front(); - } - if(args.size() >= 1) { - def = *args.begin(); - args.pop_front(); - } - ConfigurationManager::instance().add(ConfigEntry(section, variable, type, def, val)); - } -} - -void -ConfigGetAllRequest::onSuccess(const QString &, const QString &) -{ - ConfigurationManager::instance().complete(); -} - - -ConfigSaveRequest::ConfigSaveRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - - -void -ConfigSaveRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("ConfigSaveRequest error: (%1) %1\n") - .arg(code) - .arg(message); -} - -void -ConfigSaveRequest::onSuccess(const QString &, const QString &) -{ - ConfigurationManager::instance().finishSave(); -} - -StopRequest::StopRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - - -void -StopRequest::onError(const QString &code, const QString &message) -{ - DebugOutput::instance() << QObject::tr("StopRequest error: (%1) %1\n") - .arg(code) - .arg(message); -} - -void -StopRequest::onSuccess(const QString &, const QString &) -{ - PhoneLineManager::instance().finishStop(); -} - -SignalizedRequest::SignalizedRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args) - : Request(sequenceId, command, args) -{} - -void -SignalizedRequest::onError(const QString &code, - const QString &message) -{ - emit error(message, code); -} - -void -SignalizedRequest::onEntry(const QString &code, - const QString &message) -{ - emit entry(message, code); -} - -void -SignalizedRequest::onSuccess(const QString &code, - const QString &message) -{ - emit success(message, code); -} - diff --git a/src/gui/qt/SFLRequest.hpp b/src/gui/qt/SFLRequest.hpp deleted file mode 100644 index 56b367c998..0000000000 --- a/src/gui/qt/SFLRequest.hpp +++ /dev/null @@ -1,313 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - - - -#ifndef SFLPHONEGUI_SFLREQUEST_HPP -#define SFLPHONEGUI_SFLREQUEST_HPP - -#include <list> -#include "Request.hpp" - -class EventRequest : public Request -{ -public: - EventRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~EventRequest(){} - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. When we have an error on an EventRequest, we should - * quit the program. - */ - virtual void onError(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - * This will be dispatched to the valid event. - */ - virtual void onEntry(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. The event handling is gone, so we should - * quit. - */ - virtual void onSuccess(const QString &code, const QString &message); - -}; - -class AccountStatusRequest : public Request -{ -public: - AccountStatusRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~AccountStatusRequest(){} - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. When we have an error on an EventRequest, we should - * quit the program. - */ - virtual void onError(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - * This will be dispatched to the valid event. - */ - virtual void onEntry(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. The event handling is gone, so we should - * quit. - */ - virtual void onSuccess(const QString &code, const QString &message); -}; - -class CallStatusRequest : public Request -{ -public: - CallStatusRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~CallStatusRequest(){} - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. When we have an error on an EventRequest, we should - * quit the program. - */ - virtual void onError(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - * This will be dispatched to the valid event. - */ - virtual void onEntry(const QString &code, const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. The event handling is gone, so we should - * quit. - */ - virtual void onSuccess(const QString &code, const QString &message); - -}; - - -class CallRequest : public AccountRequest -{ - public: - CallRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(Account account, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(Account account, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(Account account, - const QString &code, - const QString &message); - -private: - QString mCallId; -}; - - -class PermanentRequest : public CallRelatedRequest -{ - public: - PermanentRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(Call call, - const QString &code, - const QString &message); -}; - -class TemporaryRequest : public CallRelatedRequest -{ - public: - TemporaryRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - /** - * This function will be called when the request - * receive its answer, if the request didn't successfully - * ended. - */ - virtual void onError(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive an answer, but there's other answers to come. - */ - virtual void onEntry(Call call, - const QString &code, - const QString &message); - - /** - * This function will be called when the request - * receive its answer, if the request successfully - * ended. - */ - virtual void onSuccess(Call call, - const QString &code, - const QString &message); -}; - -class ConfigGetAllRequest : public Request -{ -public: - ConfigGetAllRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~ConfigGetAllRequest(){} - - - virtual void onError(const QString &code, const QString &message); - virtual void onEntry(const QString &code, const QString &message); - virtual void onSuccess(const QString &code, const QString &message); -}; - -class ConfigSaveRequest : public Request -{ -public: - ConfigSaveRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~ConfigSaveRequest(){} - - - virtual void onError(const QString &code, const QString &message); - virtual void onSuccess(const QString &code, const QString &message); -}; - -class StopRequest : public Request -{ -public: - StopRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - - virtual ~StopRequest(){} - virtual void onError(const QString &code, const QString &message); - virtual void onSuccess(const QString &code, const QString &message); -}; - - -class SignalizedRequest : public Request -{ - Q_OBJECT - -public: - SignalizedRequest(const QString &sequenceId, - const QString &command, - const std::list< QString > &args); - - virtual void onError(const QString &code, const QString &message); - virtual void onEntry(const QString &code, const QString &message); - virtual void onSuccess(const QString &code, const QString &message); - -signals: - /** - * Be aware that the first string is the message, - * and the second is the code. This is done that - * way because usually the message is more important - * than the code. - */ - void error(QString, QString); - void success(QString, QString); - void entry(QString, QString); -}; - -#endif diff --git a/src/gui/qt/Session.cpp b/src/gui/qt/Session.cpp deleted file mode 100644 index b916833337..0000000000 --- a/src/gui/qt/Session.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <list> -#include <iostream> -#include <qstring.h> - -#include "Session.hpp" -#include "Requester.hpp" -#include "SessionIOFactory.hpp" -#include "globals.h" -#include "DebugOutput.hpp" - -Session::Session(const QString &id) - : mId(id), mSelectedAccountId("") -{ -} - -Session::Session() -{ - mId = Requester::instance().generateSessionId(); - SessionIO *s = SessionIOFactory::instance().create(); - QObject::connect(s, SIGNAL(firstConnectionFailed()), this, SIGNAL(firstSessionIOConnectionFailed())); - Requester::instance().registerSession(mId, s); -} - -Session::~Session() -{ - // remove account - std::map<QString, Account*>::iterator iter = mAccountMap.begin(); - while ( iter != mAccountMap.end() ) { - delete iter->second; iter->second = 0; - iter++; - } - mAccountMap.clear(); -} - -QString -Session::id() const -{ - return mId; -} - -Request * -Session::playTone() const -{ - return Requester::instance().send(mId, "playtone", std::list< QString >()); -} - -Request * -Session::stopTone() const -{ - return Requester::instance().send(mId, "stoptone", std::list< QString >()); -} - -void -Session::connect() const -{ - return Requester::instance().connect(mId); -} - - -Request * -Session::getEvents() const -{ - return Requester::instance().send(mId, "getevents", std::list< QString >()); -} - - -Request * -Session::configSet(const QString §ion, - const QString &name, - const QString &value) const -{ - std::list< QString > args; - args.push_back(section); - args.push_back(name); - args.push_back(value); - return Requester::instance().send(mId, "configset", args); -} - -Request * -Session::configGetAll() const -{ - return Requester::instance().send(mId, "configgetall", std::list< QString >()); -} - -Request * -Session::configSave() const -{ - return Requester::instance().send(mId, "configsave", std::list< QString >()); -} - -Request * -Session::quit() const -{ - return Requester::instance().send(mId, "quit", std::list< QString >()); -} - -Request * -Session::stop() const -{ - return Requester::instance().send(mId, "stop", std::list< QString >()); -} - -Request * -Session::mute() const -{ - return Requester::instance().send(mId, "mute", std::list< QString >()); -} - -Request * -Session::unmute() const -{ - return Requester::instance().send(mId, "unmute", std::list< QString >()); -} - -Request * -Session::volume(unsigned int volume) const -{ - std::list< QString > args; - args.push_back(QString("%1").arg(volume)); - return Requester::instance().send(mId, "setspkrvolume", args); -} - -Request * -Session::micVolume(unsigned int volume) const -{ - std::list< QString > args; - args.push_back(QString("%1").arg(volume)); - return Requester::instance().send(mId, "setmicvolume", args); -} - -Request * -Session::getCallStatus() const -{ - return Requester::instance().send(mId, "getcallstatus", std::list< QString >()); -} - -Request* -Session::getAccountList() const -{ - return Requester::instance().send(mId, "getaccount", std::list< QString >()); -} - -Request * -Session::playDtmf(char c) const -{ - QString s; - s += c; - std::list< QString > args; - args.push_back(s); - return Requester::instance().send(mId, "playdtmf", args); -} - -Request * -Session::list(const QString &category) const -{ - std::list< QString > args; - args.push_back(category); - return Requester::instance().send(mId, "list", args); -} - -Request * -Session::registerToServer(const QString& account) const -{ - std::list< QString > args; - args.push_back(account); - return Requester::instance().send(mId, "register", args); -} - -Request * -Session::switchAudioDriver() const -{ - std::list< QString > args; - args.push_back("audiodriver"); - return Requester::instance().send(mId, "switch", args); -} - -Account* -Session::getSelectedAccount() -{ - std::map< QString, Account* >::iterator iter = mAccountMap.find(mSelectedAccountId); - if (iter!=mAccountMap.end()) { - return iter->second; - } - return 0; -} - -Account* -Session::getAccount(const QString& name) -{ - std::map< QString, Account* >::iterator iter = mAccountMap.find(mSelectedAccountId); - if (iter!=mAccountMap.end()) { - return iter->second; - } - return 0; -} - -void -Session::addAccount(const QString& name, bool isEnabled, const QString& alias) -{ - DebugOutput::instance() << "Adding account..." << name << "\n"; - std::map<QString, Account* >::iterator iter = mAccountMap.find(name); - if (iter == mAccountMap.end()) { - mAccountMap[name] = new Account(mId, name); - mAccountMap[name]->setAlias(alias); - // select account is the first enabled - if (mSelectedAccountId.isEmpty() && isEnabled) { - DebugOutput::instance() << "Default account is " << name << "\n"; - mSelectedAccountId = name; - } - } -} diff --git a/src/gui/qt/Session.hpp b/src/gui/qt/Session.hpp deleted file mode 100644 index 1b2f2c4d62..0000000000 --- a/src/gui/qt/Session.hpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2004-2006 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_SESSION_H -#define SFLPHONEGUI_SESSION_H - -#include <qobject.h> -#include <qstring.h> -#include <map> - -#include "Account.hpp" - -class Session : public QObject -{ - Q_OBJECT - - public: - Session(); - Session(const QString &id); - virtual ~Session(); - - /** - * retreive the account identified by name. - */ - Account* getAccount(const QString &name); - - /** - * Return the first or selected account object - * or 0 if not found - */ - Account* getSelectedAccount(); - void addAccount(const QString& name, bool isEnabled, const QString& alias); - - /** - * Set Selected Account ID - * @param accountID account id - */ - void setSelectedAccountID(const QString &accountID) { - mSelectedAccountId = accountID; - } - - /** - * retreive account - */ - Request* getAccountList() const; - - /** - * This function will play a tone. This is - * just a ear candy. - */ - Request *playDtmf(char c) const; - - - /** - * This function will retreive the given list. - */ - Request *list(const QString &category) const; - - /** - * This function will register to receive events - */ - Request *getEvents() const; - - /** - * This function will ask for all calls status. - */ - Request *getCallStatus() const; - - /** - * This function will mute the microphone. - */ - Request *mute() const; - - /** - * This function will ask sflphoned to close - * the session. This will only close the session, - * so sflphoned will still be running after. - */ - Request *quit() const; - - /** - * This function will register with the default account. - */ - Request *registerToServer(const QString&) const; - - /** - * This function try to switch audio (sound) driver - */ - Request *switchAudioDriver() const; - - /** - * This function will stop sflphoned. - */ - Request *stop() const; - - Request *configSet(const QString §ion, const QString &name, const QString &value) const; - Request *configSave() const; - Request *configGetAll() const; - - /** - * This function will set the volume to - * the given percentage - */ - Request *volume(unsigned int volume) const; - - /** - * This function will set the mic volume to - * the given percentage - */ - Request *micVolume(unsigned int volume) const; - - /** - * This function will unmute the microphone. - */ - Request *unmute() const; - - /** - * This function will ask to the SessionIO - * linked to this session to connect. - */ - void connect() const; - - QString id() const; - Request *stopTone() const; - Request *playTone() const; - - signals: - void firstSessionIOConnectionFailed(); - - - private: - QString mId; - QString mSelectedAccountId; - std::map<QString, Account*> mAccountMap; -}; - -#endif diff --git a/src/gui/qt/SessionFactory.hpp b/src/gui/qt/SessionFactory.hpp deleted file mode 100644 index c2a474e6cd..0000000000 --- a/src/gui/qt/SessionFactory.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __FACTORY_HPP__ -#define __FACTORY_HPP__ - -template< T > -struct Creator -{ - virtual T *create(); -}; - -template< typename T > -class Factory -{ -public: - Factory(); - ~Factory(); - - /** - * This function will set the creator. The - * Factory owns the creator instance. - */ - void setCreator(Creator< T > *creator); - - /** - * It ask the creator to create a SessionIO. - * If there's no creator set, it will throw - * a std::logic_error. - */ - T *create(); - -private: - Creator< T > *mCreator; -} - -#include "Factory.inl" - -#endif diff --git a/src/gui/qt/SessionIO.hpp b/src/gui/qt/SessionIO.hpp deleted file mode 100644 index 21d2fc89c3..0000000000 --- a/src/gui/qt/SessionIO.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SESSIONIO_HPP__ -#define __SESSIONIO_HPP__ - -#include <qobject.h> -#include <qstring.h> - -/** - * This is the main class that will handle - * the IO. - */ -class SessionIO : public QObject -{ - Q_OBJECT - -public: - virtual ~SessionIO(){} - -public slots: - virtual void connect() {} - - /** - * You can use this function for sending request. - * The sending is non-blocking. This function will - * send the data as it is; it will NOT add an EOL. - * the stream will be "sync"ed. - */ - virtual void send(const QString &request) = 0; - - /** - * You can use this function to receive answers. - * This function will wait until there's an - * answer to be processed. - */ - virtual void receive(QString &answer) = 0; - -signals: - void firstConnectionFailed(); -}; - - - -#endif - diff --git a/src/gui/qt/SessionIOFactory.hpp b/src/gui/qt/SessionIOFactory.hpp deleted file mode 100644 index af82d47a9e..0000000000 --- a/src/gui/qt/SessionIOFactory.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SESSIONIOFACTORY_HPP__ -#define __SESSIONIOFACTORY_HPP__ - -#include "utilspp/Singleton.hpp" -#include "Factory.hpp" -#include "SessionIO.hpp" - -typedef utilspp::SingletonHolder< Factory< SessionIO > > SessionIOFactory; - -#endif - diff --git a/src/gui/qt/SkinManager.hpp b/src/gui/qt/SkinManager.hpp deleted file mode 100644 index 87ac798003..0000000000 --- a/src/gui/qt/SkinManager.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author : Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __SKIN_MANAGER_HPP__ -#define __SKIN_MANAGER_HPP__ - -#include "utilspp/Singleton.hpp" -#include "SkinManagerImpl.hpp" - -typedef utilspp::SingletonHolder< SkinManagerImpl > SkinManager; - -#endif - diff --git a/src/gui/qt/SkinManagerImpl.cpp b/src/gui/qt/SkinManagerImpl.cpp deleted file mode 100644 index 4239ab3255..0000000000 --- a/src/gui/qt/SkinManagerImpl.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "src/user_cfg.h" -#include "globals.h" -#include "DebugOutput.hpp" -#include "SkinManagerImpl.hpp" - -SkinManagerImpl::SkinManagerImpl() - : mApp(NULL) - , mHunter(SKINDIR) -{ - mSettings.setPath("savoirfairelinux.com", PROGNAME); - mSettings.beginGroup("/" PROGNAME); - mPaths = mSettings.readListEntry("SkinPaths"); -} - -void -SkinManagerImpl::setApplication(QApplication *app) -{ - mApp = app; -} - -void -SkinManagerImpl::load() -{ - bool ok; - load(mSettings.readEntry("Skin", DFT_SKIN, &ok)); - if(!ok) { - mSettings.writeEntry("Skin", DFT_SKIN); - } -} - -void -SkinManagerImpl::save() -{ - mSettings.writeEntry("Skin", mSkin); - mSettings.writeEntry("SkinPaths", mPaths); -} - -void -SkinManagerImpl::load(const QString &skin) -{ - if(skin.isNull()) - { - mSkin = QString(DFT_SKIN); - } - else - { - mSkin = skin; - } - if(mApp) { - taxidermy::Taxidermist taxidermist = mHunter.getTaxidermist(skin); - taxidermist.update(mApp); - } -} - -QStringList -SkinManagerImpl::getSkins() -{ - return mHunter.getSkinNames(); -} - -void -SkinManagerImpl::addPath(const QString &path) -{ - mPaths.push_back(path); -} - -QStringList -SkinManagerImpl::getPaths() -{ - return mPaths; -} diff --git a/src/gui/qt/SkinManagerImpl.hpp b/src/gui/qt/SkinManagerImpl.hpp deleted file mode 100644 index b5a4c9f0bc..0000000000 --- a/src/gui/qt/SkinManagerImpl.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef __SKIN_MANAGER_IMPL_HPP__ -#define __SKIN_MANAGER_IMPL_HPP__ - -#include <qstring.h> -#include <qsettings.h> -#include <qapplication.h> - -#include "taxidermy/Hunter.hpp" - -class SkinManagerImpl -{ -public: - SkinManagerImpl(); - - public slots: - /** - * This function load a given skin. If the - * skin is invalid, nothing is done. - */ - void load(const QString &skin); - - /** - * This function load the default skin. If the - * skin is invalid, nothing is done. - */ - void load(); - - void save(); - - void setApplication(QApplication *app); - QString getCurrentSkin() - {return mSkin;} - - void addPath(const QString &path); - QStringList getSkins(); - QStringList getPaths(); - -private: - QApplication *mApp; - QSettings mSettings; - QString mSkin; - QStringList mPaths; - taxidermy::Hunter mHunter; - -}; - -#endif - diff --git a/src/gui/qt/TCPSessionIO.cpp b/src/gui/qt/TCPSessionIO.cpp deleted file mode 100644 index 2e411e9960..0000000000 --- a/src/gui/qt/TCPSessionIO.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "globals.h" -#include "DebugOutput.hpp" -#include "Requester.hpp" -#include "TCPSessionIO.hpp" - -#define NB_MAX_TRIES 4 - -TCPSessionIO::TCPSessionIO(const QString &hostname, Q_UINT16 port) - : mSocket(new QSocket(this)) - , mHostname(hostname) - , mPort(port) - , mNbConnectTries(0) - , mNbConnectTriesTotal(0) -{ - mReconnectTimer = new QTimer(this); - QObject::connect(mReconnectTimer, SIGNAL(timeout()), - this, SLOT(connect())); - - QObject::connect(mSocket, SIGNAL(readyRead()), - this, SLOT(receive())); - QObject::connect(mSocket, SIGNAL(connected()), - this, SLOT(sendWaitingRequests())); - QObject::connect(mSocket, SIGNAL(connected()), - this, SLOT(resetConnectionTries())); - QObject::connect(mSocket, SIGNAL(connected()), - this, SIGNAL(connected())); - QObject::connect(mSocket, SIGNAL(connectionClosed()), - this, SIGNAL(disconnected())); - QObject::connect(mSocket, SIGNAL(error(int)), - this, SLOT(error(int))); -} - -TCPSessionIO::~TCPSessionIO() -{} - -void -TCPSessionIO::resetConnectionTries() -{ - mNbConnectTries = 0; -} - -void -TCPSessionIO::error(int err) -{ - if (mNbConnectTriesTotal == 0) { - emit firstConnectionFailed(); - mReconnectTimer->start(1000, true); - mNbConnectTriesTotal++; - } else { - mNbConnectTriesTotal++; - mNbConnectTries++; - if(mNbConnectTries >= NB_MAX_TRIES) { - DebugOutput::instance() << QObject::tr("TCPSessionIO: Connection failed: %1\n").arg(err); - mNbConnectTries = 0; - emit disconnected(); - } else { - mReconnectTimer->start(2000, true); - } - } - //mSocket->close(); -} - -void -TCPSessionIO::receive() -{ - QString s; - while(mSocket->canReadLine()) { - receive(s); - Requester::instance().receiveAnswer(s); - } -} - -void -TCPSessionIO::connect() -{ - DebugOutput::instance() << QObject::tr("TCPSessionIO: Tring to connect to %1:%2.\n") - .arg(mHostname) - .arg(mPort); - mSocket->connectToHost(mHostname, mPort); -} - -void -TCPSessionIO::sendWaitingRequests() -{ - DebugOutput::instance() << QObject::tr("TCPSessionIO: Connected.\n"); - QTextStream stream(mSocket); - while(mSocket->state() == QSocket::Connected && - mStack.size() > 0) { - stream << *mStack.begin(); - mStack.pop_front(); - mSocket->flush(); - } -} - -void -TCPSessionIO::send(const QString &request) -{ - QTextStream stream(mSocket); - if(mSocket->state() == QSocket::Connected) { -// DebugOutput::instance() << QObject::tr("TCPSessioIO: Sending request to sflphone: %1") -// .arg(request); - stream << request; - mSocket->flush(); - } - else { - mStack.push_back(request); - } -} - -void -TCPSessionIO::receive(QString &answer) -{ - if(mSocket->isReadable()) { - QTextStream stream(mSocket); - answer = stream.readLine(); -// DebugOutput::instance() << QObject::tr("TCPSessionIO: Received answer from sflphone: %1\n") -// .arg(answer); - } -} - - - - - - - diff --git a/src/gui/qt/TCPSessionIO.hpp b/src/gui/qt/TCPSessionIO.hpp deleted file mode 100644 index 31915d3221..0000000000 --- a/src/gui/qt/TCPSessionIO.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __TCPSESSIONIO_HPP__ -#define __TCPSESSIONIO_HPP__ - -#include <qobject.h> -#include <qstring.h> -#include <qsocket.h> -#include <qtextstream.h> -#include <qtimer.h> -#include <list> - -#include "SessionIO.hpp" - -#ifdef QT3_SUPPORT -#include <Q3Socket> -typedef Q3Socket QSocket; -#else -#include <qsocket.h> -#endif - - -class TCPSessionIO : public SessionIO -{ - Q_OBJECT - -public: - TCPSessionIO(const QString &hostname, - Q_UINT16 port); - - virtual ~TCPSessionIO(); - -signals: - void connected(); - void disconnected(); - -public slots: - /** - * This function send the request that we were - * unable to send. - */ - void sendWaitingRequests(); - - /** - * Those function are the actual function - * that write to the socket. - */ - virtual void send(const QString &request); - - /** - * This function is called when we have - * incomming data on the socket. - */ - virtual void receive(); - - /** - * Those function are the actual function - * that read from the socket. - */ - virtual void receive(QString &answer); - virtual void connect(); - - void resetConnectionTries(); - -private slots: - /** - * This function is called when we have an error - * on the socket. - */ - void error(int); - -private: - QSocket *mSocket; - QString mHostname; - Q_UINT16 mPort; - - std::list< QString > mStack; - - unsigned int mNbConnectTriesTotal; - unsigned int mNbConnectTries; - QTimer *mReconnectTimer; -}; - -#endif diff --git a/src/gui/qt/TCPSessionIOCreator.cpp b/src/gui/qt/TCPSessionIOCreator.cpp deleted file mode 100644 index 7e34f64119..0000000000 --- a/src/gui/qt/TCPSessionIOCreator.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "TCPSessionIOCreator.hpp" -#include "PhoneLineManager.hpp" - -TCPSessionIOCreator::TCPSessionIOCreator(const QString &hostname, - Q_UINT16 port) - : mHostname(hostname) - , mPort(port) -{} - -TCPSessionIO * -TCPSessionIOCreator::create() -{ - TCPSessionIO *t = new TCPSessionIO(mHostname, mPort); - QObject::connect(t, SIGNAL(connected()), - &PhoneLineManager::instance(), SIGNAL(connected())); - QObject::connect(t, SIGNAL(disconnected()), - &PhoneLineManager::instance(), SLOT(hasDisconnected())); - return t; -} diff --git a/src/gui/qt/TCPSessionIOCreator.hpp b/src/gui/qt/TCPSessionIOCreator.hpp deleted file mode 100644 index 32b7abc7bd..0000000000 --- a/src/gui/qt/TCPSessionIOCreator.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __TCPSESSIONIOCREATOR_HPP__ -#define __TCPSESSIONIOCREATOR_HPP__ - -#include "Factory.hpp" -#include "TCPSessionIO.hpp" - -class TCPSessionIOCreator : public Creator< SessionIO > -{ -public: - TCPSessionIOCreator(const QString &hostname, - Q_UINT16 port); - virtual ~TCPSessionIOCreator(){} - - virtual TCPSessionIO *create(); - -private: - QString mHostname; - Q_UINT16 mPort; -}; - -#endif diff --git a/src/gui/qt/TransparentWidget.cpp b/src/gui/qt/TransparentWidget.cpp deleted file mode 100644 index 9d7f9cd125..0000000000 --- a/src/gui/qt/TransparentWidget.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * (jean-philippe.barrette-lapierre@savoirfairelinux.com) - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, - * or (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with dpkg; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qbitmap.h> -#include <qcolor.h> -#include <qdragobject.h> -#include <qmime.h> -#include <iostream> - -#include "DebugOutput.hpp" -#include "TransparentWidget.hpp" - - -TransparentWidget::TransparentWidget(const QString &pixmap, - QWidget* parent) - : QLabel(parent) -{ - mImage = transparize(pixmap); - setPixmap(mImage); - updateMask(this, mImage); - - resize(mImage.size()); -} - -TransparentWidget::TransparentWidget(QWidget* parent) - : QLabel(parent) -{} - -void -TransparentWidget::updateMask(QWidget *w, QPixmap image) -{ -#ifdef QT3_SUPPORT - if(image.hasAlpha()) { - w->setMask(image.mask()); - } -#else - if(image.mask()) { - w->setMask(*image.mask()); - } -#endif -} - -QPixmap -TransparentWidget::retreive(const QString &image) -{ - return QPixmap::fromMimeSource(image); -} - -QPixmap -TransparentWidget::transparize(const QSize &) -{ - /* - QImage image(size, QImage::Format_RGB32); - QColor c(12,32,35,123); - image.fill(c.rgb()); - - QPixmap p(QPixmap::fromImage(image)); - p.setMask(p.createHeuristicMask()); - //p.setMask(p.alphaChannel()); - */ - return QPixmap(); -} - -TransparentWidget::~TransparentWidget() -{} - - -void -TransparentWidget::setPaletteBackgroundPixmap(QWidget *w, const QString &pixmap) -{ - QPixmap p(transparize(pixmap)); - w->setPaletteBackgroundPixmap(p); - updateMask(w, p); -} - -QPixmap -TransparentWidget::transparize(const QString &image) -{ -#ifdef QT3_SUPPORT - QPixmap p(retreive(image)); - if (!p.mask()) { - if (p.hasAlphaChannel()) { - p.setMask(p.alphaChannel()); - } - else { - p.setMask(p.createHeuristicMask()); - } - } -#else - // QPixmap p(QPixmap::fromMimeSource(image)); - QImage img(QImage::fromMimeSource(image)); - QPixmap p; - p.convertFromImage(img); - - - QBitmap bm; - if (img.hasAlphaBuffer()) { - bm = img.createAlphaMask(); - } - else { - bm = img.createHeuristicMask(); - } - p.setMask(bm); -#endif - return p; -} - - diff --git a/src/gui/qt/TransparentWidget.hpp b/src/gui/qt/TransparentWidget.hpp deleted file mode 100644 index f0ca17d25c..0000000000 --- a/src/gui/qt/TransparentWidget.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * (jean-philippe.barrette-lapierre@savoirfairelinux.com) - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2, - * or (at your option) any later version. - * - * This is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with dpkg; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __TRANSPARENT_WIDGET_HPP__ -#define __TRANSPARENT_WIDGET_HPP__ - -#include <qbitmap.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qimage.h> - -/** - * This class Emulate a PushButton but takes two - * images to display its state. - */ -class TransparentWidget : public QLabel -{ - Q_OBJECT - -public: - TransparentWidget(const QString &pixmap, - QWidget *parent); - TransparentWidget(QWidget *parent); - ~TransparentWidget(); - - static QPixmap retreive(const QString &size); - static QPixmap transparize(const QSize &size); - static QPixmap transparize(const QString &image); - static void setPaletteBackgroundPixmap(QWidget *w, const QString &pixmap); - - /** - * This function will update the mask of the widget - * to the QPixmap mask. - */ - static void updateMask(QWidget *w, QPixmap image); - - - bool hasAlpha() - {return mImage.hasAlpha();} - - QBitmap mask() const - {return *mImage.mask();} - -private: - QPixmap mImage; - -}; - -#endif diff --git a/src/gui/qt/Url.cpp b/src/gui/qt/Url.cpp deleted file mode 100644 index 6ff1b982c7..0000000000 --- a/src/gui/qt/Url.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2004, 2005, 2006 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * YM: 2006-11-15: fix type for QString.length(), return a uint - * YM: 2006-11-15: commentunused variable - */ -#include <string> -#include <qurl.h> - -#include "Url.hpp" - -static uchar hex_to_int( uchar c ) -{ - if ( c >= 'A' && c <= 'F' ) - return c - 'A' + 10; - if ( c >= 'a' && c <= 'f') - return c - 'a' + 10; - if ( c >= '0' && c <= '9') - return c - '0'; - return 0; -} - -void Url::decode( QString& url ) -{ - uint oldlen = url.length(); - if ( !oldlen ) - return; - -// uint newlen = 0; - std::string newUrl; - - uint i = 0; - while ( i < oldlen ) { - ushort c = url[ i++ ].unicode(); - if ( c == '%' ) { - c = hex_to_int( url[ i ].unicode() ) * 16 + hex_to_int( url[ i + 1 ].unicode() ); - i += 2; - } - else if ( c == '+' ) { - c = ' '; - } - newUrl += c; -// newlen++; - } - - url = QString::fromUtf8(newUrl.c_str()); -} diff --git a/src/gui/qt/Url.hpp b/src/gui/qt/Url.hpp deleted file mode 100644 index 2494433e90..0000000000 --- a/src/gui/qt/Url.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef __URL_HPP__ -#define __URL_HPP__ - -#include <qstring.h> - -namespace Url -{ - void decode(QString &url); -} - -#endif - diff --git a/src/gui/qt/VolumeControl.cpp b/src/gui/qt/VolumeControl.cpp deleted file mode 100644 index aa32415950..0000000000 --- a/src/gui/qt/VolumeControl.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <qevent.h> -#include <iostream> - - -#include "TransparentWidget.hpp" -#include "VolumeControl.hpp" - -#define SLIDER_IMAGE "slider.png" - -VolumeControl::VolumeControl (const QString &pixname, - QWidget *parent, - int minValue, - int maxValue) - : QLabel(parent) - , mMin(minValue) - , mMax(maxValue) - , mValue(minValue) - , mOrientation(VolumeControl::Horizontal) - , mSlider(new TransparentWidget(pixname, this)) - , mMaxPosition(100) -{ - resize(); -} - -VolumeControl::~VolumeControl() -{} - -void -VolumeControl::resize() -{ - QPixmap q(QPixmap::fromMimeSource(SLIDER_IMAGE)); - setPixmap(q); - if(q.hasAlpha()) { - setMask(*q.mask()); - } - - QWidget::resize(q.size()); - mMaxPosition = q.height() - mSlider->height(); -} - -void -VolumeControl::setOrientation(VolumeControl::Orientation orientation) -{ - mOrientation = orientation; -} - -void -VolumeControl::setMax(int value) -{ - if(value >= mMin) { - mMax = value; - } -} - -void -VolumeControl::setMin(int value) -{ - if(value <= mMax) { - mMin = value; - } -} - -void -VolumeControl::setValue(int value) -{ - if(value != mValue) { - if(value <= mMax && value >= mMin) { - mValue = value; - updateSlider(value); - emit valueUpdated(mValue); - } - } -} - -void -VolumeControl::mouseMoveEvent (QMouseEvent *e) { - if (mOrientation == VolumeControl::Vertical) { - // If the slider for the volume is vertical - int newpos = mSlider->y() + e->globalY() - mPos.y(); - - mPos = e->globalPos(); - if(newpos < 0) { - mPos.setY(mPos.y() - newpos); - newpos = 0; - } - - if(newpos > mMaxPosition) { - mPos.setY(mPos.y() - (newpos - mMaxPosition)); - newpos = mMaxPosition; - } - - mSlider->move(mSlider->x(), newpos); - updateValue(); - } - else { - mSlider->move(e->y() - mPos.x(), mSlider->y()); - } -} - -void -VolumeControl::updateValue() -{ - int value = (int)((float)offset() / mMaxPosition * (mMax - mMin)); - if(mValue != value) { - mValue = value; - emit valueUpdated(mValue); - } -} - - -void -VolumeControl::updateSlider(int value) -{ - if(mOrientation == VolumeControl::Vertical) { - mSlider->move(mSlider->x(), mMaxPosition - (int)((float)value / (mMax - mMin) * mMaxPosition)); - } - else { - mSlider->move(value / (mMax - mMin) * mMaxPosition, mSlider->y()); - } -} - -int -VolumeControl::offset() -{ - if(mOrientation == VolumeControl::Vertical) { - return mMaxPosition - mSlider->y(); - } - else { - return mSlider->x(); - } -} - -void -VolumeControl::mousePressEvent (QMouseEvent *e) -{ - mPos = e->globalPos(); - int newpos = e->pos().y() - (mSlider->height() / 2); - - mPos = e->globalPos(); - if(newpos < 0) { - mPos.setY(mPos.y() - newpos); - newpos = 0; - } - - if(newpos > mMaxPosition) { - mPos.setY(mPos.y() - (newpos - mMaxPosition)); - newpos = mMaxPosition; - } - - mSlider->move(mSlider->x(), newpos); - updateValue(); -} - -// EOF diff --git a/src/gui/qt/VolumeControl.hpp b/src/gui/qt/VolumeControl.hpp deleted file mode 100644 index 0ca082afc6..0000000000 --- a/src/gui/qt/VolumeControl.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __VOLUMECONTROL_HPP__ -#define __VOLUMECONTROL_HPP__ - -#include <qlabel.h> -#include "TransparentWidget.hpp" - -class VolumeControl : public QLabel -{ - Q_OBJECT - -public: - typedef enum {Vertical = 0, Horizontal} Orientation; - - VolumeControl(const QString &pixmap, - QWidget *parent = 0, - int minValue = 0, - int maxValue = 100); - ~VolumeControl(void); - - int getValue() - {return mValue;} - - int offset(); - int minY(); - int maxY(); - -signals: - void valueUpdated(int); - -public slots: - void updateValue(); - void setMin(int value); - void setMax(int value); - void setValue(int value); - void resize(); - void setOrientation(Orientation orientation); - -private: - void updateSlider(int value); - void mouseMoveEvent(QMouseEvent*); - void mousePressEvent(QMouseEvent*); - - - int mMin; - int mMax; - int mValue; - - VolumeControl::Orientation mOrientation; - QPoint mPos; - - TransparentWidget *mSlider; - int mMaxPosition; -}; - -#endif // __VOLUME_CONTROL_H__ diff --git a/src/gui/qt/configurationpanelui.cpp b/src/gui/qt/configurationpanelui.cpp deleted file mode 100644 index 0b43b70187..0000000000 --- a/src/gui/qt/configurationpanelui.cpp +++ /dev/null @@ -1,1261 +0,0 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'configurationpanel.ui' -** -** Created: Thu Jun 9 13:35:38 2005 -** by: The User Interface Compiler ($Id$) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ - -#include "configurationpanel.h" - -#include <qvariant.h> -#include <qpushbutton.h> -#include <qframe.h> -#include <qlistbox.h> -#include <qlabel.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qgroupbox.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qimage.h> -#include <qpixmap.h> - -#include "configurationpanel.ui.h" -static const char* const image0_data[] = { -"312 91 104 2", -".R c #626562", -".H c #6a656a", -".G c #6a696a", -".F c #6a6d6a", -".Y c #736d73", -"#a c #737173", -".1 c #737573", -"#m c #7b757b", -"#B c #7b797b", -"#x c #7b7d7b", -"#z c #837d83", -".I c #838183", -"#y c #838583", -".g c #83b2b4", -"#n c #8b858b", -"#q c #8b898b", -".u c #8b8d8b", -"#p c #8bb2b4", -".h c #8bb2bd", -".f c #8bb6bd", -".E c #948d94", -"#e c #949194", -"#f c #949594", -".z c #94b6bd", -".2 c #94babd", -".M c #94bac5", -"#G c #94bebd", -"#D c #94bec5", -".v c #9c959c", -".t c #9c999c", -".s c #9c9d9c", -".i c #9cbec5", -"#d c #9cc2c5", -"#C c #a49da4", -"#i c #a4a1a4", -"## c #a4a5a4", -".e c #a4c2c5", -"#v c #a4c2cd", -".A c #a4c6cd", -".P c #aca5ac", -".r c #acaaac", -".S c #acaeac", -"#w c #acc6cd", -".j c #accacd", -"#c c #accad5", -"#K c #accecd", -".0 c #b4aeb4", -".q c #b4b2b4", -".6 c #b4b6b4", -"#J c #b4cad5", -".T c #b4ced5", -".L c #b4d2d5", -".7 c #bdb6bd", -".p c #bdbabd", -".w c #bdbebd", -".3 c #bdd2d5", -"#A c #bdd2de", -".4 c #bdd6de", -"#E c #c5bec5", -".o c #c5c2c5", -".x c #c5c6c5", -".d c #c5d6de", -".k c #c5dade", -"#g c #cdc6cd", -"#o c #cdcacd", -".n c #cdcecd", -"#j c #cddade", -".N c #cddae6", -".5 c #cddede", -"#h c #cddee6", -"#H c #cde2e6", -"#u c #d5ced5", -".y c #d5d2d5", -".J c #d5d6d5", -".W c #d5e2e6", -"#L c #d5e2ee", -".c c #d5e6e6", -".U c #d5e6ee", -".D c #ded6de", -"#. c #dedade", -".m c #dedede", -".B c #dee6ee", -"#b c #deeaee", -".8 c #e6dee6", -".Q c #e6e2e6", -".9 c #e6e6e6", -"#F c #e6eaee", -"#I c #e6eaf6", -"#k c #e6eeee", -".O c #e6eef6", -"#t c #eee6ee", -".X c #eeeaee", -"#r c #eeeeee", -".V c #eeeef6", -".l c #eef2f6", -".b c #eef6f6", -".Z c #f6eef6", -".K c #f6f2f6", -".C c #f6f6f6", -".a c #f6f6ff", -"#l c #f6faff", -"#s c #fff6ff", -".# c #fffaff", -"Qt c #ffffff", -"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt" -"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", -"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQ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QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt" -"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; - -static const unsigned char image1_data[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, 0x00, 0x30, - 0x08, 0x06, 0x00, 0x00, 0x00, 0x63, 0x57, 0xfa, 0xde, 0x00, 0x00, 0x13, - 0x1e, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xed, 0x5d, 0x7f, 0x68, 0x1b, - 0x57, 0x9e, 0xff, 0x3c, 0x73, 0x5b, 0xe4, 0xe0, 0x2d, 0x52, 0xd9, 0x16, - 0x29, 0xd0, 0x62, 0x97, 0x26, 0x58, 0xde, 0x63, 0x41, 0xda, 0x18, 0x1a, - 0x85, 0x0d, 0x91, 0x7a, 0x85, 0xad, 0x1c, 0x17, 0x3a, 0xba, 0x5d, 0x88, - 0xed, 0xdd, 0x52, 0x29, 0x49, 0xc9, 0x3a, 0x77, 0x4b, 0x6b, 0xa7, 0x70, - 0xe4, 0x47, 0x71, 0xec, 0x72, 0x24, 0x8e, 0x12, 0x72, 0x67, 0xef, 0xe2, - 0x24, 0x72, 0x30, 0xb5, 0x65, 0xc8,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3e, 0x3e, 0x5d, 0x72, 0xdc, - 0x12, 0xe6, 0xc5, 0xbc, 0x15, 0xa6, 0x57, 0x56, 0xc9, 0xd4, 0xb3, 0xb3, - 0xcc, 0x9a, 0x0b, 0x4d, 0x3d, 0x63, 0xa5, 0x90, 0xa1, 0x84, 0x39, 0x31, - 0x67, 0x05, 0x5a, 0x21, 0xd2, 0x0e, 0x3d, 0x7d, 0x86, 0xcd, 0x44, 0xed, - 0x85, 0xdb, 0x25, 0xc7, 0x2d, 0xa1, 0x2c, 0xca, 0x5e, 0x98, 0x5e, 0x59, - 0x25, 0xed, 0x85, 0x02, 0x18, 0xb3, 0x7b, 0x98, 0xd0, 0x43, 0x84, 0x9e, - 0x31, 0x42, 0x0f, 0x91, 0xdd, 0xcf, 0x67, 0x0b, 0x6e, 0x47, 0x17, 0x29, - 0xb4, 0xa8, 0x5c, 0xce, 0x4e, 0x38, 0x2e, 0x11, 0x51, 0x57, 0xcf, 0x0d, - 0x72, 0x1e, 0x73, 0x66, 0xfd, 0x75, 0xba, 0x3b, 0x89, 0x66, 0x89, 0x16, - 0x17, 0x17, 0xbf, 0x33, 0x21, 0x09, 0x11, 0xd1, 0xf0, 0xd0, 0x30, 0xd1, - 0xc6, 0xce, 0x4d, 0xe8, 0x8d, 0xc4, 0x06, 0x75, 0xba, 0x3b, 0xc9, 0x79, - 0xcc, 0x49, 0xfb, 0x0f, 0x59, 0xc9, 0x79, 0xcc, 0x49, 0x34, 0x5b, 0x98, - 0xfc, 0xa7, 0xa1, 0x9f, 0x14, 0xee, 0x0c, 0xc3, 0x5e, 0xb8, 0x4d, 0x73, - 0xab, 0x44, 0x94, 0xa0, 0x9c, 0x25, 0x34, 0x47, 0x7f, 0x17, 0xc6, 0xa5, - 0x04, 0xd1, 0xd4, 0xad, 0x69, 0x32, 0xee, 0x33, 0xd1, 0xe9, 0x7d, 0xed, - 0x64, 0xdc, 0x67, 0x12, 0xfe, 0xa4, 0xfe, 0x7d, 0xba, 0xad, 0xf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27, 0x9a, 0x58, - 0x2b, 0x44, 0x36, 0xa7, 0x74, 0xfe, 0x33, 0xbd, 0xe8, 0xf5, 0x06, 0x78, - 0x2e, 0x77, 0x41, 0xbb, 0x97, 0x8f, 0xe1, 0x3d, 0x69, 0xb9, 0x55, 0xa9, - 0x98, 0x51, 0xaf, 0x37, 0xa0, 0x71, 0x78, 0x34, 0x6f, 0x76, 0x25, 0x73, - 0x82, 0x0b, 0xf6, 0x24, 0x63, 0xfa, 0xed, 0x34, 0x54, 0xba, 0xcd, 0x4a, - 0xc6, 0x61, 0xe0, 0xb0, 0x5d, 0x98, 0xd4, 0x52, 0xfa, 0x25, 0x63, 0xf3, - 0x4c, 0x3d, 0xd2, 0xf7, 0x04, 0x72, 0xc5, 0xb8, 0xc7, 0x08, 0x9f, 0x77, - 0x00, 0x1e, 0xc6, 0x18, 0xeb, 0xba, 0x4f, 0x74, 0xf2, 0xee, 0x36, 0x93, - 0xc5, 0xd4, 0xa1, 0xfd, 0x9f, 0xc2, 0x18, 0x79, 0x47, 0x79, 0x20, 0x9d, - 0x59, 0x5a, 0x83, 0x51, 0xb8, 0xff, 0x5a, 0xa3, 0xba, 0x5f, 0xeb, 0x37, - 0x80, 0xef, 0x5d, 0x96, 0x73, 0x33, 0xe6, 0x5a, 0x21, 0xba, 0xf4, 0xe9, - 0x25, 0x18, 0x61, 0x44, 0x72, 0xa9, 0x03, 0xf8, 0x19, 0xed, 0x87, 0x1f, - 0xa7, 0xeb, 0x4f, 0x23, 0x86, 0x18, 0x3a, 0x8e, 0x9c, 0x81, 0x67, 0xaf, - 0x38, 0xdd, 0x35, 0xe0, 0x1d, 0x80, 0x76, 0x59, 0x0b, 0xff, 0x8c, 0x1f, - 0x5c, 0x35, 0x87, 0xd1, 0xe5, 0x20, 0x2e, 0x1d, 0x69, 0x47, 0x0c, 0x31, - 0x18, 0xd6, 0xab, 0xe0, 0x8f, 0xf9, 0xe1, 0xac, 0x6d, 0x40, 0xf9, 0x6b, - 0xe5,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 0xa8, 0xbd, 0xc0, 0xc7, 0x60, 0xcf, - 0xc2, 0xc0, 0x94, 0xf0, 0xd9, 0x45, 0xc5, 0x15, 0x89, 0xb6, 0x83, 0xe2, - 0xa7, 0xc4, 0xb0, 0xd6, 0xfb, 0x44, 0x94, 0x28, 0xbd, 0x2d, 0x5b, 0xc2, - 0xfc, 0xa8, 0xba, 0x41, 0x68, 0x61, 0x95, 0xac, 0x7d, 0x3b, 0xc7, 0xb0, - 0xc5, 0xa4, 0x47, 0x4a, 0xf8, 0xfd, 0xc4, 0x82, 0x1b, 0x12, 0xf1, 0x79, - 0xc8, 0xca, 0x7b, 0xea, 0x99, 0xb5, 0xf2, 0xea, 0x30, 0xff, 0x0b, 0xe5, - 0x25, 0x66, 0x2d, 0x61, 0x01, 0xb8, 0x23, 0x82, 0x92, 0xf9, 0xc0, 0xe9, - 0x15, 0x7e, 0xd7, 0x9f, 0xcc, 0xaf, 0x25, 0x91, 0x7b, 0xc8, 0x27, 0xe8, - 0x37, 0xb6, 0x4a, 0xbf, 0x81, 0x5b, 0xc2, 0xe2, 0xf1, 0xff, 0x01, 0xe7, - 0xc1, 0x25, 0xe6, 0xc2, 0x97, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 -}; - - -/* - * Constructs a ConfigurationPanel as a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -ConfigurationPanel::ConfigurationPanel( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ), - image0( (const char **) image0_data ) -{ - QImage img; - img.loadFromData( image1_data, sizeof( image1_data ), "PNG" ); - image1 = img; - if ( !name ) - setName( "ConfigurationPanel" ); - setSizeGripEnabled( TRUE ); - ConfigurationPanelLayout = new QGridLayout( this, 1, 1, 11, 6, "ConfigurationPanelLayout"); - - layout19 = new QVBoxLayout( 0, 0, 6, "layout19"); - - line1 = new QFrame( this, "line1" ); - line1->setFrameShape( QFrame::HLine ); - line1->setFrameShadow( QFrame::Sunken ); - line1->setFrameShape( QFrame::HLine ); - layout19->addWidget( line1 ); - - layout28 = new QHBoxLayout( 0, 0, 6, "layout28"); - - buttonHelp = new QPushButton( this, "buttonHelp" ); - buttonHelp->setAutoDefault( TRUE ); - layout28->addWidget( buttonHelp ); - Horizontal_Spacing2 = new QSpacerItem( 160, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout28->addItem( Horizontal_Spacing2 ); - - buttonSave = new QPushButton( this, "buttonSave" ); - buttonSave->setAutoDefault( TRUE ); - buttonSave->setDefault( TRUE ); - layout28->addWidget( buttonSave ); - - buttonOk = new QPushButton( this, "buttonOk" ); - buttonOk->setAutoDefault( TRUE ); - layout28->addWidget( buttonOk ); - - buttonCancel = new QPushButton( this, "buttonCancel" ); - buttonCancel->setAutoDefault( TRUE ); - layout28->addWidget( buttonCancel ); - layout19->addLayout( layout28 ); - - ConfigurationPanelLayout->addMultiCellLayout( layout19, 1, 1, 0, 1 ); - - Menu = new QListBox( this, "Menu" ); - Menu->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Menu->sizePolicy().hasHeightForWidth() ) ); - Menu->setCursor( QCursor( 13 ) ); - Menu->setSelectionMode( QListBox::Single ); - - ConfigurationPanelLayout->addWidget( Menu, 0, 0 ); - - layout19_2 = new QVBoxLayout( 0, 0, 6, "layout19_2"); - - TitleTab = new QLabel( this, "TitleTab" ); - QFont TitleTab_font( TitleTab->font() ); - TitleTab_font.setBold( TRUE ); - TitleTab->setFont( TitleTab_font ); - layout19_2->addWidget( TitleTab ); - - line2 = new QFrame( this, "line2" ); - line2->setFrameShape( QFrame::HLine ); - line2->setFrameShadow( QFrame::Sunken ); - line2->setFrameShape( QFrame::HLine ); - layout19_2->addWidget( line2 ); - - Tab_Signalisations = new QTabWidget( this, "Tab_Signalisations" ); - - SIPPage = new QWidget( Tab_Signalisations, "SIPPage" ); - - QWidget* privateLayoutWidget = new QWidget( SIPPage, "layout24" ); - privateLayoutWidget->setGeometry( QRect( 16, 12, 401, 393 ) ); - layout24 = new QVBoxLayout( privateLayoutWidget, 11, 6, "layout24"); - - groupBox1 = new QGroupBox( privateLayoutWidget, "groupBox1" ); - groupBox1->setColumnLayout(0, Qt::Vertical ); - groupBox1->layout()->setSpacing( 6 ); - groupBox1->layout()->setMargin( 11 ); - groupBox1Layout = new QGridLayout( groupBox1->layout() ); - groupBox1Layout->setAlignment( Qt::AlignTop ); - - textLabel2 = new QLabel( groupBox1, "textLabel2" ); - - groupBox1Layout->addWidget( textLabel2, 0, 0 ); - - fullName = new QLineEdit( groupBox1, "fullName" ); - - groupBox1Layout->addWidget( fullName, 1, 0 ); - - userPart = new QLineEdit( groupBox1, "userPart" ); - - groupBox1Layout->addWidget( userPart, 3, 0 ); - - textLabel3 = new QLabel( groupBox1, "textLabel3" ); - - groupBox1Layout->addWidget( textLabel3, 2, 0 ); - - textLabel2_3 = new QLabel( groupBox1, "textLabel2_3" ); - - groupBox1Layout->addWidget( textLabel2_3, 4, 0 ); - - username = new QLineEdit( groupBox1, "username" ); - - groupBox1Layout->addWidget( username, 5, 0 ); - - hostPart = new QLineEdit( groupBox1, "hostPart" ); - - groupBox1Layout->addWidget( hostPart, 9, 0 ); - - sipproxy = new QLineEdit( groupBox1, "sipproxy" ); - - groupBox1Layout->addWidget( sipproxy, 11, 0 ); - - textLabel3_2_2 = new QLabel( groupBox1, "textLabel3_2_2" ); - - groupBox1Layout->addWidget( textLabel3_2_2, 10, 0 ); - - password = new QLineEdit( groupBox1, "password" ); - password->setEchoMode( QLineEdit::Password ); - - groupBox1Layout->addWidget( password, 7, 0 ); - - textLabel1_3 = new QLabel( groupBox1, "textLabel1_3" ); - - groupBox1Layout->addWidget( textLabel1_3, 6, 0 ); - - textLabel3_2 = new QLabel( groupBox1, "textLabel3_2" ); - - groupBox1Layout->addWidget( textLabel3_2, 8, 0 ); - layout24->addWidget( groupBox1 ); - - layout23 = new QVBoxLayout( 0, 0, 6, "layout23"); - - layout19_3 = new QHBoxLayout( 0, 0, 6, "layout19_3"); - - autoregister = new QCheckBox( privateLayoutWidget, "autoregister" ); - autoregister->setChecked( TRUE ); - layout19_3->addWidget( autoregister ); - spacer7 = new QSpacerItem( 201, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout19_3->addItem( spacer7 ); - - Register = new QPushButton( privateLayoutWidget, "Register" ); - layout19_3->addWidget( Register ); - layout23->addLayout( layout19_3 ); - spacer9 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding ); - layout23->addItem( spacer9 ); - layout24->addLayout( layout23 ); - Tab_Signalisations->insertTab( SIPPage, QString::fromLatin1("") ); - - STUNPage = new QWidget( Tab_Signalisations, "STUNPage" ); - - groupBox3 = new QGroupBox( STUNPage, "groupBox3" ); - groupBox3->setGeometry( QRect( 10, 110, 253, 100 ) ); - - textLabel1_5 = new QLabel( groupBox3, "textLabel1_5" ); - textLabel1_5->setGeometry( QRect( 10, 38, 229, 16 ) ); - - STUNserver = new QLineEdit( groupBox3, "STUNserver" ); - STUNserver->setGeometry( QRect( 10, 60, 229, 23 ) ); - - stunButtonGroup = new QButtonGroup( STUNPage, "stunButtonGroup" ); - stunButtonGroup->setGeometry( QRect( 10, 10, 90, 81 ) ); - stunButtonGroup->setColumnLayout(0, Qt::Vertical ); - stunButtonGroup->layout()->setSpacing( 6 ); - stunButtonGroup->layout()->setMargin( 11 ); - stunButtonGroupLayout = new QVBoxLayout( stunButtonGroup->layout() ); - stunButtonGroupLayout->setAlignment( Qt::AlignTop ); - - useStunNo = new QRadioButton( stunButtonGroup, "useStunNo" ); - useStunNo->setChecked( TRUE ); - stunButtonGroupLayout->addWidget( useStunNo ); - - useStunYes = new QRadioButton( stunButtonGroup, "useStunYes" ); - useStunYes->setChecked( FALSE ); - stunButtonGroupLayout->addWidget( useStunYes ); - Tab_Signalisations->insertTab( STUNPage, QString::fromLatin1("") ); - - DTMFPage = new QWidget( Tab_Signalisations, "DTMFPage" ); - - SettingsDTMF = new QGroupBox( DTMFPage, "SettingsDTMF" ); - SettingsDTMF->setGeometry( QRect( 10, 10, 301, 130 ) ); - SettingsDTMF->setColumnLayout(0, Qt::Vertical ); - SettingsDTMF->layout()->setSpacing( 6 ); - SettingsDTMF->layout()->setMargin( 11 ); - SettingsDTMFLayout = new QGridLayout( SettingsDTMF->layout() ); - SettingsDTMFLayout->setAlignment( Qt::AlignTop ); - - layout11 = new QVBoxLayout( 0, 0, 6, "layout11"); - - layout10 = new QHBoxLayout( 0, 0, 6, "layout10"); - - playTones = new QCheckBox( SettingsDTMF, "playTones" ); - playTones->setChecked( TRUE ); - layout10->addWidget( playTones ); - spacer6 = new QSpacerItem( 111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout10->addItem( spacer6 ); - layout11->addLayout( layout10 ); - - layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); - - labelPulseLength = new QLabel( SettingsDTMF, "labelPulseLength" ); - layout7->addWidget( labelPulseLength ); - spacer3 = new QSpacerItem( 115, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout7->addItem( spacer3 ); - - pulseLength = new QSpinBox( SettingsDTMF, "pulseLength" ); - pulseLength->setMaxValue( 1500 ); - pulseLength->setMinValue( 10 ); - pulseLength->setValue( 250 ); - layout7->addWidget( pulseLength ); - layout11->addLayout( layout7 ); - - layout8 = new QHBoxLayout( 0, 0, 6, "layout8"); - - labelSendDTMF = new QLabel( SettingsDTMF, "labelSendDTMF" ); - layout8->addWidget( labelSendDTMF ); - spacer4 = new QSpacerItem( 85, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout8->addItem( spacer4 ); - - sendDTMFas = new QComboBox( FALSE, SettingsDTMF, "sendDTMFas" ); - layout8->addWidget( sendDTMFas ); - layout11->addLayout( layout8 ); - - SettingsDTMFLayout->addLayout( layout11, 0, 0 ); - Tab_Signalisations->insertTab( DTMFPage, QString::fromLatin1("") ); - layout19_2->addWidget( Tab_Signalisations ); - - Tab_Audio = new QTabWidget( this, "Tab_Audio" ); - - DriversPage = new QWidget( Tab_Audio, "DriversPage" ); - - DriverChoice = new QButtonGroup( DriversPage, "DriverChoice" ); - DriverChoice->setGeometry( QRect( 10, 10, 104, 81 ) ); - DriverChoice->setColumnLayout(0, Qt::Vertical ); - DriverChoice->layout()->setSpacing( 6 ); - DriverChoice->layout()->setMargin( 11 ); - DriverChoiceLayout = new QVBoxLayout( DriverChoice->layout() ); - DriverChoiceLayout->setAlignment( Qt::AlignTop ); - - ossButton = new QRadioButton( DriverChoice, "ossButton" ); - ossButton->setChecked( TRUE ); - DriverChoiceLayout->addWidget( ossButton ); - - alsaButton = new QRadioButton( DriverChoice, "alsaButton" ); - alsaButton->setEnabled( TRUE ); - DriverChoiceLayout->addWidget( alsaButton ); - Tab_Audio->insertTab( DriversPage, QString::fromLatin1("") ); - - CodecsPage = new QWidget( Tab_Audio, "CodecsPage" ); - - CodecsChoice = new QButtonGroup( CodecsPage, "CodecsChoice" ); - CodecsChoice->setGeometry( QRect( 20, 10, 133, 157 ) ); - - QWidget* privateLayoutWidget_2 = new QWidget( CodecsChoice, "layout18" ); - privateLayoutWidget_2->setGeometry( QRect( 10, 20, 110, 120 ) ); - layout18 = new QGridLayout( privateLayoutWidget_2, 1, 1, 11, 6, "layout18"); - - layout17 = new QVBoxLayout( 0, 0, 6, "layout17"); - - codec1 = new QComboBox( FALSE, privateLayoutWidget_2, "codec1" ); - layout17->addWidget( codec1 ); - - codec2 = new QComboBox( FALSE, privateLayoutWidget_2, "codec2" ); - layout17->addWidget( codec2 ); - - codec3 = new QComboBox( FALSE, privateLayoutWidget_2, "codec3" ); - layout17->addWidget( codec3 ); - - layout18->addLayout( layout17, 0, 0 ); - - layout18_2 = new QVBoxLayout( 0, 0, 6, "layout18_2"); - - textLabel1_4 = new QLabel( privateLayoutWidget_2, "textLabel1_4" ); - layout18_2->addWidget( textLabel1_4 ); - - textLabel1_4_2 = new QLabel( privateLayoutWidget_2, "textLabel1_4_2" ); - layout18_2->addWidget( textLabel1_4_2 ); - - textLabel1_4_3 = new QLabel( privateLayoutWidget_2, "textLabel1_4_3" ); - layout18_2->addWidget( textLabel1_4_3 ); - - layout18->addLayout( layout18_2, 0, 1 ); - Tab_Audio->insertTab( CodecsPage, QString::fromLatin1("") ); - - RingPage = new QWidget( Tab_Audio, "RingPage" ); - - ringsChoice = new QComboBox( FALSE, RingPage, "ringsChoice" ); - ringsChoice->setGeometry( QRect( 20, 21, 150, 30 ) ); - Tab_Audio->insertTab( RingPage, QString::fromLatin1("") ); - layout19_2->addWidget( Tab_Audio ); - - Tab_Preferences = new QTabWidget( this, "Tab_Preferences" ); - - DriversPage_2 = new QWidget( Tab_Preferences, "DriversPage_2" ); - - SkinChoice = new QComboBox( FALSE, DriversPage_2, "SkinChoice" ); - SkinChoice->setGeometry( QRect( 12, 42, 110, 27 ) ); - - buttonApplySkin = new QPushButton( DriversPage_2, "buttonApplySkin" ); - buttonApplySkin->setGeometry( QRect( 136, 40, 80, 32 ) ); - Tab_Preferences->insertTab( DriversPage_2, QString::fromLatin1("") ); - - TabPage = new QWidget( Tab_Preferences, "TabPage" ); - - QWidget* privateLayoutWidget_3 = new QWidget( TabPage, "layout17" ); - privateLayoutWidget_3->setGeometry( QRect( 10, 10, 262, 200 ) ); - layout17_2 = new QVBoxLayout( privateLayoutWidget_3, 11, 6, "layout17_2"); - - layout16 = new QHBoxLayout( 0, 0, 6, "layout16"); - - textLabel1_2 = new QLabel( privateLayoutWidget_3, "textLabel1_2" ); - layout16->addWidget( textLabel1_2 ); - - zoneToneChoice = new QComboBox( FALSE, privateLayoutWidget_3, "zoneToneChoice" ); - layout16->addWidget( zoneToneChoice ); - spacer5 = new QSpacerItem( 31, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout16->addItem( spacer5 ); - layout17_2->addLayout( layout16 ); - - confirmationToQuit = new QCheckBox( privateLayoutWidget_3, "confirmationToQuit" ); - confirmationToQuit->setChecked( TRUE ); - layout17_2->addWidget( confirmationToQuit ); - - checkedTray = new QCheckBox( privateLayoutWidget_3, "checkedTray" ); - layout17_2->addWidget( checkedTray ); - - layout16_2 = new QHBoxLayout( 0, 0, 6, "layout16_2"); - - textLabel1_6 = new QLabel( privateLayoutWidget_3, "textLabel1_6" ); - layout16_2->addWidget( textLabel1_6 ); - - voicemailNumber = new QLineEdit( privateLayoutWidget_3, "voicemailNumber" ); - layout16_2->addWidget( voicemailNumber ); - spacer6_2 = new QSpacerItem( 61, 21, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout16_2->addItem( spacer6_2 ); - layout17_2->addLayout( layout16_2 ); - Tab_Preferences->insertTab( TabPage, QString::fromLatin1("") ); - layout19_2->addWidget( Tab_Preferences ); - - Tab_About = new QTabWidget( this, "Tab_About" ); - - DriversPage_3 = new QWidget( Tab_About, "DriversPage_3" ); - - pixmapLabel1 = new QLabel( DriversPage_3, "pixmapLabel1" ); - pixmapLabel1->setGeometry( QRect( 50, 40, 312, 91 ) ); - pixmapLabel1->setPixmap( image0 ); - pixmapLabel1->setScaledContents( TRUE ); - - textLabel2_2 = new QLabel( DriversPage_3, "textLabel2_2" ); - textLabel2_2->setGeometry( QRect( 20, 170, 371, 121 ) ); - Tab_About->insertTab( DriversPage_3, QString::fromLatin1("") ); - - CodecsPage_2 = new QWidget( Tab_About, "CodecsPage_2" ); - - textLabel1 = new QLabel( CodecsPage_2, "textLabel1" ); - textLabel1->setGeometry( QRect( 85, 126, 291, 131 ) ); - - pixmapLabel2 = new QLabel( CodecsPage_2, "pixmapLabel2" ); - pixmapLabel2->setGeometry( QRect( 130, 50, 173, 48 ) ); - pixmapLabel2->setPixmap( image1 ); - pixmapLabel2->setScaledContents( TRUE ); - Tab_About->insertTab( CodecsPage_2, QString::fromLatin1("") ); - layout19_2->addWidget( Tab_About ); - - ConfigurationPanelLayout->addLayout( layout19_2, 0, 1 ); - languageChange(); - resize( QSize(561, 552).expandedTo(minimumSizeHint()) ); - clearWState( WState_Polished ); - - // signals and slots connections - connect( Menu, SIGNAL( clicked(QListBoxItem*) ), Tab_Signalisations, SLOT( setFocus() ) ); - connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); - connect( Menu, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( changeTabSlot() ) ); - connect( buttonSave, SIGNAL( clicked() ), this, SLOT( saveSlot() ) ); - connect( stunButtonGroup, SIGNAL( clicked(int) ), this, SLOT( useStunSlot(int) ) ); - connect( buttonApplySkin, SIGNAL( clicked() ), this, SLOT( applySkinSlot() ) ); - connect( DriverChoice, SIGNAL( clicked(int) ), this, SLOT( driverSlot(int) ) ); - connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); - - // tab order - setTabOrder( Tab_Signalisations, fullName ); - setTabOrder( fullName, username ); - setTabOrder( username, password ); - setTabOrder( password, hostPart ); - setTabOrder( hostPart, sipproxy ); - setTabOrder( sipproxy, autoregister ); - setTabOrder( autoregister, buttonSave ); - setTabOrder( buttonSave, buttonOk ); - setTabOrder( buttonOk, buttonCancel ); - setTabOrder( buttonCancel, userPart ); - setTabOrder( userPart, buttonHelp ); - setTabOrder( buttonHelp, SkinChoice ); - setTabOrder( SkinChoice, zoneToneChoice ); - setTabOrder( zoneToneChoice, confirmationToQuit ); - setTabOrder( confirmationToQuit, checkedTray ); - setTabOrder( checkedTray, voicemailNumber ); - setTabOrder( voicemailNumber, useStunYes ); - setTabOrder( useStunYes, STUNserver ); - setTabOrder( STUNserver, playTones ); - setTabOrder( playTones, pulseLength ); - setTabOrder( pulseLength, sendDTMFas ); - setTabOrder( sendDTMFas, Menu ); - setTabOrder( Menu, Tab_Audio ); - setTabOrder( Tab_Audio, ossButton ); - setTabOrder( ossButton, codec1 ); - setTabOrder( codec1, codec2 ); - setTabOrder( codec2, codec3 ); - setTabOrder( codec3, Tab_Preferences ); - setTabOrder( Tab_Preferences, Tab_About ); - setTabOrder( Tab_About, Register ); - setTabOrder( Register, useStunNo ); - setTabOrder( useStunNo, ringsChoice ); - setTabOrder( ringsChoice, buttonApplySkin ); - init(); -} - -/* - * Destroys the object and frees any allocated resources - */ -ConfigurationPanel::~ConfigurationPanel() -{ - // no need to delete child widgets, Qt does it all for us -} - -/* - * Sets the strings of the subwidgets using the current - * language. - */ -void ConfigurationPanel::languageChange() -{ - setCaption( tr( "Configuration panel" ) ); - buttonHelp->setText( tr( "&Help" ) ); - buttonHelp->setAccel( QKeySequence( tr( "F1" ) ) ); - buttonSave->setText( tr( "&Save" ) ); - buttonSave->setAccel( QKeySequence( tr( "Alt+S" ) ) ); - buttonOk->setText( tr( "&OK" ) ); - buttonOk->setAccel( QKeySequence( tr( "Alt+O" ) ) ); - buttonCancel->setText( tr( "&Cancel" ) ); - buttonCancel->setAccel( QKeySequence( tr( "F, Backspace" ) ) ); - Menu->setCurrentItem( -1 ); - TitleTab->setText( tr( "Setup signalisation" ) ); - groupBox1->setTitle( QString::null ); - textLabel2->setText( tr( "Full name" ) ); - textLabel3->setText( tr( "User Part of SIP URL" ) ); - textLabel2_3->setText( tr( "Authorization user" ) ); - textLabel3_2_2->setText( tr( "SIP proxy" ) ); - textLabel1_3->setText( tr( "Password" ) ); - textLabel3_2->setText( tr( "Host part of SIP URL" ) ); - autoregister->setText( tr( "Auto-register" ) ); - Register->setText( tr( "Register" ) ); - Tab_Signalisations->changeTab( SIPPage, tr( "SIP Authentication" ) ); - groupBox3->setTitle( tr( "Settings " ) ); - textLabel1_5->setText( tr( "STUN server (address:port)" ) ); - stunButtonGroup->setTitle( tr( "Use STUN" ) ); - useStunNo->setText( tr( "No" ) ); - useStunYes->setText( tr( "Yes" ) ); - Tab_Signalisations->changeTab( STUNPage, tr( "STUN" ) ); - SettingsDTMF->setTitle( tr( "Settings" ) ); - playTones->setText( tr( "Play tones locally" ) ); - labelPulseLength->setText( tr( "Pulse length" ) ); - pulseLength->setSuffix( tr( " ms" ) ); - labelSendDTMF->setText( tr( "Send DTMF as" ) ); - sendDTMFas->clear(); - sendDTMFas->insertItem( tr( "SIP INFO" ) ); - sendDTMFas->setCurrentItem( 0 ); - Tab_Signalisations->changeTab( DTMFPage, tr( "DTMF" ) ); - DriverChoice->setTitle( tr( "Drivers" ) ); - ossButton->setText( tr( "OSS" ) ); - alsaButton->setText( tr( "ALSA" ) ); - Tab_Audio->changeTab( DriversPage, tr( "Drivers" ) ); - CodecsChoice->setTitle( tr( "Supported codecs" ) ); - codec1->clear(); - codec1->insertItem( tr( "G711u" ) ); - codec1->insertItem( tr( "G711a" ) ); - codec1->insertItem( tr( "GSM" ) ); - codec2->clear(); - codec2->insertItem( tr( "G711a" ) ); - codec2->insertItem( tr( "G711u" ) ); - codec2->insertItem( tr( "GSM" ) ); - codec3->clear(); - codec3->insertItem( tr( "G711u" ) ); - codec3->insertItem( tr( "G711a" ) ); - codec3->insertItem( tr( "GSM" ) ); - textLabel1_4->setText( tr( "1" ) ); - textLabel1_4_2->setText( tr( "2" ) ); - textLabel1_4_3->setText( tr( "3" ) ); - Tab_Audio->changeTab( CodecsPage, tr( "Codecs" ) ); - Tab_Audio->changeTab( RingPage, tr( "Ringtones" ) ); - buttonApplySkin->setText( tr( "&Apply" ) ); - buttonApplySkin->setAccel( QKeySequence( tr( "Alt+A" ) ) ); - Tab_Preferences->changeTab( DriversPage_2, tr( "Themes" ) ); - textLabel1_2->setText( tr( "Zone tone:" ) ); - zoneToneChoice->clear(); - zoneToneChoice->insertItem( tr( "North America" ) ); - zoneToneChoice->insertItem( tr( "France" ) ); - zoneToneChoice->insertItem( tr( "Australia" ) ); - zoneToneChoice->insertItem( tr( "United Kingdom" ) ); - zoneToneChoice->insertItem( tr( "Spain" ) ); - zoneToneChoice->insertItem( tr( "Italy" ) ); - zoneToneChoice->insertItem( tr( "Japan" ) ); - confirmationToQuit->setText( tr( "Show confirmation to quit." ) ); - checkedTray->setText( tr( "Minimize to tray" ) ); - textLabel1_6->setText( tr( "Voicemail:" ) ); - Tab_Preferences->changeTab( TabPage, tr( "Options" ) ); - textLabel2_2->setText( tr( "<p align=\"center\">\n" -"Copyright (C) 2004-2005 Savoir-faire Linux inc.<br><br>\n" -"Laurielle LEA <laurielle.lea@savoirfairelinux.com><br><br>\n" -"SFLPhone-0.3.1 is released under the General Public License.<br>\n" -"For more information, see http://www.sflphone.org<br>\n" -"</p>" ) ); - Tab_About->changeTab( DriversPage_3, tr( "About SFLPhone" ) ); - textLabel1->setText( tr( "<p align=\"center\">Website: http://www.savoirfairelinux.com<br><br>\n" -"5505, Saint-Laurent - bureau 3030<br>\n" -"Montreal, Quebec H2T 1S6</p>" ) ); - Tab_About->changeTab( CodecsPage_2, tr( "About Savoir-faire Linux inc." ) ); -} - diff --git a/src/gui/qt/globals.h b/src/gui/qt/globals.h deleted file mode 100644 index f21c293acb..0000000000 --- a/src/gui/qt/globals.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONE_GLOBAL_H -#define SFLPHONE_GLOBAL_H - -#define NB_PHONELINES 6 -#define PROGNAME "SFLPhone" -#define VERSION "0.7.2" - -#define AUDIO_SECTION "Audio" -#define AUDIO_DEFAULT_DEVICE "Drivers.driverName" -#define AUDIO_DEFAULT_DEVICEIN "Drivers.driverNameIn" -#define AUDIO_DEFAULT_DEVICEOUT "Drivers.driverNameOut" -#define AUDIO_SAMPLERATE "Drivers.sampleRate" - -#define AUDIO_CODEC1 "Codecs.codec1" -#define AUDIO_CODEC2 "Codecs.codec2" -#define AUDIO_CODEC3 "Codecs.codec3" -#define AUDIO_RINGTONE "Rings.ringChoice" - -#define SIGNALISATION_SECTION "VoIPLink" -#define SIGNALISATION_FULL_NAME "SIP.fullName" -#define SIGNALISATION_USER_PART "SIP.userPart" -#define SIGNALISATION_AUTH_USER_NAME "SIP.username" -#define SIGNALISATION_PASSWORD "SIP.password" -#define SIGNALISATION_HOST_PART "SIP.hostPart" -#define SIGNALISATION_PROXY "SIP.proxy" -#define SIGNALISATION_STUN_SERVER "STUN.STUNserver" -#define SIGNALISATION_USE_STUN "STUN.useStun" -#define SIGNALISATION_PLAY_TONES "DTMF.playTones" -#define SIGNALISATION_PULSE_LENGTH "DTMF.pulseLength" -#define SIGNALISATION_SEND_DTMF_AS "DTMF.sendDTMFas" -#define SIGNALISATION_IAXHOST "IAX.host" -#define SIGNALISATION_IAXPASS "IAX.pass" -#define SIGNALISATION_IAXUSER "IAX.user" - -#define ACCOUNT_DEFAULT_NAME "SIP0" -#define ACCOUNT_TYPE "Account.type" -#define ACCOUNT_ENABLE "Account.enable" -#define ACCOUNT_AUTO_REGISTER "Account.autoregister" -#define ACCOUNT_ALIAS "Account.alias" - -#define PREFERENCES_SECTION "Preferences" -#define PREFERENCES_THEME "Themes.skinChoice" - -#define SKINDIR DATADIR "/skins" - -#endif diff --git a/src/gui/qt/main.cpp b/src/gui/qt/main.cpp deleted file mode 100644 index 6dcaef46f4..0000000000 --- a/src/gui/qt/main.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <iostream> -#include <stdexcept> -#include <qcolor.h> -#include <qsplashscreen.h> -#include <qstring.h> -#include <qtextcodec.h> -#include <qtimer.h> -#include <qtranslator.h> - -#include "PhoneLineManager.hpp" -#include "SFLPhoneApp.hpp" -#include "SFLPhoneWindow.hpp" -#include "TransparentWidget.hpp" - -int main(int argc, char **argv) -{ - SFLPhoneApp app(argc, argv); - - QSplashScreen *splash = new QSplashScreen(TransparentWidget::retreive("splash.png")); - splash->show(); - - // translation file for Qt - QTranslator qt(NULL); - qt.load( QString( "qt_" ) + QTextCodec::locale(), "." ); - app.installTranslator( &qt ); - - - QTranslator myapp(NULL); - myapp.load( QString( "sflphone-qt_" ) + QTextCodec::locale(), "." ); - app.installTranslator( &myapp ); - - SFLPhoneWindow* sfl = new SFLPhoneWindow(); - app.initConnections(sfl); -#ifndef QT3_SUPPORT - app.setMainWidget(sfl); -#endif - - PhoneLineManager::instance().connect(); - //splash->finish(sfl); - //sfl->show(); - QObject::connect(&PhoneLineManager::instance(), SIGNAL(readyToShow()), splash, SLOT(hide())); - - // we connect this app to connected() signal, to handle argument - QObject::connect(&PhoneLineManager::instance(), SIGNAL(readyToShow()), &app, SLOT(handleArg())); - - - - // QTimer *timer = new QTimer(sfl); - // QObject::connect(timer, SIGNAL(timeout()), - // sfl, SLOT(show())); -// QObject::connect(timer, SIGNAL(timeout()), -// splash, SLOT(close())); - -// timer->start(1500, true); - - //delete splash; - - app.loadSkin(); - return app.exec(); -} diff --git a/src/gui/qt/url_inputui.cpp b/src/gui/qt/url_inputui.cpp deleted file mode 100644 index 246f55656f..0000000000 --- a/src/gui/qt/url_inputui.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'url_input.ui' -** -** Created: Thu Jun 9 13:35:40 2005 -** by: The User Interface Compiler ($Id$) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ - -#include "url_input.h" - -#include <qvariant.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include "url_input.ui.h" - -/* - * Constructs a URL_Input as a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -URL_Input::URL_Input( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) -{ - if ( !name ) - setName( "URL_Input" ); - - buttonOK = new QPushButton( this, "buttonOK" ); - buttonOK->setGeometry( QRect( 208, -1, 20, 23 ) ); - buttonOK->setMinimumSize( QSize( 0, 23 ) ); - buttonOK->setMaximumSize( QSize( 20, 23 ) ); - buttonOK->setFocusPolicy( QPushButton::StrongFocus ); - - buttonCancel = new QPushButton( this, "buttonCancel" ); - buttonCancel->setGeometry( QRect( 228, -1, 20, 23 ) ); - buttonCancel->setMinimumSize( QSize( 0, 23 ) ); - buttonCancel->setMaximumSize( QSize( 20, 23 ) ); - buttonCancel->setFocusPolicy( QPushButton::TabFocus ); - - url = new QLineEdit( this, "url" ); - url->setGeometry( QRect( -1, 0, 210, 23 ) ); - url->setMinimumSize( QSize( 210, 0 ) ); - url->setFocusPolicy( QLineEdit::StrongFocus ); - languageChange(); - resize( QSize(250, 21).expandedTo(minimumSizeHint()) ); - clearWState( WState_Polished ); - - // signals and slots connections - connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); - - // tab order - setTabOrder( url, buttonOK ); - setTabOrder( buttonOK, buttonCancel ); -} - -/* - * Destroys the object and frees any allocated resources - */ -URL_Input::~URL_Input() -{ - // no need to delete child widgets, Qt does it all for us -} - -/* - * Sets the strings of the subwidgets using the current - * language. - */ -void URL_Input::languageChange() -{ - setCaption( tr( "URL_Input" ) ); - buttonOK->setText( tr( "1" ) ); - buttonOK->setAccel( QKeySequence( QString::null ) ); - buttonCancel->setText( tr( "0" ) ); - buttonCancel->setAccel( QKeySequence( QString::null ) ); -} - diff --git a/src/gui/server/Makefile.am b/src/gui/server/Makefile.am deleted file mode 100644 index d423713f55..0000000000 --- a/src/gui/server/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -noinst_LTLIBRARIES = libsflphoneguiserver.la - -libsflphoneguiserver_la_SOURCES = guiserverimpl.cpp \ - responsemessage.cpp request.cpp requestfactory.cpp argtokenizer.cpp tcpsessionio.cpp \ - requestmanager.cpp sessionio.cpp tcpstreampool.cpp requestconfig.cpp - -libsflphoneguiserver_la_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\" -libsflphoneguiserver_la_CPPFLAGS = -I$(top_srcdir)/libs -I$(top_srcdir)/src $(libccext2_CFLAGS) -libsflphoneguiserver_la_LIBADD = - -noinst_HEADERS = responsemessage.h request.h requestfactory.h \ - argtokenizer.h tcpsessionio.h requestmanager.h guiserver.h guiserverimpl.h sessionio.h \ - tcpsessionio.h tcpstreampool.h requestconfig.h ObjectPool.hpp ObjectPool.inl diff --git a/src/gui/server/ObjectPool.hpp b/src/gui/server/ObjectPool.hpp deleted file mode 100644 index f9c25bad57..0000000000 --- a/src/gui/server/ObjectPool.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> (cc++ mutex) - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_OBJECTPOOL_H -#define SFLPHONEGUI_OBJECTPOOL_H - -#include <list> -#include <string> -#include <cc++/thread.h> - -/** - * Pool Interface (multithread) - */ -template< typename T > -class ObjectPool -{ - public: - /** - * This function will push a line in the pool. - */ - void push(const T &line); - - /** - * This function will wait for an available line. - */ - bool pop(T &value, unsigned long time = ULONG_MAX); - - private: - std::list< T > mPool; - - ost::Mutex mMutex; - ost::Semaphore mSemaphore; -}; - -#include "ObjectPool.inl" - -#endif - diff --git a/src/gui/server/ObjectPool.inl b/src/gui/server/ObjectPool.inl deleted file mode 100644 index 4132e8e386..0000000000 --- a/src/gui/server/ObjectPool.inl +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2004-2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> (cc++ mutex) - * Author: Jean-Philippe Barrette-LaPierre - * <jean-philippe.barrette-lapierre@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef SFLPHONEGUI_OBJECTPOOL_INL -#define SFLPHONEGUI_OBJECTPOOL_INL - -#include <iostream> - -template< typename T > -void -ObjectPool< T >::push(const T &value) -{ - ost::MutexLock guard(mMutex); - mPool.push_back(value); - mSemaphore.post(); -} - -template< typename T > -bool -ObjectPool< T >::pop(T &value, unsigned long time) -{ - //ost::MutexLock guard(mMutex); - if (mSemaphore.wait(time)) { - - if(mPool.begin() == mPool.end()) { - return false; - } else { - typename std::list< T >::iterator pos = mPool.begin(); - value = (*pos); - mPool.pop_front(); - return true; - } - } - return false; -} - -#endif diff --git a/src/gui/server/argtokenizer.cpp b/src/gui/server/argtokenizer.cpp deleted file mode 100644 index 0391645f30..0000000000 --- a/src/gui/server/argtokenizer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "argtokenizer.h" -#include <ios> -#include <iostream> -#include <sstream> -#include <cc++/url.h> -#include <cstring> - -TokenList -ArgTokenizer::tokenize(const std::string& str) { - std::istringstream s(str); - std::string output; - - TokenList args; - while(s.good()) { - s >> output; - // if we have a string that end with an space - // failbit is set - if ( ! ( s.rdstate() & std::ios_base::failbit) ) { - char *tmp = new char[output.length()+1]; - strcpy(tmp, output.c_str()); - ost::urlDecode(tmp, NULL); - args.push_back(tmp); - delete[] tmp; tmp = NULL; - } - } - return args; -} diff --git a/src/gui/server/argtokenizer.h b/src/gui/server/argtokenizer.h deleted file mode 100644 index d6b5d07367..0000000000 --- a/src/gui/server/argtokenizer.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __ARG_TOKENIZER__ -#define __ARG_TOKENIZER__ - -#include <list> -#include <string> - -typedef std::list<std::string> TokenList; - -/** -Separate a string into token -a b c%20d = 3 tokens: [a], [b], [c d] - -Example: -#include <argtokenizer.h> - -ArgTokenizer tokenizer; -TokenList tList = tokenizer.tokenize(std::string("bla bla bla")); -TokenList::iterator iter = tList.begin(); -while( iter != tList.end() ) { - std::cout << *iter << std::endl; -} -*/ -class ArgTokenizer { -public: - ArgTokenizer() {} // ctor - ~ArgTokenizer() {} // dtor - - /** - * Tokenize a string into a list of string - * Separators are: space, newline and tab ( ,\n,\t) - * @author: Jean-Philippe Barrette-LaPierre - */ - TokenList tokenize(const std::string& str); -}; - -#endif // __ARG_TOKENIZER__ diff --git a/src/gui/server/guiserver.h b/src/gui/server/guiserver.h deleted file mode 100644 index 4633045de5..0000000000 --- a/src/gui/server/guiserver.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __GUISERVERSINGLETON_H__ -#define __GUISERVERSINGLETON_H__ - -#include "utilspp/Singleton.hpp" -#include "guiserverimpl.h" - -typedef utilspp::SingletonHolder< GUIServerImpl > GUIServer; - -#endif // __GUISERVERSINGLETON_H__ diff --git a/src/gui/server/guiserverimpl.cpp b/src/gui/server/guiserverimpl.cpp deleted file mode 100644 index b576e5e690..0000000000 --- a/src/gui/server/guiserverimpl.cpp +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "guiserver.h" -#include <string> -#include <iostream> -#include <sstream> -#include <stdexcept> - -#include "../../global.h" // for VERSION and PROGNAME -#include "responsemessage.h" - -// default constructor -GUIServerImpl::GUIServerImpl() : _getEventsSequenceId("seq0") -{ - _sessionPort = 3999; -} - -// destructor -GUIServerImpl::~GUIServerImpl() -{ -} - -int -GUIServerImpl::exec() { - return _requestManager.exec(_sessionPort); -} - -/** - * SubCall operations - * insert - * remove - */ -void -GUIServerImpl::insertSubCall(const CallID& id, const CallID& seq) { - - _callMap[id] = seq; -} - -void -GUIServerImpl::removeSubCall(const CallID& id) { - _callMap.erase(id); -} - -/** - * Retreive the sequenceId or send default sequenceId - */ -std::string -GUIServerImpl::getSequenceIdFromId(const CallID& id) { - CallMap::iterator iter = _callMap.find(id); - if (iter != _callMap.end()) { - return iter->second; - } - return _getEventsSequenceId; -} - -bool -GUIServerImpl::getCurrentCallId(std::string& callId) { - bool returnValue = false; - try { - CallID id = GuiFramework::getCurrentId(); - if (id != "") { - callId = id; - returnValue = true; - } - } catch(...) { - // nothing, it's false - } - return returnValue; -} - -bool -GUIServerImpl::getEvents(const std::string& sequenceId) -{ - _getEventsSequenceId=sequenceId; - - // didn't loaded the setup? - // 010 <CSeq> Load setup - if ( !GuiFramework::hasLoadedSetup() ) { - _requestManager.sendResponse(ResponseMessage("010", sequenceId, _("Load setup"))); - } - - TokenList tk; - std::ostringstream percentSpkr; - // 021 <CSeq> <percentage of speaker volume> Speaker volume changed. - percentSpkr << GuiFramework::getSpkrVolume(); - tk.push_back(percentSpkr.str()); - tk.push_back(_("Speaker volume changed")); - _requestManager.sendResponse(ResponseMessage("021", sequenceId, tk)); - - // 022 <CSeq> <percentage of microphone volume> Microphone volume changed. - tk.clear(); - std::ostringstream percentMic; - percentMic << GuiFramework::getMicVolume(); - tk.push_back(percentMic.str()); - tk.push_back(_("Microphone volume changed")); - _requestManager.sendResponse(ResponseMessage("022", sequenceId, tk)); - - // try to register, if not done yet... - GuiFramework::getEvents(); - return true; -} - -bool -GUIServerImpl::sendGetEventsEnd() -{ - if ( _getEventsSequenceId != "seq0" ) { - _requestManager.sendResponse(ResponseMessage("202", _getEventsSequenceId, -_("getcallstatus request stopped me"))); - } - return true; -} - -bool -GUIServerImpl::outgoingCall(const std::string& seq, - const std::string& account, - const std::string& callid, - const std::string& to) -{ - insertSubCall(callid, seq); - return GuiFramework::outgoingCall(account, callid, to); -} - -bool -GUIServerImpl::answerCall(const std::string& callId) -{ - return GuiFramework::answerCall(callId); -} - -bool -GUIServerImpl::refuseCall(const std::string& callId) -{ - return GuiFramework::refuseCall(callId); -} -bool -GUIServerImpl::transferCall(const std::string& callId, const std::string& to) -{ - return GuiFramework::transferCall(callId, to); -} - -bool -GUIServerImpl::holdCall(const std::string& callId) -{ - return GuiFramework::onHoldCall(callId); -} - -bool -GUIServerImpl::unholdCall(const std::string& callId) -{ - return GuiFramework::offHoldCall(callId); -} - -bool -GUIServerImpl::hangupCall(const std::string& callId) -{ - if ( GuiFramework::hangupCall(callId) ) { - removeSubCall(callId); - return true; - } - return false; -} - -/* - * we hangup everything in callmap, and flush it - * @return false if atleast one hangup failed - */ -bool -GUIServerImpl::hangupAll() -{ - bool result = true; - CallMap::iterator iter = _callMap.begin(); - // try to hangup every call, even if one fail - while(iter!=_callMap.end()) { - if (!GuiFramework::hangupCall(iter->first)) { - result = false; - } - iter++; - } - _callMap.clear(); - return result; -} - -bool -GUIServerImpl::dtmfCall(const std::string& callId, const std::string& dtmfKey) -{ - return GuiFramework::sendDtmf(callId, dtmfKey[0]); -} - -/** - * Version constant are in global.h - * @return the version (name number) - */ -std::string -GUIServerImpl::version() -{ - std::ostringstream programVersion; - programVersion << PROGNAME << " " << SFLPHONED_VERSION; - return programVersion.str(); -} - - -bool -GUIServerImpl::incomingCall(const AccountID& accountId, const CallID& id, const std::string& from) -{ - TokenList arg; - arg.push_back(id); - arg.push_back(accountId); - arg.push_back(from); - arg.push_back("call"); - - insertSubCall(id, _getEventsSequenceId); - _requestManager.sendResponse(ResponseMessage("001", _getEventsSequenceId, arg)); - - return 0; -} - -void -GUIServerImpl::incomingMessage(const std::string& account, const std::string& message) { - TokenList arg; - arg.push_back(account); - arg.push_back(message); - _requestManager.sendResponse(ResponseMessage("030", _getEventsSequenceId, arg)); -} - -void -GUIServerImpl::peerAnsweredCall (const CallID& id) -{ - CallMap::iterator iter = _callMap.find(id); - if ( iter != _callMap.end() ) { - _requestManager.sendResponse(ResponseMessage("200", iter->second, _("Established"))); - } -} - -void -GUIServerImpl::peerRingingCall (const CallID& id) -{ - CallMap::iterator iter = _callMap.find(id); - if ( iter != _callMap.end() ) { - _requestManager.sendResponse(ResponseMessage("151", iter->second, _("Ringing"))); - } -} - -void -GUIServerImpl::peerHungupCall (const CallID& id) -{ - CallMap::iterator iter = _callMap.find(id); - if ( iter != _callMap.end() ) { - TokenList tk; - tk.push_back(id); - tk.push_back("hangup"); - - _requestManager.sendResponse(ResponseMessage("002", _getEventsSequenceId,tk)); - - // remove this call... - removeSubCall(id); - } -} - -void -GUIServerImpl::displayStatus (const std::string& status) -{ - TokenList tk; - tk.push_back(status); - tk.push_back("Status"); - _requestManager.sendResponse(ResponseMessage("100", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::displayConfigError (const std::string& error) -{ - TokenList tk; - tk.push_back(error); - tk.push_back("Config Error"); - _requestManager.sendResponse(ResponseMessage("101", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::displayTextMessage (const CallID& id, const std::string& message) -{ - TokenList tk; - tk.push_back(id); - tk.push_back(message); - tk.push_back("Text message"); - _requestManager.sendResponse(ResponseMessage("102", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::displayErrorText (const CallID& id, const std::string& message) -{ - TokenList tk; - tk.push_back(id); - tk.push_back(message); - tk.push_back("Error"); - _requestManager.sendResponse(ResponseMessage("104", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::displayError (const std::string& error) -{ - TokenList tk; - tk.push_back(error); - tk.push_back("Error"); - _requestManager.sendResponse(ResponseMessage("105", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::sendVoiceNbMessage(const AccountID& accountId, const std::string& nb_msg) -{ - TokenList tk; - tk.push_back(accountId); - tk.push_back(nb_msg); - _requestManager.sendResponse(ResponseMessage("020", _getEventsSequenceId, tk)); -} - -void -GUIServerImpl::sendRegistrationState(const AccountID& accountid, bool state) -{ - TokenList tk; - tk.push_back(accountid); - if (state == true) { - tk.push_back(_("Registration succeed")); - _requestManager.sendResponse(ResponseMessage("003", _getEventsSequenceId, tk)); - } else { - tk.push_back(_("Registration failed")); - _requestManager.sendResponse(ResponseMessage("004", _getEventsSequenceId, tk)); - } -} -void -GUIServerImpl::setup() -{ -} - -void -GUIServerImpl::sendMessage(const std::string& code, const std::string& seqId, TokenList& arg) -{ - _requestManager.sendResponse(ResponseMessage(code, seqId, arg)); -} - -void -GUIServerImpl::sendCallMessage(const std::string& code, - const std::string& sequenceId, - const CallID& id, - TokenList arg) -{ - try { - arg.push_front(id); - _requestManager.sendResponse(ResponseMessage(code, sequenceId, arg)); - } catch(...) { - // no callid found - } -} - -void -GUIServerImpl::update() -{ - -} - -void -GUIServerImpl::callFailure(const CallID& id) -{ - CallMap::iterator iter = _callMap.find(id); - if ( iter != _callMap.end() ) { - TokenList tk; - tk.push_back(id); - tk.push_back("Wrong number"); - - _requestManager.sendResponse(ResponseMessage("504", iter->second, tk)); - removeSubCall(id); - } -} diff --git a/src/gui/server/guiserverimpl.h b/src/gui/server/guiserverimpl.h deleted file mode 100644 index 8b2a8ab8da..0000000000 --- a/src/gui/server/guiserverimpl.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef __GUI_SERVER_H__ -#define __GUI_SERVER_H__ - -#include "../guiframework.h" -#include <string> -#include <map> - -#include "requestmanager.h" - - -/** Session port for the daemon, default is DEFAULT_SESSION_PORT */ -#define DEFAULT_SESSION_PORT 3999 - -typedef std::map<CallID, std::string> CallMap; - -class GUIServerImpl : public GuiFramework { -public: - // GUIServerImpl constructor - GUIServerImpl(); - // GUIServerImpl destructor - ~GUIServerImpl(); - - // exec loop - int exec(void); - - bool incomingCall(const AccountID& accountId, const CallID& id, const std::string& from); - void incomingMessage(const AccountID& accountId, const std::string& message); - - void peerAnsweredCall (const CallID& id); - void peerRingingCall (const CallID& id); - void peerHungupCall (const CallID& id); - void displayStatus (const std::string& status); - void displayConfigError(const std::string& error); - void displayTextMessage (const CallID& id, const std::string& message); - void displayErrorText (const CallID& id, const std::string& message); - void displayError (const std::string& error); - void sendVoiceNbMessage(const AccountID& accountid, const std::string& nb_msg); - void sendRegistrationState(const AccountID& accountid, bool state); - void setup(); - - void sendMessage(const std::string& code, const std::string& seqId, - TokenList& arg); - void sendCallMessage(const std::string& code, const std::string& sequenceId, - const CallID& id, TokenList arg); - void callFailure(const CallID& id); - - bool getEvents(const std::string& sequenceId); - bool sendGetEventsEnd(); - - bool outgoingCall (const std::string& seq, const std::string& account, - const std::string& callid, const std::string& to); - bool answerCall(const std::string& callId); - bool refuseCall(const std::string& callId); - bool holdCall(const std::string& callId); - bool unholdCall(const std::string& callId); - bool hangupCall(const std::string& callId); - bool transferCall(const std::string& callId, const std::string& to); - bool dtmfCall(const std::string& callId, const std::string& dtmfKey); - bool hangupAll(); - bool getCurrentCallId(std::string& callId); - - std::string version(); - void quit() { _getEventsSequenceId="seq0"; _requestManager.quit(); } - void stop() { _requestManager.stop(); } - - // observer methods - void update(); - - void setSessionPort(int port) { - if(port>0 && port<65536) {_sessionPort=port;} - }; - -private: - void insertSubCall(const CallID& id, const std::string& seq); - void removeSubCall(const CallID& id); - std::string getSequenceIdFromId(const CallID& id); - - /** - * This callMap is necessary because - * because we want to retreive the seq associate to a call id - * and also a sequence number - */ - CallMap _callMap; - - // RequestManager execute received request - // and send response - RequestManager _requestManager; - - std::string _getEventsSequenceId; // default is seq0 - int _sessionPort; -}; - -#endif // __GUI_SERVER_H__ diff --git a/src/gui/server/request.cpp b/src/gui/server/request.cpp deleted file mode 100644 index dfe0b92952..0000000000 --- a/src/gui/server/request.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "global.h" -#include "request.h" -#include "guiserver.h" - -ResponseMessage -RequestCall::execute() -{ - if ( GUIServer::instance().outgoingCall(_sequenceId, _account, _callId, _destination) ) { - return message("150", _("Trying")); - } - return message("500",_("Server Error")); -} - -ResponseMessage -RequestAnswer::execute() -{ - if ( GUIServer::instance().answerCall(_callId) ) { - return message("200", _("OK")); - } - return message("500","Server Error"); -} - -ResponseMessage -RequestTextMessage::execute() -{ - if ( GUIServer::instance().sendTextMessage(_account, _destination, _message) ) { - return message("200", "Sending message"); - } - return message("500","Server Error"); -} - -ResponseMessage -RequestRefuse::execute() -{ - if ( GUIServer::instance().refuseCall(_callId) ) { - return message("200", _("OK")); - } - return message("500",_("Server Error")); -} - -ResponseMessage -RequestHold::execute() -{ - if ( GUIServer::instance().holdCall(_callId) ) { - return message("200", _("Held")); - } - return message("500",_("Server Error")); -} - -ResponseMessage -RequestUnhold::execute() -{ - if ( GUIServer::instance().unholdCall(_callId) ) { - return message("200", _("Unheld")); - } - return message("500",_("Server Error")); -} - -RequestTransfer::RequestTransfer(const std::string &sequenceId, - const TokenList& argList) : RequestGlobalCall(sequenceId, argList) -{ - TokenList::iterator iter = _argList.begin(); - - // check for the transfer destination - bool argsAreValid = false; - if (iter != _argList.end()) { - _destination = *iter; - _argList.pop_front(); - argsAreValid = true; - } - if (!argsAreValid) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestTransfer::execute() -{ - if ( GUIServer::instance().transferCall(_callId, _destination) ) { - return message("200", _("Transfered")); - } - return message("500",_("Server Error")); -} - -ResponseMessage -RequestHangup::execute() -{ - if ( GUIServer::instance().hangupCall(_callId) ) { - return message("200", _("Hungup")); - } - return message("500", _("Hangup Error")); -} - -ResponseMessage -RequestHangupAll::execute() -{ - if ( GUIServer::instance().hangupAll() ) { - return message("200", _("All hungup")); - } - return message("500", _("Hangup Error")); -} - -RequestDTMF::RequestDTMF(const std::string &sequenceId, - const TokenList& argList) : RequestGlobalCall(sequenceId, argList) -{ - TokenList::iterator iter = _argList.begin(); - - // check for the dtmf key - bool argsAreValid = false; - if (iter != _argList.end() && (*iter).length()==1) { - _dtmfKey = *iter; - _argList.pop_front(); - argsAreValid = true; - } - if (!argsAreValid) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestDTMF::execute() -{ - if ( GUIServer::instance().dtmfCall(_callId, _dtmfKey) ) { - return message("200", _("OK")); - } - return message("500", _("DTMF Error")); -} - -RequestPlayDtmf::RequestPlayDtmf(const std::string &sequenceId, - const TokenList& argList) : RequestGlobal(sequenceId, argList) -{ - - TokenList::iterator iter = _argList.begin(); - - // check for the dtmf key - bool argsAreValid = false; - if (iter != _argList.end() && (*iter).length()==1) { - _dtmfKey = *iter; - _argList.pop_front(); - argsAreValid = true; - } - if (!argsAreValid) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestPlayDtmf::execute() -{ - if ( GUIServer::instance().playDtmf(_dtmfKey[0]) ) { - return message("200", _("OK")); - } - return message("500", _("DTMF Error")); -} - -ResponseMessage -RequestPlayTone::execute() -{ - if ( GUIServer::instance().playTone() ) { - return message("200", _("OK")); - } - return message("500", _("Tone Error")); -} - -ResponseMessage -RequestStopTone::execute() -{ - if ( GUIServer::instance().stopTone() ) { - return message("200", _("OK")); - } - return message("500", _("Tone Error")); -} - -ResponseMessage -RequestMute::execute() -{ - GUIServer::instance().mute(); - return message("200",_("Muted")); -} - -ResponseMessage -RequestUnmute::execute() -{ - GUIServer::instance().unmute(); - return message("200",_("Unmuted")); -} - -ResponseMessage -RequestVersion::execute() -{ - return message("200",GUIServer::instance().version()); -} - -ResponseMessage -RequestQuit::execute() -{ - // GUIServer::instance().hangupAll(); don't hangup call, so we can do a netcat session that call someone - GUIServer::instance().stopTone(); - GUIServer::instance().quit(); - return message("200", _("Quitting")); -} - -ResponseMessage -RequestStop::execute() -{ - GUIServer::instance().hangupAll(); - GUIServer::instance().stopTone(); - GUIServer::instance().stop(); - return message("200", _("Stopping server")); -} diff --git a/src/gui/server/request.h b/src/gui/server/request.h deleted file mode 100644 index b90bc8ec05..0000000000 --- a/src/gui/server/request.h +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __REQUEST_H__ -#define __REQUEST_H__ - -#include <string> -#include <list> -#include "responsemessage.h" - -typedef std::list<std::string> TokenList; - -/** -Request are received from the client -and execute on the server -Request execution always return a ResponseMessage -@author Yan Morin -*/ -class RequestConstructorException { -}; - -class Request -{ -public: - Request(const std::string &sequenceId, const TokenList& argList) : _sequenceId(sequenceId), _argList(argList) {} - virtual ~Request() {} - virtual ResponseMessage execute() = 0; - ResponseMessage message(const std::string &code, const std::string &aMessage) { - ResponseMessage response(code, _sequenceId, aMessage); - return response; - } - ResponseMessage message(const std::string &code, TokenList& arg) { - ResponseMessage response(code, _sequenceId, arg); - return response; - } - std::string getSequenceId () const { return _sequenceId; } - -protected: - std::string _sequenceId; - TokenList _argList; -}; - - -class RequestCall : public Request { -public: - RequestCall(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) { - TokenList::iterator iter = _argList.begin(); - // check for the callid - bool argsAreValid = false; - // Args are: account callid destination - // acc1000 c10345 sip:test@test.com - if (iter != _argList.end() && iter->length()!=0) { - _account = *iter; - _argList.pop_front(); - iter = _argList.begin(); - if (iter != _argList.end() && iter->length() != 0) { - _callId = *iter; - // last arg is the destination - iter++; - if (iter != _argList.end()) { - _destination = *iter; - argsAreValid = true; - } - } - } - if (!argsAreValid) { - throw RequestConstructorException(); - } - } - virtual ResponseMessage execute(); - -private: - std::string _callId; - std::string _destination; - std::string _account; -}; - -/** - * Class for Text Message - * message <seq> <acc> <to> <message> - */ -class RequestTextMessage : public Request { -public: - RequestTextMessage(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) { - TokenList::iterator iter = _argList.begin(); - // check for the callid - bool argsAreValid = false; - if (iter != _argList.end() && iter->length()!=0) { - _account = *iter; - _argList.pop_front(); - iter = _argList.begin(); - if (iter != _argList.end() && iter->length() != 0) { - _destination = *iter; - // last arg is the destination - iter++; - if (iter != _argList.end()) { - _message = *iter; - argsAreValid = true; - } - } - } - if (!argsAreValid) { - throw RequestConstructorException(); - } - } - virtual ResponseMessage execute(); - -private: - std::string _account; - std::string _destination; - std::string _message; -}; - - -class RequestGlobalCall : public Request -{ -public: - RequestGlobalCall(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId, argList) { - TokenList::iterator iter = _argList.begin(); - - if (iter != _argList.end() && iter->length() != 0 ) { - _callId = *iter; - _argList.pop_front(); - } else { - throw RequestConstructorException(); - } - } - virtual ~RequestGlobalCall() {} - virtual ResponseMessage execute() = 0; - -protected: - std::string _callId; -}; - -class RequestAnswer : public RequestGlobalCall { -public: - RequestAnswer(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestRefuse : public RequestGlobalCall { -public: - RequestRefuse(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestHold : public RequestGlobalCall { -public: - RequestHold(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestUnhold : public RequestGlobalCall { -public: - RequestUnhold(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestTransfer : public RequestGlobalCall { -public: - RequestTransfer(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _destination; -}; -class RequestHangup : public RequestGlobalCall { -public: - RequestHangup(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestDTMF : public RequestGlobalCall { -public: - RequestDTMF(const std::string &sequenceId, - const TokenList& argList); - - ResponseMessage execute(); -private: - std::string _dtmfKey; -}; - - -class RequestGlobal : public Request -{ -public: - RequestGlobal(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) {} - virtual ~RequestGlobal() {} - virtual ResponseMessage execute() = 0; -}; - -class RequestMute : public RequestGlobal { -public: - RequestMute(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestUnmute : public RequestGlobal { -public: - RequestUnmute(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestVersion : public RequestGlobal { -public: - RequestVersion(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestQuit : public RequestGlobal { -public: - RequestQuit(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestStop : public RequestGlobal { -public: - RequestStop(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; -class RequestHangupAll : public RequestGlobal { -public: - RequestHangupAll(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestPlayDtmf : public RequestGlobal { -public: - RequestPlayDtmf(const std::string &sequenceId, - const TokenList& argList); - ResponseMessage execute(); -private: - std::string _dtmfKey; -}; - -class RequestPlayTone : public RequestGlobal { -public: - RequestPlayTone(const std::string &sequenceId, - const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestStopTone : public RequestGlobal { -public: - RequestStopTone(const std::string &sequenceId, - const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - - - - - -class RequestSyntaxError : public Request -{ -public: - RequestSyntaxError(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId, argList) {} - ~RequestSyntaxError() {} - ResponseMessage execute() { - return message("501", "Syntax Error"); - } -}; - -#endif diff --git a/src/gui/server/requestconfig.cpp b/src/gui/server/requestconfig.cpp deleted file mode 100644 index f89ca03308..0000000000 --- a/src/gui/server/requestconfig.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "global.h" -#include "requestconfig.h" -#include "guiserver.h" - -ResponseMessage -RequestGetEvents::execute() -{ - GUIServer::instance().getEvents(_sequenceId); - return message("000", _("OK")); -} - -ResponseMessage -RequestZeroconf::execute() -{ - if (GUIServer::instance().getZeroconf(_sequenceId)) { - return message("200", _("OK")); - } else { - return message("501",_("Zeroconf not enabled or activated")); - } -} - -ResponseMessage -RequestZeroconfEvent::execute() -{ - if (GUIServer::instance().attachZeroconfEvents(_sequenceId, *this)) { - return message("000", _("Zeroconf Events are running")); - } else { - return message("501",_("Zeroconf not enabled or activated")); - } -} - -RequestZeroconfEvent::~RequestZeroconfEvent() -{ - GUIServer::instance().detachZeroconfEvents(*this); -} - -void -RequestZeroconfEvent::update() -{ - TokenList tk; tk.push_back("New Zeroconf events - Not Implemented"); - GUIServer::instance().sendMessage("100", _sequenceId, tk); -} - -ResponseMessage -RequestCallStatus::execute() -{ - //GUIServer::instance().sendGetEventsEnd(); - TokenList tk; - tk.push_back(_("OK")); - std::string code = "206"; - GUIServer::instance().getCallStatus(_sequenceId); - - std::string callid; - if (GUIServer::instance().getCurrentCallId(callid)) { - tk.push_front(callid); - } else { - code = "205"; - } - return message(code, tk); -} - -ResponseMessage -RequestAccountList::execute() -{ - std::string code; - std::string response; - if ( GUIServer::instance().getAccountList(_sequenceId) ) { - code = "200"; - response = "OK"; - } else { - code = "400"; - response = "No active account"; - } - return message(code, _(response)); -} - -ResponseMessage -RequestConfigGetAll::execute() -{ - if (GUIServer::instance().getConfigAll(_sequenceId)) { - return message("200", _("OK")); - } else { - return message("500",_("Server Error")); - } -} - -RequestConfigGet::RequestConfigGet(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - bool argsAreValid = false; - if (iter != _argList.end()) { - _section = *iter; - _argList.pop_front(); - iter = _argList.begin(); - if (iter != _argList.end()) { - _name = *iter; - _argList.pop_front(); - argsAreValid = true; - } - } - if (!argsAreValid) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestConfigGet::execute() -{ - TokenList arg; - if (GUIServer::instance().getConfig(_section, _name, arg)) { - return message("200", arg); - } else { - // 402 seq10001 Variable unknown - return message("402",_("Variable unknown")); - } -} - -RequestConfigSet::RequestConfigSet(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - - // get three strings arguments - bool argsAreValid = false; - if (iter != _argList.end()) { - _section = *iter; - _argList.pop_front(); - iter = _argList.begin(); - if (iter != _argList.end()) { - _name = *iter; - _argList.pop_front(); - iter = _argList.begin(); - if (iter != _argList.end()) { - _value = *iter; - _argList.pop_front(); - argsAreValid = true; - } else { - _value = ""; - argsAreValid = true; - } - } - } - if (!argsAreValid) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestConfigSet::execute() -{ - if (GUIServer::instance().setConfig(_section, _name, _value)) { - return message("200", _("OK")); - } else { - return message("500",_("Server Error")); - } -} - -ResponseMessage -RequestConfigSave::execute() -{ - if (GUIServer::instance().saveConfig()) { - return message("200", _("Config saved")); - } else { - return message("400",_("Error Unable to save the configuration")); - } -} - -RequestList::RequestList(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - if (iter != _argList.end()) { - _name = *iter; - _argList.pop_front(); - } else { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestList::execute() -{ - if (GUIServer::instance().getConfigList(_sequenceId, _name)) { - return message("200", _("OK")); - } else { - return message("500",_("Server Error")); - } -} - -RequestVolumeSpkr::RequestVolumeSpkr(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - bool error = true; - if (iter != _argList.end()) { - _percent = atoi(iter->c_str()); - if (_percent >= 0 && _percent <= 100) { - _argList.pop_front(); - error = false; - } - } - if (error) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestVolumeSpkr::execute() -{ - if (GUIServer::instance().setSpkrVolume(_percent)) { - return message("200", _("OK")); - } else { - return message("500",_("Server Error")); - } -} - -RequestVolumeMic::RequestVolumeMic(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - bool error = true; - if (iter != _argList.end()) { - _percent = atoi(iter->c_str()); - if (_percent >= 0 && _percent <= 100) { - _argList.pop_front(); - error = false; - } - } - if (error) { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestVolumeMic::execute() -{ - if (GUIServer::instance().setMicVolume(_percent)) { - return message("200", _("OK")); - } else { - return message("500",_("Server Error")); - } -} - -RequestRegister::RequestRegister(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - if (iter != _argList.end()) { - _accountId = *iter; - _argList.pop_front(); - } else { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestRegister::execute() -{ - if (GUIServer::instance().registerVoIPLink(_accountId)) { - return message("200", _("OK")); - } else { - return message("500",_("Registration sending failed")); - } -} - -RequestUnregister::RequestUnregister(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - if (iter != _argList.end()) { - _accountId = *iter; - _argList.pop_front(); - } else { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestUnregister::execute() -{ - if (GUIServer::instance().unregisterVoIPLink(_accountId)) { - return message("200", _("OK")); - } else { - return message("500",_("Unregistration sending failed")); - } -} - -RequestSwitch::RequestSwitch(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) -{ - TokenList::iterator iter = _argList.begin(); - if (iter != _argList.end()) { - _switchName = *iter; - } else { - throw RequestConstructorException(); - } -} - -ResponseMessage -RequestSwitch::execute() -{ - std::string switchMessage; - if (GUIServer::instance().setSwitch(_switchName, switchMessage)) { - return message("200", switchMessage); - } else { - return message("500", switchMessage); - } -} - - diff --git a/src/gui/server/requestconfig.h b/src/gui/server/requestconfig.h deleted file mode 100644 index 6de941daf7..0000000000 --- a/src/gui/server/requestconfig.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __REQUESTCONFIG_H__ -#define __REQUESTCONFIG_H__ - -#include "request.h" -#include "../../observer.h" - -class RequestGetEvents : public RequestGlobal { -public: - RequestGetEvents(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestZeroconf : public RequestGlobal { -public: - RequestZeroconf(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - - -class RequestZeroconfEvent : public RequestGlobal, public Pattern::Observer { -public: - RequestZeroconfEvent(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ~RequestZeroconfEvent(); - ResponseMessage execute(); - void update(); -}; - - -class RequestCallStatus : public RequestGlobal { -public: - RequestCallStatus(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestAccountList : public RequestGlobal { -public: - RequestAccountList(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestConfigGetAll : public RequestGlobal { -public: - RequestConfigGetAll(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - - -class RequestConfigGet : public RequestGlobal { -public: - RequestConfigGet(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _section; - std::string _name; -}; - - -class RequestConfigSet : public RequestGlobal { -public: - RequestConfigSet(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _section; - std::string _name; - std::string _value; -}; - - -class RequestConfigSave : public RequestGlobal { -public: - RequestConfigSave(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {} - ResponseMessage execute(); -}; - -class RequestList : public RequestGlobal { -public: - RequestList(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _name; -}; - -class RequestVolumeSpkr : public RequestGlobal { -public: - RequestVolumeSpkr(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - int _percent; -}; - -class RequestVolumeMic : public RequestGlobal { -public: - RequestVolumeMic(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - int _percent; -}; - -class RequestRegister : public RequestGlobal { -public: - RequestRegister(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _accountId; -}; - -class RequestUnregister : public RequestGlobal { -public: - RequestUnregister(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _accountId; -}; -class RequestSwitch : public RequestGlobal { -public: - RequestSwitch(const std::string &sequenceId, const TokenList& argList); - ResponseMessage execute(); -private: - std::string _switchName; -}; - - -#endif // __REQUESTCONFIG_H__ diff --git a/src/gui/server/requestfactory.cpp b/src/gui/server/requestfactory.cpp deleted file mode 100644 index 896e5e1b07..0000000000 --- a/src/gui/server/requestfactory.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include <stdexcept> - -#include "global.h" -#include "requestfactory.h" -#include "request.h" -#include "requestconfig.h" - -Request * -RequestFactory::create(const std::string& requestLine) -{ - - TokenList tList = _tokenizer.tokenize(requestLine); - TokenList::iterator iter = tList.begin(); - - // there is atleast one token (the command) - if (iter != tList.end()) { - std::string requestName = *iter; - tList.pop_front(); - iter = tList.begin(); - - // there is atleast a second token (the sequenceId) - if (iter != tList.end() && iter->size() != 0 ) { - std::string sequenceId = *iter; - tList.pop_front(); - try { - Request *r = create(requestName, sequenceId, tList); - return r; - } catch (...) { - // if the create return an exception - // we create a syntaxerror - return create("syntaxerror", sequenceId, tList); - } - } - } - return create("syntaxerror", "seq0", tList); -} - -Request * -RequestFactory::create( - const std::string& requestName, - const std::string& sequenceId, - const TokenList& argList) -{ - std::map< std::string, RequestCreatorBase * >::iterator pos = mRequests.find(requestName); - if(pos == mRequests.end()) { - pos = mRequests.find("syntaxerror"); - if(pos == mRequests.end()) { - throw std::runtime_error(_("There's no request of that name")); - } - } - - return pos->second->create(sequenceId, argList); -} - -RequestFactory::~RequestFactory() -{ - std::map< std::string, RequestCreatorBase * >::iterator iter = mRequests.begin(); - while ( iter != mRequests.end() ) { - // delete RequestCreator< T > - delete iter->second; iter->second = NULL; - iter++; - } - mRequests.clear(); -} - -template< typename T > -void -RequestFactory::registerRequest(const std::string &requestname) -{ - std::map< std::string, RequestCreatorBase * >::iterator pos = - mRequests.find(requestname); - if(pos != mRequests.end()) { - delete pos->second; pos->second = NULL; - mRequests.erase(pos); - } - - mRequests.insert(std::make_pair(requestname, new RequestCreator< T >())); -} - -void -RequestFactory::registerAll() { - registerRequest<RequestSyntaxError> ("syntaxerror"); - registerRequest<RequestCall> ("call"); - registerRequest<RequestTextMessage> ("message"); - registerRequest<RequestAnswer> ("answer"); - registerRequest<RequestRefuse> ("refuse"); - registerRequest<RequestHold> ("hold"); - registerRequest<RequestUnhold> ("unhold"); - registerRequest<RequestHangup> ("hangup"); - registerRequest<RequestHangupAll> ("hangupall"); - registerRequest<RequestDTMF> ("senddtmf"); - registerRequest<RequestPlayDtmf> ("playdtmf"); - registerRequest<RequestPlayTone> ("playtone"); - registerRequest<RequestStopTone> ("stoptone"); - registerRequest<RequestTransfer> ("transfer"); - registerRequest<RequestMute> ("mute"); - registerRequest<RequestUnmute> ("unmute"); - registerRequest<RequestVersion> ("version"); - registerRequest<RequestQuit> ("quit"); - registerRequest<RequestStop> ("stop"); - - // request config - registerRequest<RequestGetEvents> ("getevents"); - registerRequest<RequestZeroconf> ("getzeroconf"); - registerRequest<RequestZeroconfEvent>("getzeroconfevents"); - registerRequest<RequestCallStatus> ("getcallstatus"); - registerRequest<RequestAccountList> ("getaccount"); - registerRequest<RequestConfigGetAll>("configgetall"); - registerRequest<RequestConfigGet> ("configget"); - registerRequest<RequestConfigSet> ("configset"); - registerRequest<RequestConfigSave> ("configsave"); - registerRequest<RequestList> ("list"); - registerRequest<RequestVolumeSpkr> ("setspkrvolume"); - registerRequest<RequestVolumeMic> ("setmicvolume"); - registerRequest<RequestRegister> ("register"); - registerRequest<RequestUnregister> ("unregister"); - - registerRequest<RequestSwitch> ("switch"); -} diff --git a/src/gui/server/requestfactory.h b/src/gui/server/requestfactory.h deleted file mode 100644 index 7021171c1f..0000000000 --- a/src/gui/server/requestfactory.h +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef REQUESTFACTORY_H -#define REQUESTFACTORY_H - -#include <string> -#include <map> - -#include "request.h" -#include "argtokenizer.h" - -class Request; -/** -*/ -class RequestCreatorBase -{ -public: - virtual Request *create(const std::string &sequenceId, const TokenList& argList) = 0; - virtual RequestCreatorBase *clone() = 0; -}; - -template< typename T > -class RequestCreator : public RequestCreatorBase -{ -public: - virtual Request *create(const std::string &sequenceId, const TokenList& argList) - { - return new T(sequenceId, argList); - } - - virtual RequestCreatorBase *clone() - { - return new RequestCreator< T >(); - } -}; - - -class RequestFactory -{ -public: - ~RequestFactory(); - Request *create(const std::string& requestLine); - Request *create( - const std::string& requestname, - const std::string& sequenceId, - const TokenList& argList); - - template< typename T > - void registerRequest(const std::string& requestname); - void registerAll(); -private: - std::map< std::string, RequestCreatorBase * > mRequests; - ArgTokenizer _tokenizer; -}; - - -#endif diff --git a/src/gui/server/requestmanager.cpp b/src/gui/server/requestmanager.cpp deleted file mode 100644 index 7d42acff46..0000000000 --- a/src/gui/server/requestmanager.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "global.h" -#include "requestmanager.h" -#include "tcpsessionio.h" -#include <iostream> - -RequestManager::RequestManager() : _sessionIO(0) -{ - _factory.registerAll(); - _quit = false; -} - - -RequestManager::~RequestManager() -{ - delete _sessionIO; _sessionIO = NULL; - flushWaitingRequest(); -} - -int -RequestManager::exec(int port) -{ - _debug("Request manager waiting TCP session\n"); - try { - _stop = false; - while(std::cin.good() && !_stop) { - - // TCPSessionIO start a thread for the stream socket - { - _sessionMutex.enterMutex(); - _sessionIO = new TCPSessionIO(port); - _sessionMutex.leaveMutex(); - } - - ResponseMessage outputResponse; // TCPStream output line - std::string input; - std::string output; - Request *request; - - _quit = false; - _debug("Initiate a new TCP Session... \n"); - _sessionIO->init(); - - // std::cin.good() is only there to close the server when - // we do a CTRL+D - while(_sessionIO && _sessionIO->good() && std::cin.good() && !_quit) { - - if (_sessionIO->receive(input)) { - request = _factory.create(input); - outputResponse = request->execute(); - - _sessionIO->send(outputResponse.toString()); - - handleExecutedRequest(request, outputResponse); - } // end pop - } // end streaming - - { // session mutex block - _debug("Closing TCP Session... \n"); - _sessionMutex.enterMutex(); - if (_sessionIO) _sessionIO->sendLast(); - delete _sessionIO; _sessionIO = NULL; - _sessionMutex.leaveMutex(); - _debug("TCP Session has closed\n"); - } - - } // end while - - } catch(ost::Socket *e) { - fprintf(stderr, "Exception: %s\n", e->getErrorString()); - } - _debug("Request manager has closed\n"); - return 0; -} - -/** - * Delete the request from the list of request - * or send it into the waitingRequest map - */ -void -RequestManager::handleExecutedRequest(Request * request, const ResponseMessage& response) -{ - if (response.isFinal()) { - delete request; request = NULL; - } else { - ost::MutexLock lock(_waitingRequestsMutex); - if (_waitingRequests.find(request->getSequenceId()) == _waitingRequests.end()) { - // add the requests - _waitingRequests[response.getSequenceId()] = request; - } else { - // we don't deal with requests with a sequenceId already send... - delete request; request = NULL; - } - } -} - -/** - * Remove waiting requests that was not handle by the server - */ -void -RequestManager::flushWaitingRequest() -{ - ost::MutexLock lock(_waitingRequestsMutex); - // Waiting Requests cleanup - std::map<std::string, Request*>::iterator iter = _waitingRequests.begin(); - while (iter != _waitingRequests.end()) { - delete iter->second; iter->second = NULL; - iter++; - } - _waitingRequests.clear(); -} - -/** - * This function is use by extern object - * to send response - */ -void -RequestManager::sendResponse(const ResponseMessage& response) { - _sessionMutex.enterMutex(); - if (_sessionIO) { - _sessionIO->send(response.toString()); - } - _sessionMutex.leaveMutex(); - - // remove the request from the waiting requests list - if (response.isFinal()) { - ost::MutexLock lock(_waitingRequestsMutex); - std::map<std::string, Request*>::iterator iter = _waitingRequests.find(response.getSequenceId()); - - if (iter != _waitingRequests.end()) { - delete iter->second; iter->second = NULL; - _waitingRequests.erase(iter); - } - } -} diff --git a/src/gui/server/requestmanager.h b/src/gui/server/requestmanager.h deleted file mode 100644 index a6f0370611..0000000000 --- a/src/gui/server/requestmanager.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef REQUESTMANAGER_H -#define REQUESTMANAGER_H - -#include <cc++/thread.h> - -#include "sessionio.h" -#include "requestfactory.h" -#include "responsemessage.h" - -/** -@author Yan Morin -*/ -class RequestManager{ -public: - RequestManager(); - - ~RequestManager(); - - int exec(int); - void sendResponse(const ResponseMessage& response); - void quit() { _quit = true; } - void stop() { _stop = true; quit(); } - -private: - void flushWaitingRequest(); - void handleExecutedRequest(Request * request, const ResponseMessage& response); - - RequestFactory _factory; - SessionIO* _sessionIO; - ost::Mutex _sessionMutex; - - // waiting requests - ost::Mutex _waitingRequestsMutex; - std::map<std::string, Request*> _waitingRequests; - - bool _quit; // tell to quit and end the exec loop for one client - bool _stop; // tell to stop the exec loop -}; - -#endif diff --git a/src/gui/server/responsemessage.cpp b/src/gui/server/responsemessage.cpp deleted file mode 100644 index b17174f262..0000000000 --- a/src/gui/server/responsemessage.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "responsemessage.h" -#include <cc++/url.h> - -/** - * Used by isFinal() to check for the first digit - * 2456 Means that 2XX, 4XX, 5XX and 6XX are final messages - */ -const std::string ResponseMessage::FINALCODE = "2456"; - -ResponseMessage::ResponseMessage(const std::string& code, - const std::string& seq, - const std::string& message) : _code(code), _seq(seq) -{ - _message = ""; - appendMessage(message); -} - -/* - * Construct a message with a list of argument - * and a space separator between each argument - */ -ResponseMessage::ResponseMessage(const std::string& code, - const std::string& seq, - TokenList& arg) : _code(code), _seq(seq) -{ - TokenList::iterator iter=arg.begin(); - if (iter!=arg.end()) { - appendMessage(*iter); - iter++; - } - // add space between each - while(iter!=arg.end()) { - _message.append(" "); - appendMessage(*iter); - iter++; - } -} - - -ResponseMessage::~ResponseMessage() -{ -} - -/** - * Prepare and return a message, ready to be send to the client - * @return message that contains: code sequenceId message - */ -std::string -ResponseMessage::toString() const -{ - return _code + " " + _seq + " " + _message; -} - -/** - * Return true when the response message is final (no more coming message for a request) - * Note: the code should be 3 numbers-long. - * @return true if it's the last message of the request - */ -bool -ResponseMessage::isFinal() const -{ - bool final = false; - // only 3 chars code are valid - // code that begin by: 2,4,5,6 are final - - if (_code.size() == 3) { - if ( FINALCODE.find(_code[0]) != std::string::npos ) { - final = true; - } - } - return final; -} - -void -ResponseMessage::appendMessage(const std::string& strToken) -{ - int len = strToken.length(); - if (len) { - char *tmp = new char[len*3+2]; - ost::urlEncode(strToken.c_str(), tmp, len*3+2); - // we don't have to put a '\0' right? - _message.append(tmp); - delete [] tmp; tmp = NULL; - } -} - diff --git a/src/gui/server/responsemessage.h b/src/gui/server/responsemessage.h deleted file mode 100644 index 922e949eca..0000000000 --- a/src/gui/server/responsemessage.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef __RESPONSEMESSAGE_H__ -#define __RESPONSEMESSAGE_H__ - -#include <string> -#include "argtokenizer.h" // for TokenList declare - -/** -Response Message stock a message from a request when it is executed. -@author Yan Morin -*/ -class ResponseMessage -{ -public: - // default constructor with empty seq/code/message - ResponseMessage() {} - // build a constructor with a TokenList - // so that they will be encoded.. - ResponseMessage(const std::string& code,const std::string& seq, const std::string& message); - ResponseMessage(const std::string& code,const std::string& seq, TokenList& arg); - ~ResponseMessage(); - - std::string getSequenceId() const { return _seq; } - - std::string toString() const; - bool isFinal() const; -private: - // append an encoded string to the message - void appendMessage(const std::string& strToken); - - // 3 numbers long code - std::string _code; - std::string _seq; - std::string _message; - - static const std::string FINALCODE; -}; - -#endif diff --git a/src/gui/server/sessionio.cpp b/src/gui/server/sessionio.cpp deleted file mode 100644 index 0e48501c9a..0000000000 --- a/src/gui/server/sessionio.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "sessionio.h" - -SessionIO::SessionIO(int port=0) -{ -} - - -SessionIO::~SessionIO() -{ -} - - diff --git a/src/gui/server/sessionio.h b/src/gui/server/sessionio.h deleted file mode 100644 index 9887050a23..0000000000 --- a/src/gui/server/sessionio.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef SESSIONIO_H -#define SESSIONIO_H - -#include <string> - -/** -Session IO Interface to send and receive requests -Could be over network or locally -@author Yan Morin -*/ -class SessionIO { -public: - SessionIO(int port); - virtual ~SessionIO(); - - virtual void send(const std::string& response) = 0; - virtual void sendLast() = 0; - virtual bool receive(std::string& request) = 0; - virtual bool good() = 0; - virtual void init() = 0; -}; - -#endif diff --git a/src/gui/server/tcpsessionio.cpp b/src/gui/server/tcpsessionio.cpp deleted file mode 100644 index 3cafb2301b..0000000000 --- a/src/gui/server/tcpsessionio.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "tcpsessionio.h" - -const int TCPSessionIO::PORT = 3999; -const char * const TCPSessionIO::IP = "127.0.0.1"; - -TCPSessionIO::TCPSessionIO(int port=PORT) : SessionIO(port) -{ - _clientStream = 0; - ost::InetAddress addr(IP); - - //Creating a listening socket - try { - _serverSocket = new ost::TCPSocket(addr, port); - } catch( ost::Socket *e ) { - throw e; - } -} - - -TCPSessionIO::~TCPSessionIO() -{ - delete _clientStream; _clientStream = NULL; - delete _serverSocket; _serverSocket = NULL; -} - -bool -TCPSessionIO::good() -{ - if (_clientStream) { // just in case - return _clientStream->good(); - } - return false; -} - -void -TCPSessionIO::send(const std::string& response) -{ - if (_clientStream) { // just in case - _clientStream->send(response); - } -} -void -TCPSessionIO::sendLast() -{ - if (_clientStream) { - _clientStream->sendLast(); - } -} - -bool -TCPSessionIO::receive(std::string& request) -{ - bool returnValue = false; - if (_clientStream) { // just in case - returnValue = _clientStream->receive(request); - } - return returnValue; -} - -void -TCPSessionIO::init() { - // this is strange to create a waiting client here... - _clientStream = new TCPStreamPool(*_serverSocket); - _clientStream->start(); -} diff --git a/src/gui/server/tcpsessionio.h b/src/gui/server/tcpsessionio.h deleted file mode 100644 index b8b2cea28e..0000000000 --- a/src/gui/server/tcpsessionio.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef TCPSESSIONIO_H -#define TCPSESSIONIO_H - -#include <cc++/socket.h> -#include "sessionio.h" -#include "tcpstreampool.h" - -/** -@author Yan Morin -*/ -class TCPSessionIO : public SessionIO -{ -public: - TCPSessionIO(int port); - ~TCPSessionIO(); - - void send(const std::string& response); - void sendLast(); - bool receive(std::string& request); - bool good(); - void init(); - -private: - ost::TCPSocket* _serverSocket; - TCPStreamPool* _clientStream; - - static const int PORT; - static const char * const IP; -}; - -#endif diff --git a/src/gui/server/tcpstreampool.cpp b/src/gui/server/tcpstreampool.cpp deleted file mode 100644 index 7afd51e131..0000000000 --- a/src/gui/server/tcpstreampool.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "tcpstreampool.h" - -#define WAITING_TIME 2UL - -TCPStreamPool::~TCPStreamPool() -{ - terminate(); -} - -void -TCPStreamPool::run() { - std::string output; - std::string input; - std::string null = ""; // we don't want empty string - char cr13 = '\r'; // we don't want carriage return in empty line - - while(!testCancel() && good()) { - while (isPending(ost::TCPSocket::pendingInput, WAITING_TIME)) { - std::getline(*this, input); - //_debug("TCPStreamPool getline %s\n", input.c_str()); - if (input != null && input[0]!=cr13) { - _inputPool.push(input); - } - // security check, since we are inside a loop - if (testCancel() || !good()) {break;} - } - if (_outputPool.pop(output, WAITING_TIME)) { - //_debug("TCPStreamPool send %s\n", output.c_str()); - *this << output << std::endl; - } - } -} - -void -TCPStreamPool::send(const std::string& response) -{ - _outputPool.push(response); -} -void -TCPStreamPool::sendLast() { - std::string output; - while (good() && _outputPool.pop(output, WAITING_TIME)) { - *this << output << std::endl; - } -} - -bool -TCPStreamPool::receive(std::string& request) -{ - return _inputPool.pop(request, WAITING_TIME); -} diff --git a/src/gui/server/tcpstreampool.h b/src/gui/server/tcpstreampool.h deleted file mode 100644 index 53db9d3165..0000000000 --- a/src/gui/server/tcpstreampool.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (C) 2005 Savoir-Faire Linux inc. - * Author: Yan Morin <yan.morin@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef TCPSTREAMPOOL_H -#define TCPSTREAMPOOL_H - -#include <string> -#include <cc++/socket.h> - -#include "ObjectPool.hpp" - -/** - * Utilisation: - * TCPSessionIO session = TCPStreamPool(aServer); - * std::string response = "hello"; - * std::string request; - * session.start(); - * session.send(response); - * while(session.receive(request)) { - * std::cout << request << std::endl; - * } - * @author Yan Morin -*/ -class TCPStreamPool : public ost::TCPSession -{ -public: - TCPStreamPool(ost::TCPSocket& server) : ost::TCPSession(server) - { - setCancel(cancelDeferred); - } - ~TCPStreamPool(); - - void run(); - void send(const std::string& response); - void sendLast(); - bool receive(std::string& request); - -private: - ObjectPool<std::string> _outputPool; - ObjectPool<std::string> _inputPool; -}; - -#endif diff --git a/src/main.cpp b/src/main.cpp index a1689e2676..393a466468 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,8 +26,6 @@ #include "global.h" #include "user_cfg.h" -#include "gui/server/guiserver.h" -#include "gui/guiframework.h" #include "dbus/dbusmanager.h" #include "manager.h" diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 8022825615..ade6be7211 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -42,7 +42,6 @@ #include "voiplink.h" #include "user_cfg.h" -#include "gui/guiframework.h" #ifdef USE_ZEROCONF #include "zeroconf/DNSService.h" -- GitLab