X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgwin32volumemonitor.c;h=ce8aaf701a3b289ae1ff1660a12a5580b7c671e8;hb=b28832d6b9cbe5ac033f01804bc4fac3b76f5465;hp=88cdecebbdc2a5aa26cefd4f9a6bc64592618793;hpb=45a1c41e8cfdeb4edeb7a671b95e599a49c6c281;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gwin32volumemonitor.c b/gio/gwin32volumemonitor.c index 88cdece..ce8aaf7 100644 --- a/gio/gwin32volumemonitor.c +++ b/gio/gwin32volumemonitor.c @@ -14,9 +14,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: Alexander Larsson * David Zeuthen @@ -34,16 +32,11 @@ #include "gwin32mount.h" #include "gmount.h" #include "giomodule.h" -#include "gioalias.h" -#define _WIN32_WINNT 0x0500 #include struct _GWin32VolumeMonitor { GNativeVolumeMonitor parent; - - GList *volumes; - GList *mounts; }; #define g_win32_volume_monitor_get_type _g_win32_volume_monitor_get_type @@ -53,18 +46,7 @@ G_DEFINE_TYPE_WITH_CODE (GWin32VolumeMonitor, g_win32_volume_monitor, G_TYPE_NAT "win32", 0)); -static void -g_win32_volume_monitor_finalize (GObject *object) -{ - GWin32VolumeMonitor *monitor; - - monitor = G_WIN32_VOLUME_MONITOR (object); - - if (G_OBJECT_CLASS (g_win32_volume_monitor_parent_class)->finalize) - (*G_OBJECT_CLASS (g_win32_volume_monitor_parent_class)->finalize) (object); -} - -/* +/** * get_viewable_logical_drives: * * Returns the list of logical and viewable drives as defined by @@ -73,7 +55,7 @@ g_win32_volume_monitor_finalize (GObject *object) * HKLM or HKCU. If neither key exists the result of * GetLogicalDrives() is returned. * - * Return value: bitmask with same meaning as returned by GetLogicalDrives() + * Returns: bitmask with same meaning as returned by GetLogicalDrives() */ static guint32 get_viewable_logical_drives (void) @@ -127,13 +109,10 @@ get_viewable_logical_drives (void) static GList * get_mounts (GVolumeMonitor *volume_monitor) { - GWin32VolumeMonitor *monitor; DWORD drives; gchar drive[4] = "A:\\"; GList *list = NULL; - monitor = G_WIN32_VOLUME_MONITOR (volume_monitor); - drives = get_viewable_logical_drives (); if (!drives) @@ -155,27 +134,20 @@ get_mounts (GVolumeMonitor *volume_monitor) static GList * get_volumes (GVolumeMonitor *volume_monitor) { - GWin32VolumeMonitor *monitor; - GList *l = NULL; - - monitor = G_WIN32_VOLUME_MONITOR (volume_monitor); - - return l; + return NULL; } /* real hardware */ static GList * get_connected_drives (GVolumeMonitor *volume_monitor) { - GWin32VolumeMonitor *monitor; + GList *list = NULL; + +#if 0 HANDLE find_handle; BOOL found; wchar_t wc_name[MAX_PATH+1]; - GList *list = NULL; - monitor = G_WIN32_VOLUME_MONITOR (volume_monitor); - -#if 0 find_handle = FindFirstVolumeW (wc_name, MAX_PATH); found = (find_handle != INVALID_HANDLE_VALUE); while (found) @@ -249,12 +221,9 @@ get_mount_for_mount_path (const char *mount_path, static void g_win32_volume_monitor_class_init (GWin32VolumeMonitorClass *klass) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GVolumeMonitorClass *monitor_class = G_VOLUME_MONITOR_CLASS (klass); GNativeVolumeMonitorClass *native_class = G_NATIVE_VOLUME_MONITOR_CLASS (klass); - gobject_class->finalize = g_win32_volume_monitor_finalize; - monitor_class->get_mounts = get_mounts; monitor_class->get_volumes = get_volumes; monitor_class->get_connected_drives = get_connected_drives;