On Thu, Jul 29, 2010 at 1:28 AM, Stephen Houston <unixti...@gmail.com> wrote: > On Wed, Jul 28, 2010 at 8:23 PM, Stephen Houston <unixti...@gmail.com> > wrote: >> >> >> On Wed, Jul 28, 2010 at 8:18 PM, Gustavo Sverzut Barbieri >> <barbi...@profusion.mobi> wrote: >>> >>> On Wed, Jul 28, 2010 at 10:05 PM, Stephen Houston <unixti...@gmail.com> >>> wrote: >>> > On Wed, Jul 28, 2010 at 6:33 PM, Gustavo Sverzut Barbieri >>> > <barbi...@profusion.mobi> wrote: >>> >> >>> >> On Wed, Jul 28, 2010 at 7:12 PM, Enlightenment SVN >>> >> <no-re...@enlightenment.org> wrote: >>> >> > Log: >>> >> > Add the ability to perform standard IO operations on a file in a >>> >> > thread. >>> >> > +#define EIO_FILE_MOD_TIME 1 >>> >> > +#define EIO_FILE_SIZE 2 >>> >> > +#define EIO_FILE_EXISTS 4 >>> >> > +#define EIO_FILE_IS_DIR 8 >>> >> > +#define EIO_FILE_CAN_READ 16 >>> >> > +#define EIO_FILE_CAN_WRITE 32 >>> >> > +#define EIO_FILE_CAN_EXECUTE 64 >>> >> >>> >> You should provide some EIO_FILE_STAT, to return the whole stat >>> >> result, maybe that is more useful than doing it separated for size, >>> >> exists... you can leave what you did, but also provide the generic >>> >> function as people will consult more than one property at time. >>> > >>> > I left that out because you can specify as many of the operations as >>> > you >>> > want anyway. >>> >>> You force people to define many callbacks, or one with a big switch >>> that is called multiple times. Still you don't provide other stat >>> information that may be useful, like owner, mode... >>> >> Right. What I put in now just covers what was in ecore_file. With it >> being the flag style, it is obviously intended to grow in capabilities :) >> I think a full stat flag is reasonable and I will add it. >>> >>> >> Also, why not make it an enum? >>> > >>> > It was an enum originally, but cedric thought bit flags would be >>> > better. >>> >>> BAD cedric ;-) >> >> >> I tend to agree with Cedric though. Enums are intended to be used as >> states or single options. Bit flags are better for specifying multiple >> flags. > > In fact after talking with several people in #edevelop, bit flags seem to be > the consensus.
Well, Evas and others do use enum for such, and if you keep enum with explicit bitwise values, it does help. You can refer to the enum typedef name, gdb can help most of the times, etc. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel