Diff
Modified: freeswitch/trunk/contrib/jmesquita/FSPhone/FSPhone.pro (16120 => 16121)
--- freeswitch/trunk/contrib/jmesquita/FSPhone/FSPhone.pro 2010-01-02 17:52:07 UTC (rev 16120)
+++ freeswitch/trunk/contrib/jmesquita/FSPhone/FSPhone.pro 2010-01-02 18:37:31 UTC (rev 16121)
@@ -27,5 +27,6 @@
mod_qsettings/mod_qsettings.cpp
HEADERS += mainwindow.h \
fshost.h \
- call.h
+ call.h \
+ mod_qsettings/mod_qsettings.h
FORMS += mainwindow.ui
Modified: freeswitch/trunk/contrib/jmesquita/FSPhone/fshost.cpp (16120 => 16121)
--- freeswitch/trunk/contrib/jmesquita/FSPhone/fshost.cpp 2010-01-02 17:52:07 UTC (rev 16120)
+++ freeswitch/trunk/contrib/jmesquita/FSPhone/fshost.cpp 2010-01-02 18:37:31 UTC (rev 16121)
@@ -1,6 +1,7 @@
#include <QtGui>
#include "fshost.h"
#include "call.h"
+#include "mod_qsettings/mod_qsettings.h"
/* Declare it globally */
FSHost g_FSHost;
@@ -40,7 +41,7 @@
}
/* Load our QSettings module */
- if (switch_loadable_module_load_module("", "mod_qsettings", SWITCH_FALSE, &err) != SWITCH_STATUS_SUCCESS)
+ if (switch_loadable_module_build_dynamic("mod_qsettings",mod_qsettings_load,NULL,mod_qsettings_shutdown,SWITCH_FALSE) != SWITCH_STATUS_SUCCESS)
{
printf("Something went wrong when loading our QSettings module\n");
}
Modified: freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.cpp (16120 => 16121)
--- freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.cpp 2010-01-02 17:52:07 UTC (rev 16120)
+++ freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.cpp 2010-01-02 18:37:31 UTC (rev 16121)
@@ -30,11 +30,12 @@
* Module to load configurations from Qt preference system QSettings
*
*/
-#include <switch.h>
-SWITCH_MODULE_LOAD_FUNCTION(mod_qsettings_load);
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_qsettings_shutdown);
+#include "mod_qsettings/mod_qsettings.h"
+
+/*
SWITCH_MODULE_DEFINITION(mod_qsettings, mod_qsettings_load, mod_qsettings_shutdown, NULL);
+*/
struct xml_binding {
@@ -63,8 +64,7 @@
return NULL;
}
-#define ENABLE_PARAM_VALUE "enabled"
-static switch_status_t do_config(void)
+/*static switch_status_t do_config(void)
{
char *cf = "qsettings.conf";
switch_xml_t cfg, xml, bindings_tag, binding_tag, param;
@@ -107,25 +107,26 @@
switch_xml_free(xml);
return x ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
-}
+}*/
SWITCH_MODULE_LOAD_FUNCTION(mod_qsettings_load)
{
/*switch_api_interface_t *qsettings_api_interface;*/
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ *module_interface = switch_loadable_module_create_module_interface(pool, "mod_qsettings");
memset(&globals,0,sizeof(globals));
globals.pool = pool;
- if (do_config() == SWITCH_STATUS_SUCCESS) {
+/* if (do_config() == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Binding worked!");
} else {
return SWITCH_STATUS_FALSE;
}
+*/
-
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "We loaded mod_qsettings.\n");
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
Added: freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.h (0 => 16121)
--- freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.h (rev 0)
+++ freeswitch/trunk/contrib/jmesquita/FSPhone/mod_qsettings/mod_qsettings.h 2010-01-02 18:37:31 UTC (rev 16121)
@@ -0,0 +1,9 @@
+#ifndef MOD_QSETTINGS_H
+#define MOD_QSETTINGS_H
+
+#include <switch.h>
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_qsettings_load);
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_qsettings_shutdown);
+
+#endif // MOD_QSETTINGS_H