[EMAIL PROTECTED] writes:

 > Sounds to me like its time for plugins.  My back-of-the-envelope design
 > for this would look something like this:
 > 
 > -- compile the palm-link code as a separate, optional .o
Statically linking in the actual palm-link library into this .o?

 > -- put this .o into ~/.gnucash/plugins or something like that
 > -- when gnucash starts up, it scans a config file, and this plugin
 >    directory for .o's, attempting to load them.  If they load, your
 >    golden, else its a non-fatal error, maybe spitting out a warning
 >    and maybe not even that. 
 > 
 > The plugin should have three mandatory functions:
 > -- (*gnc_plugin_init)()        
 > -- gncBoolean (*gnc_can_unload)()
 > -- (*gnc_plugin_free)()
 > 
 > The plugin code will call (*gnc_plugin_init)() when the palm-link code
 > is loaded.  Then the palm link code can do whatever.  Then,
 > when user goes to exit gnucash, the plugin code then:
 >    while (1) {
 >        if (true == (*gnc_can_unload)()) { (*gnc_plugin_free)(); break; }
 >    }
 > or something like that.
 > 
What happens if gnc_can_unload keeps returning false because of a bug
in the plugin code?

 > All that we need is for someone to write the code that uses dlopen()
 > to figure out if the .o is loadable & etc.
 > 

Won't we need to provide a few hooks so plugins can get themselves
attached to the menu bar etc, or do these already exist?

-- 
---------------------------------------------------------------------------
Robert Merkel                                               [EMAIL PROTECTED]

What a strange game.  The only winning move is not to play.
                -- WOP, "War Games"
---------------------------------------------------------------------------

--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to