Dumpnet and Dumpnodes (in the src/ directory) need to be modified to use straight C glib rather than glibmm (the C++ wrappers).
Known things that need to be done
- Glib::set_application_name becomes g_set_application_name
- Each program needs to include glib.h.
- Nothing should include anything in glibmm.
- Glib::locale_to_utf8(foo) becomes GTKWrap::unicode::from_locale(foo).
- The command-line handling (parse-args() in common.h needs to be modified to use C stuff rather than C++. Basically, Gtk::Option* becomes GtkOption*, and the appropriate C calls used instead of C++. Look at src/goanna/App.cpp for usage of the C API's. The basic set of things the new code needs to do:
- Have a static global array of GOptionEntry structures, like the one in App.cpp, declaring the options instead of the various Glib::OptionEntry setup things in parse_args
- Create a GOptionContext
- Add the array of parameters to the GOptionContext with g_option_context_add_main_entries.
- Parse with g_option_context_parse
- We won't need to try/catch for Glib::OptionError; rather, check to see if the parse call returns true and use its err output variable for error message
Useful links
Notes
This ticket blocks #371.