#49124 Clean header files
Opened 2 years ago by firstyear. Modified 2 years ago

In the server our header files are a bit hectic. We have 192 headers, distributed through out the tree. 32 of these are in the server core itself.

However, even the ones in the server core, often have a reliance on headers and parts outside of the core, such as cert.h in ldaputil, or ssl.h from nss. We have plugins that reference slap.h, It's hard to trace structures, our definitions are all over the place.

I want to propose a header cleanup, that structures our headers in the following way.

  • slapi-plugin.h - Public api for plugin version 1 to 3
  • slapi-plugin-v4.h - Public API for future plugin version 4
  • slapi-private.h - Semi-private functions. Used for DS internal plugins, but not supported to the public.
  • slapi-private-v4.h - Semi-private functions for future plugins. Used for DS internal plugins, but not supported to the public.
  • slapd-internal.h - Fully private components that only libslapd should be able to use.
  • slapd-internal-<func>.h - Fully private internal component for libslapd. For example, slapd-internal-pw.h would be in this category.

This would allow us to very clearly identify what is and isn't supported, we have clearer barriers of abstraction.

If you find yourself in a situation saying "I need something from slapi-internal-x.h", then we need to expose this in slapi-private or slapi-public properly instead of pulling in the header! This will also guide us when we change symbol visibility of libslapd.


Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: FUTURE

2 years ago

Metadata Update from @firstyear:
- Issue close_status updated to: None
- Issue tagged with: Complex, Investigate

2 years ago

Login to comment on this ticket.

Metadata