gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 6/8] Refactor devices build


From: Ladislav Michl
Subject: Re: [PATCH v2 6/8] Refactor devices build
Date: Mon, 13 Jan 2020 22:46:12 +0100

On Mon, Jan 13, 2020 at 07:52:20PM +0100, Pawel Kot wrote:
> Hi,
> 
> On Tue, Dec 4, 2018 at 10:32 PM Ladislav Michl <address@hidden> wrote:
> > Remove #ifdefs from device drivers and compile them only when
> > selected. Once there, move device detection code in configure.ac
> > to live in one place.
> 
> I'm fine with the overall logic but there are some bits that I do not like.
> 
> >  common/devices/osxbluetooth.m                 |   8 +-
> 
> Why .m?

It is Objective-C file.

> > +#else
> > +
> > +int bluetooth_open(const char *addr, uint8_t channel, struct
> gn_statemachine *state)
> > +{
> > +       return -1;
> > +}
> > +
> > +int bluetooth_close(int fd, struct gn_statemachine *state)
> > +{
> > +       return -1;
> > +}
> > +
> > +int bluetooth_write(int fd, const __ptr_t bytes, int size, struct
> gn_statemachine *state)
> > +{
> > +       return -1;
> > +}
> > +
> > +int bluetooth_read(int fd, __ptr_t bytes, int size, struct
> gn_statemachine *state)
> > +{
> > +       return -1;
> > +}
> > +
> > +int bluetooth_select(int fd, struct timeval *timeout, struct
> gn_statemachine *state)
> > +{
> > +       return -1;
> > +}
> > +
> > +#endif
> 
> This I really do not like and would like to avoid having it in the header
> files.

I took pramatic approach here. This path serie is direct result of patch
by Fabrizio Gennari from 06 Mar 2016 (!) and while I would prefer having
proper plugin architecture, I decided to keep amount of changes reasonable.

We can have 'struct device_ops' later at some point, but we are not there
and I definitely do not want to change architecture at this point.

        ladis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]