Bug 27489

Summary: make a clear distinction between public and internal headers/API
Product: Wocky Reporter: Simon McVittie <smcv>
Component: GeneralAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard: review+
i915 platform: i915 features:

Description Simon McVittie 2010-04-06 07:22:44 UTC
Wocky doesn't currently install any headers at all; Gabble installs all of them.

It would be good to divide the headers into "will-be-public" and internal, in two separate variables or something, to make it easier to install the right ones; similarly, it would be good to prepend _ to the names of extern-but-protected functions.

In a branch to fix the documentation, I've guessed that *-protected.h and wocky-pubsub-helpers.h are meant to be internal to the library.
Comment 1 Simon McVittie 2010-04-06 08:22:48 UTC
(In reply to comment #0)
> In a branch to fix the documentation, I've guessed that *-protected.h and
> wocky-pubsub-helpers.h are meant to be internal to the library.

In fact, they're intended to be public. Underscored functions like _wocky_pubsub_node_handle_event_stanza should probably be moved to a new wocky-pubsub-node-internal.h.
Comment 2 Will Thompson 2012-02-01 08:36:22 UTC
So how about this:

http://cgit.collabora.com/git/user/wjt/wocky/log/?h=headers
http://cgit.collabora.com/git/user/wjt/telepathy-gabble/log/?h=wocky-headers

I cleared up the specific case mentioned here, and add a few #errors to internal-only headers, and grouped all public headers into #include <wocky/wocky.h>.
Comment 3 Simon McVittie 2012-02-01 09:12:00 UTC
Yay! r+

I'd personally also rename heartbeat-source and http-proxy to end with -internal (or -private if you prefer). Your call.
Comment 4 Will Thompson 2012-02-06 06:24:29 UTC
(In reply to comment #3)
> Yay! r+
> 
> I'd personally also rename heartbeat-source and http-proxy to end with
> -internal (or -private if you prefer). Your call.

I merged it as-is.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.