mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 16:09:20 +00:00
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@1 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
70 lines
1.5 KiB
C
70 lines
1.5 KiB
C
/*
|
|
* Initial main.c file generated by Glade. Edit as required.
|
|
* Glade will not overwrite this file.
|
|
*/
|
|
|
|
|
|
#include "linphone.h"
|
|
|
|
|
|
/*
|
|
#include "../osipua/src/dbgalloc.h"
|
|
|
|
GMemVTable dbgtable={
|
|
smalloc,
|
|
srealloc,
|
|
sfree,
|
|
scalloc,
|
|
smalloc,
|
|
srealloc
|
|
};
|
|
*/
|
|
LinphoneCore core;
|
|
LinphoneGnomeUI ui;
|
|
static int verbose=0;
|
|
struct poptOption linphone_options[2]={
|
|
{
|
|
longName: "verbose",
|
|
shortName: '\0',
|
|
argInfo: POPT_ARG_NONE,
|
|
arg : (void*)&verbose,
|
|
val : 0,
|
|
descrip: "log to stdout some debug information while running.",
|
|
NULL
|
|
},
|
|
POPT_TABLEEND
|
|
};
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
void *p;
|
|
|
|
//g_log_set_fatal_mask("GLib",G_LOG_LEVEL_WARNING);
|
|
//g_mem_set_vtable(glib_mem_profiler_table);
|
|
//g_mem_set_vtable(&dbgtable);
|
|
#ifdef ENABLE_NLS
|
|
p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
|
if (p==NULL) perror("bindtextdomain failed");
|
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
|
textdomain (GETTEXT_PACKAGE);
|
|
#else
|
|
printf("NLS disabled.\n");
|
|
#endif
|
|
|
|
gnome_program_init ("linphone", LINPHONE_VERSION, LIBGNOMEUI_MODULE,
|
|
argc, argv,
|
|
GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR,
|
|
GNOME_PARAM_POPT_TABLE,&linphone_options,NULL);
|
|
|
|
if (verbose) linphone_core_enable_logs(stdout);
|
|
else linphone_core_disable_logs();
|
|
linphone_gnome_init(&ui,&core);
|
|
linphone_gnome_ui_show(&ui);
|
|
gtk_main ();
|
|
gdk_threads_leave(); /* it appears that the gdk lock is hold while exiting from gtk_main() */
|
|
linphone_gnome_uninit(&ui);
|
|
//g_mem_profile();
|
|
exit(0);
|
|
return 0;
|
|
}
|