
alvaro at gnu
Jun 17, 2008, 12:55 AM
Post #2 of 2
(196 views)
Permalink
|
On 17 Jun 2008, at 04:06, Stefan de Konink wrote: > For sake of documentation I have created a start for handler_example.c > (forked from server_info). A module that should be well documented and > shows some patterns for new developers. Good!! The "hello world" example we talked about.. > connection-protected.h:#define CONN_SRV(c) (SRV(CONN(c)->server)) > > Provides some non trivial header magic. But including this file by > itself pulls in *a lot* of other header files. Including > config.h/constants.h > > I managed to get all the header files: > > connection-protected.h > common-internal.h <-- needs update <config.h/constants.h> -> "..." > socket.h > iocache.h > encoder_table.h > header-protected.h > matching_list.h > virtual_server.h > virtual_server_names.h > rule_list.h > config.h > constants.h > > ...obviously cherokee/cherokee.h need to include connection- > protected.h No, it does not. Actually, from an OOP point of view, you must think of the *- protected.h header files as headers that only contains protected and private methods and properties. Thus, it should never be part of the public cherokee API, which is what cherokee/cherokee.h is exporting. Having said that, I acknowledge a few issues about the API that is currently being exported: there are a few private classes and methods for public classes that ought to be exported. Currently, the world around is to include the cherokee headers from the source tree and compile the handler without including <cherokee/ cherokee.h> but the individual header files. But, of course, this is only a temporal work-around. > Sources: > http://xen.bot.nu/cherokee/ > > I hope it would we could get some examples dir in the source tree > containing some useful examples for cherokee development. I would rather create a new independent package for it: "cherokee- hello-world" or something. In that way, we would show the source code and an example on how to compile it. -- Greetings, alo. http://www.alobbs.com/ _______________________________________________ Cherokee mailing list Cherokee[at]cherokee-project.com http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
|