Hi, I'm committed the separation patch finally. I think we worked out
most of the issues with it.
Explanations on what I did with it can be found in devguide
(GUICORE_SPLIT). Below I've listed some of the problems I see with it
as it stands (this is in the devguide/GUICORE_SPLIT file btw, but just
in case y'all don't have time to read it).
Emile
***
- filenames: I renamed the interface function prefixes as per irc
discussions to "guc_" for ui->core calls and "gcu_" for core->ui calls.
I didn't change the filenames (except to make "gui" into "ui"). I can
change these later if we feel we need to and we think of a better name.
- file.h/c depends on ban.h (or it did before this patch).
This is only for one function call (ban_reclaim_fd()). The reason file.c
includes ban.h is that when we try to get a new file descriptor and it
fails, we then try to grab a file descriptor that we have been using for
keeping banning lists (I don't know the details of ban.c). The problem is
ban.c depends on the core so cannot be included in the common libraries
(ie. the ui can't include it without then depending on core files). We
could remove this functionality. Dismiss it as a rare case (I don't know if
it is) and just remove the dependency. For now this is what I've done (I
just commented out and notated the function call with a FIXME).
There's probably a better solution but I don't know what it is.
- gnet.h and the files it includes were a big step towards ui/core separation.
These files don't directly depend on the ui or core as far as I can tell.
However,
they have function prototypes (which is against my separation rules, listed in
devguide)
and the function implementations are contained in the core files. This is
not what I wanted to accomplish in my patch. I'm not sure where this will
eventually go, but for now the gnet_*** files (aside from gnet_stats) are
going to be strange until we sort it out. They basically contain the
function prototypes as before as well as an include to a matching
ui_core_interface_***_defs file that contains the #defines, structs, etc.
- I don't know what to put for the ID and copyright information at the top of
new files (all the new files begin with "ui_core_interface" at this point).
I just put "FILL_IN_EMILES_BLANKS" at the top of the defs files
so hopefully it will be easy to replace it with the appropriate information.
- Just something I noticed. We may want to rename filter.h/c, icon.h/c and
drop.h/c so that they are more obviously "gui" files.
- We should separate the source files into ui, core, interface,
and common directories. I think ram is working on this.
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel