Avahi Support on Linux

Caolán McNamara caolanm at redhat.com
Wed Jan 29 03:09:23 PST 2014


On Fri, 2014-01-24 at 22:51 +0100, Siqi Liu wrote:
> 
> For example, I can dlsym this function and get the void * to it, but
> how can I use it if I don't have access to the struct AvahiClient
> (declaired in the shared object)?
> AvahiClient* avahi_client_new
> (
> const AvahiPoll * 
> poll_api,
> 
> 
> AvahiClientFlags 
> flags,
> 
> 
> AvahiClientCallback 
> callback,
> 
> 
> void * 
> userdata,
> 
> 
> int * 
> error 
> 
> 

Well, it depends on usage if you can get away with including the
headers. e.g. if you just need to manipulate the returned thing through
a pointer to it and dlsymed functions then you can just shove e.g.
typedef struct _AvahiClient AvahiClient;
into your .cxx and that'll work.

e.g. see vcl/unx/gtk/window/xid_fullscreen_on_all_monitors.c for an
example

Is the code using avahi_client_new that you want to make runtime
optional already in LibreOffice or is it new code you want to add ?

C.



More information about the LibreOffice mailing list