projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GApplication: add a "resource base path"
[platform/upstream/glib.git]
/
gio
/
gwin32volumemonitor.c
diff --git
a/gio/gwin32volumemonitor.c
b/gio/gwin32volumemonitor.c
index
88cdece
..
5e93699
100644
(file)
--- 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
* 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 <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
* David Zeuthen <davidz@redhat.com>
*
* Author: Alexander Larsson <alexl@redhat.com>
* David Zeuthen <davidz@redhat.com>
@@
-34,16
+32,11
@@
#include "gwin32mount.h"
#include "gmount.h"
#include "giomodule.h"
#include "gwin32mount.h"
#include "gmount.h"
#include "giomodule.h"
-#include "gioalias.h"
-#define _WIN32_WINNT 0x0500
#include <windows.h>
struct _GWin32VolumeMonitor {
GNativeVolumeMonitor parent;
#include <windows.h>
struct _GWin32VolumeMonitor {
GNativeVolumeMonitor parent;
-
- GList *volumes;
- GList *mounts;
};
#define g_win32_volume_monitor_get_type _g_win32_volume_monitor_get_type
};
#define g_win32_volume_monitor_get_type _g_win32_volume_monitor_get_type
@@
-53,17
+46,6
@@
G_DEFINE_TYPE_WITH_CODE (GWin32VolumeMonitor, g_win32_volume_monitor, G_TYPE_NAT
"win32",
0));
"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:
*
/*
* get_viewable_logical_drives:
*
@@
-73,7
+55,7
@@
g_win32_volume_monitor_finalize (GObject *object)
* HKLM or HKCU. If neither key exists the result of
* GetLogicalDrives() is returned.
*
* HKLM or HKCU. If neither key exists the result of
* GetLogicalDrives() is returned.
*
- * Return
value
: bitmask with same meaning as returned by GetLogicalDrives()
+ * Return
s
: bitmask with same meaning as returned by GetLogicalDrives()
*/
static guint32
get_viewable_logical_drives (void)
*/
static guint32
get_viewable_logical_drives (void)
@@
-127,13
+109,10
@@
get_viewable_logical_drives (void)
static GList *
get_mounts (GVolumeMonitor *volume_monitor)
{
static GList *
get_mounts (GVolumeMonitor *volume_monitor)
{
- GWin32VolumeMonitor *monitor;
DWORD drives;
gchar drive[4] = "A:\\";
GList *list = NULL;
DWORD drives;
gchar drive[4] = "A:\\";
GList *list = NULL;
- monitor = G_WIN32_VOLUME_MONITOR (volume_monitor);
-
drives = get_viewable_logical_drives ();
if (!drives)
drives = get_viewable_logical_drives ();
if (!drives)
@@
-155,27
+134,20
@@
get_mounts (GVolumeMonitor *volume_monitor)
static GList *
get_volumes (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)
{
}
/* 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];
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)
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)
{
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);
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;
monitor_class->get_mounts = get_mounts;
monitor_class->get_volumes = get_volumes;
monitor_class->get_connected_drives = get_connected_drives;