Avahi Support on Linux

Siqi Liu me at siqi.fr
Sat Jan 25 16:19:39 PST 2014


Hello again,

It seems to me that I still need to include those avahi headers, but how
can we be sure that these headers are there? By copying them into our
codebase? Is that compatible with our license? (LGPL for Avahi)

Thanks for you answers and sorry for the spam, I'm totally new to these
dlopen solution ...

Siqi


On Fri, Jan 24, 2014 at 10:51 PM, Siqi Liu <me at siqi.fr> wrote:

> Hello Caolan, Tor,
>
> I've done some research and I've more or less understood how it works now.
>
> Now, with Avahi, I am supposed to use dlsym to import several functions
> from libavahi-client.so.3 and libavahi-common.so.3 during the runtime.
> However, the dlsym should return a pointer to the function which, in order
> to be used, need to be casted with correct return type/argument types. The
> problem is, these types are declared in the shared object and I still don't
> have access to them.
>
> 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<http://avahi.org/download/doxygen/client_8h.html#a3d65e9ea7182c44fa8df04a72f1a56bb>
> * avahi_client_new<http://avahi.org/download/doxygen/client_8h.html#a07b2a33a3e7cbb18a0eb9d00eade6ae6>
> (const AvahiPoll<http://avahi.org/download/doxygen/struct_avahi_poll.html>
>  * poll_api, AvahiClientFlags<http://avahi.org/download/doxygen/client_8h.html#a46a797e5d352f6f98261834ae3b1a3ed>
>   flags,AvahiClientCallback<http://avahi.org/download/doxygen/client_8h.html#a24ece0cd8c27c269a1ddd3cf3acf6444>
>   callback,void * userdata, int * error  )
>
> Am I on the right track ? Any help or link to some tutorials would be
> appreciated!
>
> Thanks!
> Siqi
>
>
> On Thu, Jan 9, 2014 at 4:57 PM, Caolán McNamara <caolanm at redhat.com>wrote:
>
>> On Tue, 2014-01-07 at 15:31 +0100, Siqi Liu wrote:
>> > Tor pushed a quick fix for that and disabled avahi temporarily so that
>> > it doesn't get compiled unless specified. I'm thinking of fixing that
>> > but not sure how to load Avahi dynamically depending on the presence
>> > of Avahi library on the distribution.
>> >
>> > Any pointers on how to achieve that?
>>
>> We've done stuff like this plenty of times in the past. One current one
>> is sc/source/core/opencl/clcc.cxx see the dlopen, dlsym hackery.
>>
>> C.
>>
>>
>
>
> --
> --------
>
> Cordialement,
> Siqi LIU
>
> Étudiant Ingénieur, 1ère année
> École Supérieur d'Électricité (Supélec)
>
>


-- 
--------

Cordialement,
Siqi LIU

Étudiant Ingénieur, 1ère année
École Supérieur d'Électricité (Supélec)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140126/360ba415/attachment.html>


More information about the LibreOffice mailing list