Re: One to many (Dirves to Volumes) patch round 1



On Mon, 2004-07-12 at 20:37, John (J5) Palmieri wrote:
> Here is the first round of API changes for Gnome-VFS and making one
> drive able to describe more than one volume (i.e. multiple partitions,
> multisession CDs, etc.).  Basically this patch changes the
> GnomeVFSVolume *volume member in the GnomeVFSPrivateDrive struct to be
> GList *volumes and then changes the API to accommodate the list (i.e.
> set methods become add methods).  Right now this does not add any new
> functionality but serves as the basis for the one-to-many change
> (Bugzilla bug 143888).  It lays the foundation while making sure gnome-
> vfs still works as expected before I start integrating the actual code
> to do multiple volumes per drive using hal.  If anyone sees any glaring
> mistakes please let me know.
> 
> One issue that I am not sure how to deal with is the get_data_for_drive
> method which searches the volume for info on the drive if the volume
> exists.  That is fine if there is only one volume but which volume do
> you use if there are more than one?  
> 
> Attached is the patch against CVS.  Comments welcome.  I would
> especially like to know if I did the Corba stuff correctly.  It was my
> first time actually using Corba directly and I wanted to make sure I
> didn't miss anything.

In addition to christophes comments:

+		vol = GNOME_VFS_VOLUME (first_vol->data);
+		vol = gnome_vfs_volume_ref (vol);
Looks better like:
  vol = gnome_vfs_volume_ref (GNOME_VFS_VOLUME (first_vol->data));


+		corba_volumes._buffer = CORBA_sequence_CORBA_long_allocbuf (length);
Need to also call:
                CORBA_sequence_set_release (corba_volumes, TRUE);


-	GnomeVFSVolume *volume; /* Owning ref */
+	GList *volumes; /* GnomeVFSVolume list */

Don't remove the ownership comment.


Otherwise it looks ok to me.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an otherworldly alcoholic assassin gone bad. She's a time-travelling 
French-Canadian nun in the wrong place at the wrong time. They fight crime! 




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