Re: Support for ACLs/non Unix style permissions in gnome-vfs



Quoting Nils Philippsen <nils wombat dialup fht-esslingen de>:

> On Fri, 2002-08-09 at 19:16, snickell stanford edu wrote:
> > Quoting Nils Philippsen <nils redhat de>:
> [...]
> > > And while I'm at it: ABI compatibility is nice, I have some ideas
> how
> > > to
> > > keep programs that use the existing
> GnomeVFSFileInfo::permissions
> > > working while allowing (with a #define) programs to use the new
> API
> > > as
> > > well. That would require a bit of #define-trickery, ok to do it?
> > 
> > The reserved members are there to preserve ABI compatibility, no
> need
> > for #defines. If you just use one of the reserved members without
> > changing its type (it should be a void * right now) you won't have
> any
> > ABI problems I think.
>
> What I had in mind was along the lines of having to set e.g.
> GNOME_VFS_ENABLE_NEW_ACL_API in the current version to be able to
> use
> the new API, barring access to GnomeVFSFileInfo::permissions (and
> vice
> versa). I want to prevent that one program uses both APIs (which is
> probable in a reasonably large project).

I'd rather not do this. We can mark the permissions object as deprecated
in later releases, but for now lets allow for both. Hopefully major
clients such as Nautilus will switch primarily to the new interface, but
a little mix-and-match won't hurt anyone too much, and when we
officially deprecate the old permissions interface it shouldn't be too
hard to clean out the existing instances.

> In the case of the new API, I wouldn't want the permissions object to
> be
> a void *, though, but a correctly typed pointer. That shouldn't be a
> problem as the size of pointers doesn't depend on the type they're
> pointing to.

Exactly. I was just saying that you probably shouldn't change one of the
void *s to, say, an integer. Pointers are pointers :-)

-Seth



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