[rs-devel] Re: [Litestep] dev: mod_ctl: kudos and user sanity
Status: Beta
Brought to you by:
obada
From: Kevin S. <ksc...@ke...> - 2002-01-28 18:30:36
|
I agree with the basic idea of having modules provide info in a structured way without the need to load the module -- but I disagree with making a single do-everything function. All we need is a simple GetModuleInfo function that fills in a LSMODULEINFO struct. Just as easy for the mod coders and doesn't require the shell parse the output. -- Maduin ----- Original Message ----- From: "Mudiaga Obada" <ob...@in...> To: "Rs D Ml" <ret...@li...> Cc: "litestep ls ml" <lit...@li...>; "Purels ML" <pu...@li...> Sent: Saturday, January 26, 2002 6:07 AM Subject: [Litestep] dev: mod_ctl: kudos and user sanity I think it would be nice see modules support a new (and optional) function that does a variety of useful things. One example of such a thing is what I think most people would also like to see: - Display useful information about the module. - module name (full name) - authors - maintainer (who built it) - version - release date, build date, etc - module homepage - url-to-go-for-help (email:x@y.org, http://y.org/x/, etc) - license (cough! cough!!) (e.g. "GPL", "BSD", "GPL5 (http: if not OSI approved), ..." This (mostly optional) information need only be made availabe to Litestep. What Litestep does with this information is its business. However, much of what can be done should be obvious. Now to the implementation (the programming): I would like developers comment on this so that everybodys wishes be taken care of. Of course that does not include those whos needs can never be satisfied. As to this being inappropriate for this list, I have already mentioned to jugg (on purels ML) that litestep-devel@sourcefourge should be created. And have all devels subscribe to it. Currently litestep, uses LM_GETREVID which apart from being lacking requires the module to CreateWindow(). The new callback API which the module provides should be simple for module writers, but generic and be able to do everything the future might require (think FreeBSD sysctl): Now here's what I currently have in mind, and will do for retro if I get no input: LSAPI const char * mod_ctl(const char * command, const char * command_param, char * command_data); + as for the module information mentioned above, Litestep will call it like this, mod_data = mod_ctl("about", NULL, NULL); and a module will do if command == "about" then return "MODULE_SIGNATURE: some-one-line-junk-can-go-here \n" \ "name: moduel request\n" \ "desc: This module solves all your computer problems\n" \ "module: moduel.dll\n" \ "author: george at ojai.net\n" \ "version: 256.5\n" \ "license: BSD"; elseif command == "something_else" then do_something_else(); else return NULL; /* only requirement */ endif Even module databases can use this text format for feeding module information into their database. "MODULE_SIGNATURE": it is not just for sanity check. If a module can't be loaded at all, a user can just open the binary in a text editor and search for that string to obtain the needed information. Other apps can also do magic with it... Note: please keep the retrostep-devel CC: in place. Note: when I say "litestep", I mean ls-b24 by lsdev. And when I say "Litestep", I mean litestep and more-or-less compatibles. --------------------------------------------------------------------- Can't Unsubscribe? Check http://desktopian.org/listunsub.html LS List Homepage: http://wuzzle.org/list/litestep.php Get the LS FAQ: http://floach.pimpin.net/lsfaq |