Re: Plans for gnome-vfs replacement
- From: Philip Van Hoof <spam pvanhoof be>
- To: Alexander Larsson <alexl redhat com>
- Cc: Paolo Borelli <pborelli katamail com>, "gtk-devel-list gnome org" <gtk-devel-list gnome org>, Paolo Maggi <paolo gnome org>, "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>
- Subject: Re: Plans for gnome-vfs replacement
- Date: Sun, 24 Sep 2006 15:13:19 +0200
On Sun, 2006-09-24 at 14:51 +0200, Philip Van Hoof wrote:
> #define G_INPUT_STREAM_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_INPUT_STREAM, TnyDeviceIface))
Search and replace issue. This should of course be something like:
#define G_INPUT_STREAM_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE
((inst), G_TYPE_INPUT_STREAM, GInputStreamIface))
> #define G_SEEKABLE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_SEEKABLE, TnyDeviceIface))
And this one GSeekableIface
Also note that I would definitely start with a base GStreamIface,
continue with a GInputStreamIface and a GOutputStreamIface where the
input and output have as prerequisite the GStreamIface.
Or in .NET (and Java) that would mean:
namespace G {
interface IStreamIface { .. }
interface IOutputStream : G.IStreamIface { .. }
interface IInputStream : G.IStreamIface { .. }
interface ISeekable : G.IStreamIface { .. }
/* OR: interface ISeekable { .. }; */
}
In Java I think you can only extend an interface with one interface.
In .NET I know you can extend an interface with as much other interfaces
as you want.
Extending an interface is more or less the exact same thing as copy
pasting all the to-implement methods and properties (properties
translate to both a get and a set method in Java, depends on whether or
not it's a read-only property etc etc) in the final interface.
And now you would create a SomeStreamType like this:
public class SomeStreamType : G.IOutputStream, G.IInputStream, G.ISeekable
{
}
ps. To the Java warriors on this list: forgive me for my .NET style
syntax. I know you guys know it's all the same (Java and .NET) with just
a little bit different syntax sugar.
--
Philip Van Hoof, software developer at x-tend
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
http://www.pvanhoof.be - http://www.x-tend.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]