From a1755d7914937c9aa959ee3a01d9c074472ddb60 Mon Sep 17 00:00:00 2001 From: Jeroen Zwartepoorte Date: Tue, 28 Dec 2004 14:12:35 +0000 Subject: [PATCH] 2004-12-28 Jeroen Zwartepoorte * gnomevfs/Gnomevfs.metadata: Hide some more API. * gnomevfs/VfsStreamAsyncResult.cs: Make Done property internal. * gnomevfs/VolumeMonitor.custom: Hide GList API. svn path=/trunk/gtk-sharp/; revision=38130 --- ChangeLog | 6 ++ doc/ChangeLog | 4 + doc/en/Gnome.Vfs/Drive.xml | 51 +++------- doc/en/Gnome.Vfs/DriveConnectedArgs.xml | 2 +- doc/en/Gnome.Vfs/DriveDisconnectedArgs.xml | 2 +- doc/en/Gnome.Vfs/VfsStream.xml | 108 ++++++++++++--------- doc/en/Gnome.Vfs/VfsStreamAsyncResult.xml | 87 ++++------------- doc/en/Gnome.Vfs/Volume.xml | 53 +++------- doc/en/Gnome.Vfs/VolumeMonitor.xml | 95 +++++++----------- doc/en/Gnome.Vfs/VolumeMonitorClient.xml | 93 ------------------ doc/en/Gnome.Vfs/VolumeMonitorDaemon.xml | 105 -------------------- doc/en/Gnome.Vfs/VolumeMountedArgs.xml | 2 +- doc/en/Gnome.Vfs/VolumePreUnmountArgs.xml | 2 +- doc/en/Gnome.Vfs/VolumeType.xml | 8 +- doc/en/Gnome.Vfs/VolumeUnmountedArgs.xml | 2 +- gnomevfs/Gnomevfs.metadata | 12 ++- gnomevfs/VfsStreamAsyncResult.cs | 8 +- gnomevfs/VolumeMonitor.custom | 30 ++++++ 18 files changed, 208 insertions(+), 462 deletions(-) delete mode 100644 doc/en/Gnome.Vfs/VolumeMonitorClient.xml delete mode 100644 doc/en/Gnome.Vfs/VolumeMonitorDaemon.xml diff --git a/ChangeLog b/ChangeLog index 3692318fe..2e9ecac10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-28 Jeroen Zwartepoorte + + * gnomevfs/Gnomevfs.metadata: Hide some more API. + * gnomevfs/VfsStreamAsyncResult.cs: Make Done property internal. + * gnomevfs/VolumeMonitor.custom: Hide GList API. + 2004-12-28 Jeroen Zwartepoorte * gnomevfs/Directory.cs: PInvoke the _uri methods directory instead of diff --git a/doc/ChangeLog b/doc/ChangeLog index c094ae143..39948e5d9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2004-12-28 Jeroen Zwartepoorte + + * en/Gnome.Vfs/*.xml: more docs. + 2004-12-28 Jeroen Zwartepoorte * en/Gnome.Vfs/*.xml: remove docs for files that no longer exist. diff --git a/doc/en/Gnome.Vfs/Drive.xml b/doc/en/Gnome.Vfs/Drive.xml index 7b957f455..5cac0eb8c 100644 --- a/doc/en/Gnome.Vfs/Drive.xml +++ b/doc/en/Gnome.Vfs/Drive.xml @@ -82,31 +82,6 @@ Override this method in a subclass to provide a default handler for the event. - - - Method - - Gnome.Vfs.Drive - - - - To be added - a - To be added - - - - - Method - - System.Void - - - - To be added - To be added - - Method @@ -183,7 +158,7 @@ - To be added + Internal Drive Id. a To be added @@ -196,7 +171,7 @@ - To be added + User readable string representing this Drive (i.e. "CD-RW/DVD-ROM Drive"). a To be added @@ -209,7 +184,7 @@ - To be added + The icon name used to represent this Drive. a To be added @@ -222,7 +197,7 @@ - To be added + Returns whether the Drive is mounted. a To be added @@ -235,7 +210,7 @@ - To be added + The which represents this Drive (i.e. file:///media/cdrecorder). a To be added @@ -248,7 +223,7 @@ - To be added + The location of the actual device if applicable (i.e. /dev/hdc). a To be added @@ -261,7 +236,7 @@ - To be added + If , this points to the mounted . a To be added @@ -274,7 +249,7 @@ - To be added + Returns whether the Drive is connected. a To be added @@ -287,7 +262,7 @@ - To be added + Returns whether the Drive should be visible to the user. a To be added @@ -300,7 +275,7 @@ - To be added + The type of device this Drive represents. a To be added @@ -313,7 +288,7 @@ - To be added + Drive is about to be unmounted. To be added @@ -325,7 +300,7 @@ - To be added + Drive has been unmounted. To be added @@ -337,7 +312,7 @@ - To be added + Drive has been mounted. To be added diff --git a/doc/en/Gnome.Vfs/DriveConnectedArgs.xml b/doc/en/Gnome.Vfs/DriveConnectedArgs.xml index 8eec118c4..e107142ab 100644 --- a/doc/en/Gnome.Vfs/DriveConnectedArgs.xml +++ b/doc/en/Gnome.Vfs/DriveConnectedArgs.xml @@ -39,7 +39,7 @@ - To be added + The connected . a To be added diff --git a/doc/en/Gnome.Vfs/DriveDisconnectedArgs.xml b/doc/en/Gnome.Vfs/DriveDisconnectedArgs.xml index 246fa4425..f8cd6f3d4 100644 --- a/doc/en/Gnome.Vfs/DriveDisconnectedArgs.xml +++ b/doc/en/Gnome.Vfs/DriveDisconnectedArgs.xml @@ -39,7 +39,7 @@ - To be added + The disconnected . a To be added diff --git a/doc/en/Gnome.Vfs/VfsStream.xml b/doc/en/Gnome.Vfs/VfsStream.xml index 663601c4a..28a787590 100644 --- a/doc/en/Gnome.Vfs/VfsStream.xml +++ b/doc/en/Gnome.Vfs/VfsStream.xml @@ -34,7 +34,7 @@ - To be added + Reads a byte from the stream and advances the position within the stream by one byte. a To be added @@ -49,8 +49,8 @@ - To be added - a + Writes a single to the current position in the stream and advances the position by one byte. + a to write to the stream. To be added @@ -66,11 +66,11 @@ - To be added - a - a - a - a + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + a array. When this method returns, the elements between and + are replaced by the bytes read from the current stream. + a that specifies the zero based byte offset in at which to begin storing the data read from the current stream. + a that specifies the maximum number of bytes to be read from the stream. + a that specifies the total number of bytes read into the buffer, or zero if the end of the stream has been reached before any data could be read. To be added @@ -88,14 +88,24 @@ - To be added - a - a - a - a - a - a - To be added + Begins an asynchronous read operation. + the array to read the data into. + a that specifies the byte offset in at which to begin writing data from the stream. + a that specifies the maximum number of bytes to read from the stream. + a that is called when the read operation has finished. + an application-defined object, or . + a that contains information about the asynchronous read operation, which could still be pending. + + This method starts an asynchronous read operation using the class. + To wait until the operation has finished, you cannot use the since that will also block the Gnome.Vfs thread. Instead, use like this: + + +while (!asyncResult.IsCompleted) { + GLib.MainContext.Iteration (); +} + + + @@ -108,10 +118,10 @@ - To be added - a + Ends a pending asynchronous read request. + the object that references the pending asynchronous read request. a - To be added + This method blocks until the read operation has finished. @@ -126,10 +136,10 @@ - To be added - a - a - a + Writes a sequence of bytes to the current stream and advances the current position within the current stream by the number of bytes written. + a array containing the data to write. + a that specifies the zero based byte offset in at which to start copying bytes to the current stream. + a that specifies the number of bytes to be written to the current stream. To be added @@ -147,14 +157,24 @@ - To be added - a - a - a - a - a - a - To be added + Begins an asynchronous write operation. + the array to be written to the current stream. + a that specifies the byte offset in at which to begin copying bytes to the current stream. + a that specifies the maximum number of bytes to be written to the stream. + a that is called when the write operation has finished. + an application-defined object, or . + a that represents the asynchronous write, which could still be pending. + + This method starts an asynchronous write operation using the class. + To wait until the operation has finished, you cannot use the since that will also block the Gnome.Vfs thread. Instead, use like this: + + +while (!asyncResult.IsCompleted) { + GLib.MainContext.Iteration (); +} + + + @@ -167,9 +187,9 @@ - To be added - a - To be added + Ends an asynchronous write operation. + a object that references the pending asynchronous write operation. + This method blocks until the write operation has finished. @@ -183,11 +203,11 @@ - To be added - a - a - a - To be added + Sets the position within the current stream. + a that specifies the byte offset relative to origin. + a value indicating the reference point used to obtain the new position. + a that specifies the new position within the current stream. + This method only works for readable synchronous streams (see ). @@ -200,8 +220,8 @@ - To be added - a + Sets the length of the current stream. + a that specifies the desired length of the current stream in bytes. To be added @@ -213,8 +233,8 @@ - To be added - To be added + Flushes the internal buffer. + NOOP. @@ -225,7 +245,7 @@ - To be added + Closes the current stream and releases any resources associated with the current stream. To be added diff --git a/doc/en/Gnome.Vfs/VfsStreamAsyncResult.xml b/doc/en/Gnome.Vfs/VfsStreamAsyncResult.xml index c19c29751..d8668dbf7 100644 --- a/doc/en/Gnome.Vfs/VfsStreamAsyncResult.xml +++ b/doc/en/Gnome.Vfs/VfsStreamAsyncResult.xml @@ -9,8 +9,18 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + + implementation tracking a pending asynchronous operation. + + To wait until the operation has finished, you cannot use the since that will also block the Gnome.Vfs thread. Instead, use like this: + + +while (!asyncResult.IsCompleted) { + GLib.MainContext.Iteration (); +} + + + System.Object @@ -22,52 +32,6 @@ - - - Method - - System.Void - - - - - - To be added - a - To be added - - - - - Method - - System.Void - - - - - - - To be added - a - a - To be added - - - - - Constructor - - - - - - To be added - a - a - To be added - - Property @@ -76,7 +40,7 @@ - To be added + Gets the user-provided state object supplied at the time the asynchronous operation was started. a To be added @@ -89,7 +53,7 @@ - To be added + Retrieving this property will throw a . Instead use "while (!asyncResult.IsCompleted) { GLib.MainContext.Iteration(); }" to wait for the operation to finish. a To be added @@ -102,20 +66,7 @@ - To be added - a - To be added - - - - - Property - - System.Boolean - - - - To be added + Returns whether the asynchronous operation completed synchronously. a To be added @@ -128,7 +79,7 @@ - To be added + Retrieves the that occurred during the asynchronous operation. a To be added @@ -141,9 +92,9 @@ - To be added + Indicates whether the asynchronous operation has finished. a - To be added + If an error occurred during the operation, contains the exception that was thrown. @@ -154,7 +105,7 @@ - To be added + Returns the number of bytes read or written during the operation. a To be added diff --git a/doc/en/Gnome.Vfs/Volume.xml b/doc/en/Gnome.Vfs/Volume.xml index 494ad6d48..e240d1e99 100644 --- a/doc/en/Gnome.Vfs/Volume.xml +++ b/doc/en/Gnome.Vfs/Volume.xml @@ -9,7 +9,7 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added + Abstraction for a mounted file system or a network location. To be added @@ -37,31 +37,6 @@ To be added - - - Method - - System.Void - - - - To be added - To be added - - - - - Method - - Gnome.Vfs.Volume - - - - To be added - a - To be added - - Method @@ -138,7 +113,7 @@ - To be added + Returns the on which this Volume resides. a To be added @@ -151,7 +126,7 @@ - To be added + The type of the file system (i.e. ext3). a To be added @@ -164,7 +139,7 @@ - To be added + User readable string representing this Volume (i.e. "Harddrive"). a To be added @@ -177,7 +152,7 @@ - To be added + The icon name used to represent this Volume. a To be added @@ -190,7 +165,7 @@ - To be added + Internal Volume Id. a To be added @@ -203,7 +178,7 @@ - To be added + Returns whether the Volume is mounted. a To be added @@ -216,7 +191,7 @@ - To be added + The which represents this Volume (i.e. file:///media/cdrecorder). a To be added @@ -229,7 +204,7 @@ - To be added + The location of the actual device if applicable (i.e. /dev/hdc). a To be added @@ -242,7 +217,7 @@ - To be added + Returns the type of Volume. a To be added @@ -255,7 +230,7 @@ - To be added + Returns whether the Volume should be visible to the user. a To be added @@ -268,7 +243,7 @@ - To be added + Returns whether this Volume supports handling trash items. a To be added @@ -281,7 +256,7 @@ - To be added + Returns whether this Volume allows write access. a To be added @@ -294,7 +269,7 @@ - To be added + The type of device this Volume represents. a To be added diff --git a/doc/en/Gnome.Vfs/VolumeMonitor.xml b/doc/en/Gnome.Vfs/VolumeMonitor.xml index e22d3cbfb..25dba2a97 100644 --- a/doc/en/Gnome.Vfs/VolumeMonitor.xml +++ b/doc/en/Gnome.Vfs/VolumeMonitor.xml @@ -33,7 +33,7 @@ - To be added + Returns a pointer to the VolumeMonitor singleton. VolumeMonitor is a singleton, this means it is guaranteed to exist and be valid until is called. a To be added @@ -125,18 +125,6 @@ Override this method in a subclass to provide a default handler for the event. - - - Method - - System.Void - - - - To be added - To be added - - Method @@ -147,7 +135,7 @@ - To be added + Looks for a which contains . a a To be added @@ -163,25 +151,12 @@ - To be added + Looks for a whose id is . a a To be added - - - Method - - Gnome.Vfs.VolumeMonitor - - - - To be added - a - To be added - - Method @@ -192,7 +167,7 @@ - To be added + Looks for a whose id is . a a To be added @@ -250,32 +225,6 @@ To be added - - - Property - - GLib.List - - - - To be added - a - To be added - - - - - Property - - GLib.List - - - - To be added - a - To be added - - Event @@ -284,7 +233,7 @@ - To be added + a is about to be unmounted. To be added @@ -296,7 +245,7 @@ - To be added + a was disconnected. To be added @@ -308,7 +257,7 @@ - To be added + a was unmounted. To be added @@ -320,7 +269,7 @@ - To be added + a new was connected. To be added @@ -332,7 +281,33 @@ - To be added + a was mounted. + To be added + + + + + Property + + Gnome.Vfs.Drive[] + + + + Returns an array of connected s. + a + To be added + + + + + Property + + Gnome.Vfs.Volume[] + + + + Returns an array of mounted s. + a To be added diff --git a/doc/en/Gnome.Vfs/VolumeMonitorClient.xml b/doc/en/Gnome.Vfs/VolumeMonitorClient.xml deleted file mode 100644 index 4964985d7..000000000 --- a/doc/en/Gnome.Vfs/VolumeMonitorClient.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - gnome-vfs-sharp - [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4] - 2.0.0.0 - neutral - - - Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - - To be added - To be added - - - Gnome.Vfs.VolumeMonitor - - - - GLib.IWrapper - - - System.IDisposable - - - - - - - Method - - System.Void - - - - To be added - To be added - - - - - Constructor - - - - - - To be added - a - a - To be added - - - - - Constructor - - - - - - To be added - a - a - To be added - - - - - Constructor - - - - To be added - a - To be added - - - - - Property - - GLib.GType - - - - To be added - a - To be added - - - - \ No newline at end of file diff --git a/doc/en/Gnome.Vfs/VolumeMonitorDaemon.xml b/doc/en/Gnome.Vfs/VolumeMonitorDaemon.xml deleted file mode 100644 index 437c1320d..000000000 --- a/doc/en/Gnome.Vfs/VolumeMonitorDaemon.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - gnome-vfs-sharp - [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4] - 2.0.0.0 - neutral - - - Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - - To be added - To be added - - - Gnome.Vfs.VolumeMonitor - - - - GLib.IWrapper - - - System.IDisposable - - - - - - - Method - - System.Void - - - - To be added - To be added - - - - - Method - - System.Void - - - - To be added - To be added - - - - - Constructor - - - - - - To be added - a - a - To be added - - - - - Constructor - - - - - - To be added - a - a - To be added - - - - - Constructor - - - - To be added - a - To be added - - - - - Property - - GLib.GType - - - - To be added - a - To be added - - - - \ No newline at end of file diff --git a/doc/en/Gnome.Vfs/VolumeMountedArgs.xml b/doc/en/Gnome.Vfs/VolumeMountedArgs.xml index b859aefbd..1aad7377f 100644 --- a/doc/en/Gnome.Vfs/VolumeMountedArgs.xml +++ b/doc/en/Gnome.Vfs/VolumeMountedArgs.xml @@ -53,7 +53,7 @@ - To be added + the that was mounted. a To be added diff --git a/doc/en/Gnome.Vfs/VolumePreUnmountArgs.xml b/doc/en/Gnome.Vfs/VolumePreUnmountArgs.xml index c33fcdce1..95bc00b98 100644 --- a/doc/en/Gnome.Vfs/VolumePreUnmountArgs.xml +++ b/doc/en/Gnome.Vfs/VolumePreUnmountArgs.xml @@ -53,7 +53,7 @@ - To be added + the about to be unmounted. a To be added diff --git a/doc/en/Gnome.Vfs/VolumeType.xml b/doc/en/Gnome.Vfs/VolumeType.xml index 669f3e48f..978b26169 100644 --- a/doc/en/Gnome.Vfs/VolumeType.xml +++ b/doc/en/Gnome.Vfs/VolumeType.xml @@ -9,7 +9,7 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added + The type of . To be added @@ -37,7 +37,7 @@ - To be added + a Volume with a local mountpoint. To be added @@ -50,7 +50,7 @@ - To be added + a Volume mounted via Gnome.Vfs directly. To be added @@ -63,7 +63,7 @@ - To be added + a Volume obtained via the "Connect To Server" function of Nautilus. To be added diff --git a/doc/en/Gnome.Vfs/VolumeUnmountedArgs.xml b/doc/en/Gnome.Vfs/VolumeUnmountedArgs.xml index d25e6690e..8e76ef074 100644 --- a/doc/en/Gnome.Vfs/VolumeUnmountedArgs.xml +++ b/doc/en/Gnome.Vfs/VolumeUnmountedArgs.xml @@ -53,7 +53,7 @@ - To be added + the that was unmounted. a To be added diff --git a/gnomevfs/Gnomevfs.metadata b/gnomevfs/Gnomevfs.metadata index e1ce2e852..cb750deae 100644 --- a/gnomevfs/Gnomevfs.metadata +++ b/gnomevfs/Gnomevfs.metadata @@ -61,11 +61,19 @@ 1 MimeMonitor Drive + 1 + 1 Volume GetHandlesTrash + 1 + 1 VolumeMonitor - VolumeMonitorClient - VolumeMonitorDaemon + 1 + 1 + 1 + 1 + 1 + 1 1 1 1 diff --git a/gnomevfs/VfsStreamAsyncResult.cs b/gnomevfs/VfsStreamAsyncResult.cs index b48a48ed7..93e45f0f5 100644 --- a/gnomevfs/VfsStreamAsyncResult.cs +++ b/gnomevfs/VfsStreamAsyncResult.cs @@ -29,7 +29,7 @@ namespace Gnome.Vfs { private Exception exception = null; private int nbytes = -1; - public VfsStreamAsyncResult (object state) + internal VfsStreamAsyncResult (object state) { this.state = state; } @@ -59,7 +59,7 @@ namespace Gnome.Vfs { } } - public bool Done { + internal bool Done { get { return done; } @@ -86,13 +86,13 @@ namespace Gnome.Vfs { } } - public void SetComplete (Exception e) + internal void SetComplete (Exception e) { exception = e; completed = true; } - public void SetComplete (Exception e, int nbytes) + internal void SetComplete (Exception e, int nbytes) { this.nbytes = nbytes; SetComplete (e); diff --git a/gnomevfs/VolumeMonitor.custom b/gnomevfs/VolumeMonitor.custom index 5f493c76c..4634afa2b 100644 --- a/gnomevfs/VolumeMonitor.custom +++ b/gnomevfs/VolumeMonitor.custom @@ -18,6 +18,36 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. + [DllImport("gnomevfs-2")] + static extern IntPtr gnome_vfs_volume_monitor_get_connected_drives(IntPtr raw); + + public Drive[] ConnectedDrives { + get { + IntPtr raw_ret = gnome_vfs_volume_monitor_get_connected_drives(Handle); + GLib.List list = new GLib.List(raw_ret); + Drive[] result = new Drive [list.Count]; + for (int i = 0; i < list.Count; i++) + result [i] = list [i] as Drive; + list.Dispose (); + return result; + } + } + + [DllImport("gnomevfs-2")] + static extern IntPtr gnome_vfs_volume_monitor_get_mounted_volumes(IntPtr raw); + + public Volume[] MountedVolumes { + get { + IntPtr raw_ret = gnome_vfs_volume_monitor_get_mounted_volumes(Handle); + GLib.List list = new GLib.List(raw_ret); + Volume[] result = new Volume [list.Count]; + for (int i = 0; i < list.Count; i++) + result [i] = list [i] as Volume; + list.Dispose (); + return result; + } + } + [DllImport("gnomevfs-2")] static extern IntPtr gnome_vfs_get_volume_monitor ();