Skip to content
Snippets Groups Projects
Commit 96bbda4e authored by yanmorin's avatar yanmorin
Browse files

Patch to integrate a text server
--enable-maintener to play with it
parent b23eb4d3
No related branches found
No related tags found
No related merge requests found
SUBDIRS = utilspp stund src skins rings pixmaps
......@@ -179,7 +179,8 @@ src/audio/pacpp/source/Makefile \
src/audio/pacpp/source/portaudiocpp/Makefile \
src/gui/Makefile \
src/gui/qt/Makefile \
src/zeroconf/Makefile
src/gui/server/Makefile \
src/zeroconf/Makefile \
utilspp/Makefile \
utilspp/functor/Makefile \
utilspp/singleton/Makefile \
......
......@@ -17,13 +17,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define GUI_QT // remove when others UI are implemented
#include "user_cfg.h"
#if defined(GUI_QT)
#if defined(ENABLE_MAINTENER)
# include "gui/server/guiserver.h"
#elif defined(GUI_QT)
# include <qapplication.h>
# include "gui/qt/qtGUImainwindow.h"
#elif defined(GUI_TEXT1)
# error "GUI_TEXT1 not implemented yet."
#elif defined(GUI_COCOA)
# error "GUI_COCOA not implemented yet."
#endif
......@@ -40,7 +40,25 @@ main (int argc, char **argv) {
Config::setTree(new ConfigurationTree());
GuiFramework *GUI;
#if defined(GUI_QT)
#if defined(ENABLE_MAINTENER)
{
Manager::instance().initConfigFile();
try {
Manager::instance().init();
}
catch (...) {
std::cerr <<
"An unknown exception occured when initializing the system." <<
std::endl;
}
GUI = new GUIServer();
Manager::instance().setGui(GUI);
exit_code = ((GUIServer*)GUI)->exec();
Manager::instance().terminate();
delete GUI;
}
#elif defined(GUI_QT)
{
QApplication a(argc, argv);
Manager::instance().initConfigFile();
......@@ -66,9 +84,10 @@ main (int argc, char **argv) {
a.setMainWidget((QtGUIMainWindow*)GUI);
exit_code = a.exec();
Manager::instance().terminate();
#endif
}
#endif
return exit_code;
}
......
......@@ -46,7 +46,6 @@
#include "configuration.h"
#include "configurationtree.h"
#include "error.h"
#include "sipvoiplink.h"
#include "user_cfg.h"
#include "voIPLink.h"
#include "gui/guiframework.h"
......@@ -148,8 +147,11 @@ ManagerImpl::init (void)
_voIPLinkVector.at(DFT_VOIP_LINK)->init();
if (_voIPLinkVector.at(DFT_VOIP_LINK)->checkNetwork()) {
// If network is available
if (get_config_fields_int(SIGNALISATION, AUTO_REGISTER) == YES and
_exist == 1) {
if (registerVoIPLink() != 1) {
......@@ -157,6 +159,7 @@ ManagerImpl::init (void)
}
}
}
}
void ManagerImpl::terminate()
......
......@@ -20,7 +20,6 @@
#ifndef __USER_CFG_H__
#define __USER_CFG_H__
//#define GUI_TEXT1
#define GUI_QT
#include <stdlib.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment