GNOME Bugzilla – Bug 630736
Don't depend on Pulseaudio in "public" headers
Last modified: 2010-10-19 14:58:10 UTC
For bug 629455 in gnome-shell
Created attachment 171211 [details] [review] Don't depend on Pulseaudio in "public" headers This makes it possible to copy portions of the gnome-volume-control sources code and introspect it without requiring an introspected PulseAudio dependency.
Review of attachment 171211 [details] [review]: ugh.. Can we have something more explicit and less intrusive? Adding one fake header instead of "#ifdef foopulseaudiofoo" in different files? It could also be a bit easier to maintain fake declarations in only one file. #ifdef WITH_INTROSPECTION # include "pulseaudio-fake.h" #else # include <pulse/pulseaudio.h> #endif
Created attachment 172632 [details] [review] Don't depend on Pulseaudio in "public" headers This makes it possible to copy portions of the gnome-volume-control sources code and introspect it without requiring an introspected PulseAudio dependency.
(In reply to comment #2) > Review of attachment 171211 [details] [review]: > > ugh.. Can we have something more explicit and less intrusive? Adding one fake > header instead of "#ifdef foopulseaudiofoo" in different files? It could also > be a bit easier to maintain fake declarations in only one file. > > #ifdef WITH_INTROSPECTION > # include "pulseaudio-fake.h" > #else > # include <pulse/pulseaudio.h> > #endif It's not quite as straight-forward as that. You still need to include the real pulseaudio headers for the library to compile and work. The latest is a bit cleaner, and doesn't depend on a weirdly named implementation #define.
Note for self, mention Giovanni's help with adding the necessary introspection annotations in the commit log.
Attachment 172632 [details] pushed as 8ad93e5 - Don't depend on Pulseaudio in "public" headers