[asterisk-dev] install path of asterisk.h

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Nov 20 12:33:28 CST 2007


Hi, thanks for your quick reply,

On Tue, Nov 20, 2007 at 10:14:02AM -0800, Luigi Rizzo wrote:

> With this in mind, i think we have three type of headers in asterisk
> (i use the current name/location only as a reference, but they might
> well deserve a renaming or relocation):
> 
>  1. those of general use that should be included by a large set of files;
>     these include "asterisk.h", "asterisk/module.h", "asterisk/lock.h"
>     and another small set of files;
> 
>  2. those exporting a very specific API, that a smaller set of files could
>     be interested in. E.g. i think the various speech.h, say.h, rtp.h
>     and so on fall in this second category;
> 
>  3. those for internal use only, whose role is to export prototypes for
>     functions defined in one file and used in another one. Such functions
>     are the various foo_init() etc. (at the moment they are in the same
>     foo.h that exports the API for module foo, but this is a mistake because
>     clients are normally not interested in them).
>     I think these "internal" interfaces should be listed in a small set
>     of header files for system use.
> 
> Clearly the boundary between #1 and #2 is a bit fuzzy but the extremes
> should be relatively clear.
> 
> Accordingly, we could think of putting these files in 3 different
> directories, e.g. #1 in include/asterisk/*h, #2 in include/asterisk/modules/*.h,
> and #3 in include/asterisk/private/*h to make it clear to the developer
> what they are for.

Is there any API provided by Asterisk that is not for modules?

Is there a difference between what in-tree modules should see and what
external modules should see?

Should private includes reside under include/ ? Is there any such
include file that needs to be shared accross directories?

> 
> We could then (probably) spare the installation of #3 files,
> but not of the others. Given the number, we should probably
> install the entire include/asterisk/ and be done with it.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list