Just to elaborate on the idea, this would give a mechanism similar to java
imports.

If FreeRDP was written in Java, we would have something that looks like
this:

import freerdp.utils.* <-> #include <freerdp/utils.h>
import freerdp.utils.semaphore <-> #include <freerdp/utils/semaphore.h>

import freerdp.gdi.* <-> #include <freerdp/gdi.h>
import freerdp.gdi.color <-> #include <freerdp/gdi/color.h>

On Wed, Mar 16, 2011 at 9:05 PM, Marc-André Moreau <
marcandre.mor...@gmail.com> wrote:

> Hi Mads,
>
> On Wed, Mar 16, 2011 at 2:32 PM, Mads Kiilerich <m...@kiilerich.com>wrote:
>
>> On 03/16/2011 06:35 PM, Marc-André Moreau wrote:
>>
>>>    I am also not a big fan of having one big header file for everything
>>>    in the library. I would prefer to have include/freerdp/utils/*.h for
>>>    everything libfreerdputils.
>>>
>>>
>>> What about what you just proposed, with include/freerdp/utils.h that
>>> includes the headers from include/freerdp/utils/*.h?
>>>
>>
>> That is what I don't like, but if you like it then go ahead.
>>
>> Utils will contain different stuff that don't have much in common - only
>> that it might be useful in different places and don't have much in common
>> with anything else.
>>
>
> Ok, you have a point
>
>>
>> I thus don't see much relevance of having one utils.h with everything.
>> Most references to utils should for example not even see the known_hosts
>> parser. utils.h would be a bit like windows.h - very convenient when I don't
>> know what I'm doing, but not very helpful for understanding the architecture
>> and API or browsing header files.
>>
>> On the other side I think the other libraries (perhaps only libfreerdp?)
>> have too many header files. Our other libraries each provides one API with
>> one purpose. Making many header files available just adds confusion. Some of
>> them could perhaps be moved to a "internal" or "bits" subfolder.
>>
>
> Maybe we can deal with the problem this way:
>
> each "package" or library gets its folder in include/freerdp. For instance,
> we would have:
>
> include/freerdp
> include/freerdp/utils
> include/freerdp/chanman
> include/freerdp/gdi
> include/freerdp/kbd
>
> Each of those "packages" would have a "global" header file, like this:
>
> include/freerdp.h
> include/freerdp/utils.h
> include/freerdp/chaman.h
> include/freerdp/gdi.h
> include/freerdp/kbd.h
>
> where each of those "global" headers would include all of the headers
> within the associated subdirectory. Am I making sense? I'm just trying to
> think of a cleaner way to organize things.
>
>
>> /Mads
>>
>
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to