> /*
> * This is a primitive vision of what a section of
> * gnut_lib may look like. It is intended to spark ideas and
> * conversation and spur progress toward gnut_lib and eventual
> * gui/core separation.
> *
> * There is an important distinction between this and the current
> * downloads.h file in that it refers to a download as a 1-1
> * connection with a server. This file assumes that a download
> * occurs for a particular file, so gnut_download_new could
> * start several independent connections or downloads each
> * fetching a piece of the file refered to by gnut_query_atom_t.
> * gnut_download_source_t refers to a particular source which is
> * serving the file or a part of it.
> *
> * gnut_download_t refers to a particular download for
> * some_file.x, sha1, and may use several gnut_download_source's
The following will give you an overview over current nomenclature and
your suggestions:
Current name New name
-------------------------------------------------------------------------
gnet_fi_t (gnet.h) gnut_download_atom_t
-- gnut_server_atom_t
gnet_fi_info (gnet.h) gnut_download_t
gnet_search_t (gnet.h) gnut_query_atom_t
struct download (download.h) gnut_download_source_t
<-- this is not in gnet.h because downloads have not been split into
gui/core parts!
Essentially:
- what you call "sources" is "downloads" in gtkg.
- what you call "downloads" is "fileinfo" in gtkg.
I suggest that you stick to this nomenclature and read the source more
carefully. If you start changing this nomenclature unless you have fully
understood how gtkg works internally, you will end up in big big
trouble.
When you take the time to actually read gnet.h, you will also see that
for most datastructures there are two structs, e.g.:
gnet_upload_status
gnet_upload_info
This is because the values associated with e.g. "uploads" change with
different rates
The _info structure contains data that does seldomly change (if at all)
and normally only has to be transferred to the gui once.
upload_get_info([snip])
upload_free_info([snip]) <= convenient because gnet_upload_info_t has
complex structure
The core can notify the gui that information in this structure has
changed and needs to tbe updated in the gui. For that there are the
calls in gnet.h:
upload_add_upload_info_changed_listener([snip])
upload_remove_upload_info_changed_listener([snip])
The _status structure contains data that does often change and is polled
by the gui. The core does not notify the gui about updates here. The gui
is required to fetch this information from the core when needed using
upload_get_status([snip])
Please do work with the code more before you suggest to redefine the API
and rename gtkg concepts. If you have any questions regarding the gnet.h
API, ask me. It was intended to be what you would now call gnut_lib.h. I
strongly suggest that you continue to work in the direction outlined
there to get forward quickly instead of starting the whole thing all
over again.
Finally: if you would like me to shut up and just let you people do,
tell me.
Regards
--
Richard Eckart <[EMAIL PROTECTED]>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel