On Wednesday, 28 October 2015 at 16:04:52 UTC, Vincent R wrote:
Hi,

I am starting my first project in D and I would like to do a Bonjour(Zeroconf) browser app. My first task is to write a binding to the dns_sd library but I have an issue with the following macro:

#define kDNSServiceOutputFlags (kDNSServiceFlagsValidate | kDNSServiceFlagsValidateOptional | kDNSServiceFlagsMoreComing | kDNSServiceFlagsAdd | kDNSServiceFlagsDefault)

It justs takes some enum (defined above but not shown here) and do a OR operation on it.

How can I express that in D ?

Do I need to use a template as shown here http://wiki.dlang.org/D_binding_for_C or a varg function ?

Thanks

enum kDNSServiceOutputFlags = (kDNSServiceFlagsValidate | kDNSServiceFlagsValidateOptional | kDNSServiceFlagsMoreComing | kDNSServiceFlagsAdd | kDNSServiceFlagsDefault);

Good luck :)

Reply via email to