mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Removed unnecessary file
2007-11-28 Alexander Larsson <alexl@redhat.com> * Makefile.am: * gdriveprivate.h: Removed unnecessary file * gdesktopappinfo.[ch]: * gdummyfile.[ch]: * gfile.c: * glocaldirectorymonitor.[ch]: * glocalfile.[ch]: * glocalfileenumerator.[ch]: * glocalfileinputstream.[ch]: * glocalfilemonitor.[ch]: * glocalfileoutputstream.[ch]: * glocalvfs.[ch]: * gnativevolumemonitor.c: * gpollfilemonitor.[ch]: * gunionvolumemonitor.[ch]: * gunixdrive.[ch]: * gunixvolume.[ch]: * gunixvolumemonitor.[ch]: * gvfs.c: * gvolumeprivate.h: * inotify/ginotifydirectorymonitor.[ch]: * inotify/ginotifyfilemonitor.[ch]: * inotify/inotify-helper.c: Append _ to all internal functions * gio.symbols: Add missing symbols Export symbols needed for modules svn path=/trunk/; revision=5977
This commit is contained in:
parent
3deb5aceda
commit
d9594f5709
@ -1,3 +1,36 @@
|
|||||||
|
2007-11-28 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.am:
|
||||||
|
* gdriveprivate.h:
|
||||||
|
Removed unnecessary file
|
||||||
|
|
||||||
|
* gdesktopappinfo.[ch]:
|
||||||
|
* gdummyfile.[ch]:
|
||||||
|
* gfile.c:
|
||||||
|
* glocaldirectorymonitor.[ch]:
|
||||||
|
* glocalfile.[ch]:
|
||||||
|
* glocalfileenumerator.[ch]:
|
||||||
|
* glocalfileinputstream.[ch]:
|
||||||
|
* glocalfilemonitor.[ch]:
|
||||||
|
* glocalfileoutputstream.[ch]:
|
||||||
|
* glocalvfs.[ch]:
|
||||||
|
* gnativevolumemonitor.c:
|
||||||
|
* gpollfilemonitor.[ch]:
|
||||||
|
* gunionvolumemonitor.[ch]:
|
||||||
|
* gunixdrive.[ch]:
|
||||||
|
* gunixvolume.[ch]:
|
||||||
|
* gunixvolumemonitor.[ch]:
|
||||||
|
* gvfs.c:
|
||||||
|
* gvolumeprivate.h:
|
||||||
|
* inotify/ginotifydirectorymonitor.[ch]:
|
||||||
|
* inotify/ginotifyfilemonitor.[ch]:
|
||||||
|
* inotify/inotify-helper.c:
|
||||||
|
Append _ to all internal functions
|
||||||
|
|
||||||
|
* gio.symbols:
|
||||||
|
Add missing symbols
|
||||||
|
Export symbols needed for modules
|
||||||
|
|
||||||
2007-11-28 Alexander Larsson <alexl@redhat.com>
|
2007-11-28 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* Makefile.am:
|
* Makefile.am:
|
||||||
|
@ -129,7 +129,6 @@ libgio_2_0_la_SOURCES = \
|
|||||||
gdataoutputstream.c \
|
gdataoutputstream.c \
|
||||||
gdirectorymonitor.c \
|
gdirectorymonitor.c \
|
||||||
gdrive.c \
|
gdrive.c \
|
||||||
gdriveprivate.h \
|
|
||||||
gdummyfile.h \
|
gdummyfile.h \
|
||||||
gdummyfile.c \
|
gdummyfile.c \
|
||||||
gfile.c \
|
gfile.c \
|
||||||
|
@ -72,6 +72,7 @@ struct _GDesktopAppInfo
|
|||||||
/* FIXME: what about StartupWMClass ? */
|
/* FIXME: what about StartupWMClass ? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define g_desktop_app_info_get_type _g_desktop_app_info_get_type
|
||||||
G_DEFINE_TYPE_WITH_CODE (GDesktopAppInfo, g_desktop_app_info, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GDesktopAppInfo, g_desktop_app_info, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_APP_INFO,
|
G_IMPLEMENT_INTERFACE (G_TYPE_APP_INFO,
|
||||||
g_desktop_app_info_iface_init))
|
g_desktop_app_info_iface_init))
|
||||||
@ -151,7 +152,7 @@ g_desktop_app_info_init (GDesktopAppInfo *local)
|
|||||||
* Returns: a new #GDesktopAppInfo or %NULL on error.
|
* Returns: a new #GDesktopAppInfo or %NULL on error.
|
||||||
**/
|
**/
|
||||||
GDesktopAppInfo *
|
GDesktopAppInfo *
|
||||||
g_desktop_app_info_new_from_filename (const char *filename)
|
_g_desktop_app_info_new_from_filename (const char *filename)
|
||||||
{
|
{
|
||||||
GDesktopAppInfo *info;
|
GDesktopAppInfo *info;
|
||||||
GKeyFile *key_file;
|
GKeyFile *key_file;
|
||||||
@ -257,7 +258,7 @@ g_desktop_app_info_new_from_filename (const char *filename)
|
|||||||
* Returns: a new #GDesktopAppInfo.
|
* Returns: a new #GDesktopAppInfo.
|
||||||
**/
|
**/
|
||||||
GDesktopAppInfo *
|
GDesktopAppInfo *
|
||||||
g_desktop_app_info_new (const char *desktop_id)
|
_g_desktop_app_info_new (const char *desktop_id)
|
||||||
{
|
{
|
||||||
GDesktopAppInfo *appinfo;
|
GDesktopAppInfo *appinfo;
|
||||||
const char * const *dirs;
|
const char * const *dirs;
|
||||||
@ -272,7 +273,7 @@ g_desktop_app_info_new (const char *desktop_id)
|
|||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
filename = g_build_filename (dirs[i], desktop_id, NULL);
|
filename = g_build_filename (dirs[i], desktop_id, NULL);
|
||||||
appinfo = g_desktop_app_info_new_from_filename (filename);
|
appinfo = _g_desktop_app_info_new_from_filename (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
if (appinfo != NULL)
|
if (appinfo != NULL)
|
||||||
{
|
{
|
||||||
@ -286,7 +287,7 @@ g_desktop_app_info_new (const char *desktop_id)
|
|||||||
*p = '/';
|
*p = '/';
|
||||||
|
|
||||||
filename = g_build_filename (dirs[i], basename, NULL);
|
filename = g_build_filename (dirs[i], basename, NULL);
|
||||||
appinfo = g_desktop_app_info_new_from_filename (filename);
|
appinfo = _g_desktop_app_info_new_from_filename (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
if (appinfo != NULL)
|
if (appinfo != NULL)
|
||||||
{
|
{
|
||||||
@ -303,7 +304,7 @@ g_desktop_app_info_new (const char *desktop_id)
|
|||||||
found:
|
found:
|
||||||
appinfo->desktop_id = g_strdup (desktop_id);
|
appinfo->desktop_id = g_strdup (desktop_id);
|
||||||
|
|
||||||
if (g_desktop_app_info_get_is_hidden (appinfo))
|
if (_g_desktop_app_info_get_is_hidden (appinfo))
|
||||||
{
|
{
|
||||||
g_object_unref (appinfo);
|
g_object_unref (appinfo);
|
||||||
appinfo = NULL;
|
appinfo = NULL;
|
||||||
@ -380,7 +381,7 @@ g_desktop_app_info_get_name (GAppInfo *appinfo)
|
|||||||
* Returns: %TRUE if hidden, %FALSE otherwise.
|
* Returns: %TRUE if hidden, %FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info)
|
_g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info)
|
||||||
{
|
{
|
||||||
return info->hidden;
|
return info->hidden;
|
||||||
}
|
}
|
||||||
@ -1437,7 +1438,7 @@ g_app_info_create_from_commandline (const char *commandline,
|
|||||||
|
|
||||||
run_update_command ("update-desktop-database", "applications");
|
run_update_command ("update-desktop-database", "applications");
|
||||||
|
|
||||||
info = g_desktop_app_info_new_from_filename (filename);
|
info = _g_desktop_app_info_new_from_filename (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||||
@ -1508,7 +1509,7 @@ g_app_info_get_all_for_type (const char *content_type)
|
|||||||
{
|
{
|
||||||
char *desktop_entry = l->data;
|
char *desktop_entry = l->data;
|
||||||
|
|
||||||
info = g_desktop_app_info_new (desktop_entry);
|
info = _g_desktop_app_info_new (desktop_entry);
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
if (app_info_in_list (G_APP_INFO (info), infos))
|
if (app_info_in_list (G_APP_INFO (info), infos))
|
||||||
@ -1549,7 +1550,7 @@ g_app_info_get_default_for_type (const char *content_type,
|
|||||||
{
|
{
|
||||||
char *desktop_entry = l->data;
|
char *desktop_entry = l->data;
|
||||||
|
|
||||||
info = (GAppInfo *)g_desktop_app_info_new (desktop_entry);
|
info = (GAppInfo *)_g_desktop_app_info_new (desktop_entry);
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
if (must_support_uris && !g_app_info_supports_uris (info))
|
if (must_support_uris && !g_app_info_supports_uris (info))
|
||||||
@ -1607,11 +1608,11 @@ get_apps_from_dir (GHashTable *apps, const char *dirname, const char *prefix)
|
|||||||
/* Use _extended so we catch NULLs too (hidden) */
|
/* Use _extended so we catch NULLs too (hidden) */
|
||||||
if (!g_hash_table_lookup_extended (apps, desktop_id, NULL, NULL))
|
if (!g_hash_table_lookup_extended (apps, desktop_id, NULL, NULL))
|
||||||
{
|
{
|
||||||
appinfo = g_desktop_app_info_new_from_filename (filename);
|
appinfo = _g_desktop_app_info_new_from_filename (filename);
|
||||||
|
|
||||||
/* Don't return apps that don't take arguments */
|
/* Don't return apps that don't take arguments */
|
||||||
if (appinfo &&
|
if (appinfo &&
|
||||||
g_desktop_app_info_get_is_hidden (appinfo) &&
|
_g_desktop_app_info_get_is_hidden (appinfo) &&
|
||||||
strstr (appinfo->exec,"%U") == NULL &&
|
strstr (appinfo->exec,"%U") == NULL &&
|
||||||
strstr (appinfo->exec,"%u") == NULL &&
|
strstr (appinfo->exec,"%u") == NULL &&
|
||||||
strstr (appinfo->exec,"%f") == NULL &&
|
strstr (appinfo->exec,"%f") == NULL &&
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_DESKTOP_APP_INFO (g_desktop_app_info_get_type ())
|
#define G_TYPE_DESKTOP_APP_INFO (_g_desktop_app_info_get_type ())
|
||||||
#define G_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo))
|
#define G_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo))
|
||||||
#define G_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
|
#define G_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
|
||||||
#define G_IS_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DESKTOP_APP_INFO))
|
#define G_IS_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DESKTOP_APP_INFO))
|
||||||
@ -42,11 +42,11 @@ struct _GDesktopAppInfoClass
|
|||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_desktop_app_info_get_type (void) G_GNUC_CONST;
|
GType _g_desktop_app_info_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename);
|
GDesktopAppInfo *_g_desktop_app_info_new_from_filename (const char *filename);
|
||||||
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
|
GDesktopAppInfo *_g_desktop_app_info_new (const char *desktop_id);
|
||||||
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
gboolean _g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
/* GIO - GLib Input, Output and Streaming Library
|
|
||||||
*
|
|
||||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* Author: Alexander Larsson <alexl@redhat.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __G_DRIVEPRIV_H__
|
|
||||||
#define __G_DRIVEPRIV_H__
|
|
||||||
|
|
||||||
#include <gio/gdrive.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __G_DRIVEPRIV_H__ */
|
|
@ -54,6 +54,7 @@ struct _GDummyFile
|
|||||||
char *text_uri;
|
char *text_uri;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define g_dummy_file_get_type _g_dummy_file_get_type
|
||||||
G_DEFINE_TYPE_WITH_CODE (GDummyFile, g_dummy_file, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GDummyFile, g_dummy_file, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_FILE,
|
G_IMPLEMENT_INTERFACE (G_TYPE_FILE,
|
||||||
g_dummy_file_file_iface_init))
|
g_dummy_file_file_iface_init))
|
||||||
@ -108,7 +109,7 @@ g_dummy_file_init (GDummyFile *dummy)
|
|||||||
* Returns: a new #GFile.
|
* Returns: a new #GFile.
|
||||||
**/
|
**/
|
||||||
GFile *
|
GFile *
|
||||||
g_dummy_file_new (const char *uri)
|
_g_dummy_file_new (const char *uri)
|
||||||
{
|
{
|
||||||
GDummyFile *dummy;
|
GDummyFile *dummy;
|
||||||
|
|
||||||
@ -184,7 +185,7 @@ g_dummy_file_get_parent (GFile *file)
|
|||||||
uri = _g_encode_uri (&new_decoded_uri);
|
uri = _g_encode_uri (&new_decoded_uri);
|
||||||
g_free (dirname);
|
g_free (dirname);
|
||||||
|
|
||||||
parent = g_dummy_file_new (uri);
|
parent = _g_dummy_file_new (uri);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
@ -195,7 +196,7 @@ g_dummy_file_dup (GFile *file)
|
|||||||
{
|
{
|
||||||
GDummyFile *dummy = G_DUMMY_FILE (file);
|
GDummyFile *dummy = G_DUMMY_FILE (file);
|
||||||
|
|
||||||
return g_dummy_file_new (dummy->text_uri);
|
return _g_dummy_file_new (dummy->text_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
@ -350,7 +351,7 @@ g_dummy_file_resolve_relative_path (GFile *file,
|
|||||||
str = g_string_new (dummy->text_uri);
|
str = g_string_new (dummy->text_uri);
|
||||||
g_string_append (str, "/");
|
g_string_append (str, "/");
|
||||||
g_string_append_encoded (str, relative_path, SUB_DELIM_CHARS ":@/");
|
g_string_append_encoded (str, relative_path, SUB_DELIM_CHARS ":@/");
|
||||||
child = g_dummy_file_new (str->str);
|
child = _g_dummy_file_new (str->str);
|
||||||
g_string_free (str, TRUE);
|
g_string_free (str, TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -365,7 +366,7 @@ g_dummy_file_resolve_relative_path (GFile *file,
|
|||||||
uri = _g_encode_uri (&new_decoded_uri);
|
uri = _g_encode_uri (&new_decoded_uri);
|
||||||
g_free (new_decoded_uri.path);
|
g_free (new_decoded_uri.path);
|
||||||
|
|
||||||
child = g_dummy_file_new (uri);
|
child = _g_dummy_file_new (uri);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_DUMMY_FILE (g_dummy_file_get_type ())
|
#define G_TYPE_DUMMY_FILE (_g_dummy_file_get_type ())
|
||||||
#define G_DUMMY_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DUMMY_FILE, GDummyFile))
|
#define G_DUMMY_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DUMMY_FILE, GDummyFile))
|
||||||
#define G_DUMMY_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DUMMY_FILE, GDummyFileClass))
|
#define G_DUMMY_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DUMMY_FILE, GDummyFileClass))
|
||||||
#define G_IS_DUMMY_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DUMMY_FILE))
|
#define G_IS_DUMMY_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DUMMY_FILE))
|
||||||
@ -42,9 +42,9 @@ struct _GDummyFileClass
|
|||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_dummy_file_get_type (void) G_GNUC_CONST;
|
GType _g_dummy_file_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFile * g_dummy_file_new (const char *uri);
|
GFile * _g_dummy_file_new (const char *uri);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -3076,7 +3076,7 @@ g_file_monitor_file (GFile *file,
|
|||||||
|
|
||||||
/* Fallback to polling */
|
/* Fallback to polling */
|
||||||
if (monitor == NULL)
|
if (monitor == NULL)
|
||||||
monitor = g_poll_file_monitor_new (file);
|
monitor = _g_poll_file_monitor_new (file);
|
||||||
|
|
||||||
return monitor;
|
return monitor;
|
||||||
}
|
}
|
||||||
|
@ -347,11 +347,19 @@ g_file_info_get_attribute
|
|||||||
g_file_info_get_attribute_string
|
g_file_info_get_attribute_string
|
||||||
g_file_info_get_attribute_byte_string
|
g_file_info_get_attribute_byte_string
|
||||||
g_file_info_get_attribute_boolean
|
g_file_info_get_attribute_boolean
|
||||||
|
g_file_info_get_attribute_uint32
|
||||||
|
g_file_info_get_attribute_int32
|
||||||
|
g_file_info_get_attribute_uint64
|
||||||
|
g_file_info_get_attribute_int64
|
||||||
g_file_info_get_attribute_object
|
g_file_info_get_attribute_object
|
||||||
g_file_info_set_attribute
|
g_file_info_set_attribute
|
||||||
g_file_info_set_attribute_string
|
g_file_info_set_attribute_string
|
||||||
g_file_info_set_attribute_byte_string
|
g_file_info_set_attribute_byte_string
|
||||||
g_file_info_set_attribute_boolean
|
g_file_info_set_attribute_boolean
|
||||||
|
g_file_info_set_attribute_uint32
|
||||||
|
g_file_info_set_attribute_int32
|
||||||
|
g_file_info_set_attribute_uint64
|
||||||
|
g_file_info_set_attribute_int64
|
||||||
g_file_info_set_attribute_object
|
g_file_info_set_attribute_object
|
||||||
g_file_info_clear_status
|
g_file_info_clear_status
|
||||||
g_file_info_get_file_type
|
g_file_info_get_file_type
|
||||||
@ -382,6 +390,8 @@ g_file_info_set_size
|
|||||||
g_file_info_set_modification_time
|
g_file_info_set_modification_time
|
||||||
g_file_info_set_symlink_target
|
g_file_info_set_symlink_target
|
||||||
g_file_info_set_sort_order
|
g_file_info_set_sort_order
|
||||||
|
g_file_attribute_matcher_new
|
||||||
|
g_file_attribute_matcher_ref
|
||||||
g_file_attribute_matcher_unref
|
g_file_attribute_matcher_unref
|
||||||
g_file_attribute_matcher_matches
|
g_file_attribute_matcher_matches
|
||||||
g_file_attribute_matcher_matches_only
|
g_file_attribute_matcher_matches_only
|
||||||
@ -686,3 +696,21 @@ g_volume_monitor_get_connected_drives
|
|||||||
g_volume_monitor_get
|
g_volume_monitor_get
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if IN_HEADER(__G_NATIVE_VOLUME_MONITOR_H__)
|
||||||
|
#if IN_FILE(__G_NATIVE_VOLUME_MONITOR_C__)
|
||||||
|
g_native_volume_monitor_get_type G_GNUC_CONST
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if IN_HEADER(__G_LOCAL_FILE_MONITOR_H__)
|
||||||
|
#if IN_FILE(__G_LOCAL_FILE_MONITOR_C__)
|
||||||
|
g_local_file_monitor_get_type G_GNUC_CONST
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if IN_HEADER(__G_LOCAL_DIRECTORY_MONITOR_H__)
|
||||||
|
#if IN_FILE(__G_LOCAL_DIRECTORY_MONITOR_C__)
|
||||||
|
g_local_directory_monitor_get_type G_GNUC_CONST
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
@ -207,7 +207,7 @@ _compare_monitor_class_by_prio (gconstpointer a,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern GType g_inotify_directory_monitor_get_type (void);
|
extern GType _g_inotify_directory_monitor_get_type (void);
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
get_default_local_directory_monitor (gpointer data)
|
get_default_local_directory_monitor (gpointer data)
|
||||||
@ -219,7 +219,7 @@ get_default_local_directory_monitor (gpointer data)
|
|||||||
|
|
||||||
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
|
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
|
||||||
/* Register Inotify monitor */
|
/* Register Inotify monitor */
|
||||||
g_inotify_directory_monitor_get_type ();
|
_g_inotify_directory_monitor_get_type ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_io_modules_ensure_loaded (GIO_MODULE_DIR);
|
g_io_modules_ensure_loaded (GIO_MODULE_DIR);
|
||||||
@ -261,8 +261,8 @@ get_default_local_directory_monitor (gpointer data)
|
|||||||
* Returns: new #GDirectoryMonitor for the given @dirname.
|
* Returns: new #GDirectoryMonitor for the given @dirname.
|
||||||
**/
|
**/
|
||||||
GDirectoryMonitor*
|
GDirectoryMonitor*
|
||||||
g_local_directory_monitor_new (const char* dirname,
|
_g_local_directory_monitor_new (const char* dirname,
|
||||||
GFileMonitorFlags flags)
|
GFileMonitorFlags flags)
|
||||||
{
|
{
|
||||||
static GOnce once_init = G_ONCE_INIT;
|
static GOnce once_init = G_ONCE_INIT;
|
||||||
static GType monitor_type = G_TYPE_INVALID;
|
static GType monitor_type = G_TYPE_INVALID;
|
||||||
@ -290,3 +290,5 @@ g_local_directory_monitor_cancel (GDirectoryMonitor* monitor)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define __G_LOCAL_DIRECTORY_MONITOR_C__
|
||||||
|
#include "gioaliasdef.c"
|
||||||
|
@ -57,8 +57,8 @@ struct _GLocalDirectoryMonitorClass {
|
|||||||
|
|
||||||
GType g_local_directory_monitor_get_type (void) G_GNUC_CONST;
|
GType g_local_directory_monitor_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDirectoryMonitor* g_local_directory_monitor_new (const char* dirname,
|
GDirectoryMonitor* _g_local_directory_monitor_new (const char* dirname,
|
||||||
GFileMonitorFlags flags);
|
GFileMonitorFlags flags);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ struct _GLocalFile
|
|||||||
char *filename;
|
char *filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define g_local_file_get_type _g_local_file_get_type
|
||||||
G_DEFINE_TYPE_WITH_CODE (GLocalFile, g_local_file, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GLocalFile, g_local_file, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_FILE,
|
G_IMPLEMENT_INTERFACE (G_TYPE_FILE,
|
||||||
g_local_file_file_iface_init))
|
g_local_file_file_iface_init))
|
||||||
@ -260,13 +261,13 @@ canonicalize_filename (const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_local_file_new:
|
* _g_local_file_new:
|
||||||
* @filename: filename of the file to create.
|
* @filename: filename of the file to create.
|
||||||
*
|
*
|
||||||
* Returns: new local #GFile.
|
* Returns: new local #GFile.
|
||||||
**/
|
**/
|
||||||
GFile *
|
GFile *
|
||||||
g_local_file_new (const char *filename)
|
_g_local_file_new (const char *filename)
|
||||||
{
|
{
|
||||||
GLocalFile *local;
|
GLocalFile *local;
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ g_local_file_get_parent (GFile *file)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dirname = g_path_get_dirname (local->filename);
|
dirname = g_path_get_dirname (local->filename);
|
||||||
parent = g_local_file_new (dirname);
|
parent = _g_local_file_new (dirname);
|
||||||
g_free (dirname);
|
g_free (dirname);
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
@ -429,7 +430,7 @@ g_local_file_dup (GFile *file)
|
|||||||
{
|
{
|
||||||
GLocalFile *local = G_LOCAL_FILE (file);
|
GLocalFile *local = G_LOCAL_FILE (file);
|
||||||
|
|
||||||
return g_local_file_new (local->filename);
|
return _g_local_file_new (local->filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint
|
static guint
|
||||||
@ -499,10 +500,10 @@ g_local_file_resolve_relative_path (GFile *file,
|
|||||||
GFile *child;
|
GFile *child;
|
||||||
|
|
||||||
if (g_path_is_absolute (relative_path))
|
if (g_path_is_absolute (relative_path))
|
||||||
return g_local_file_new (relative_path);
|
return _g_local_file_new (relative_path);
|
||||||
|
|
||||||
filename = g_build_filename (local->filename, relative_path, NULL);
|
filename = g_build_filename (local->filename, relative_path, NULL);
|
||||||
child = g_local_file_new (filename);
|
child = _g_local_file_new (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
return child;
|
return child;
|
||||||
@ -516,9 +517,9 @@ g_local_file_enumerate_children (GFile *file,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFile *local = G_LOCAL_FILE (file);
|
GLocalFile *local = G_LOCAL_FILE (file);
|
||||||
return g_local_file_enumerator_new (local->filename,
|
return _g_local_file_enumerator_new (local->filename,
|
||||||
attributes, flags,
|
attributes, flags,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFile *
|
static GFile *
|
||||||
@ -845,7 +846,7 @@ g_local_file_find_enclosing_volume (GFile *file,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
volume = g_volume_get_for_mount_path (mountpoint);
|
volume = _g_volume_get_for_mount_path (mountpoint);
|
||||||
g_free (mountpoint);
|
g_free (mountpoint);
|
||||||
if (volume)
|
if (volume)
|
||||||
return volume;
|
return volume;
|
||||||
@ -1036,7 +1037,7 @@ g_local_file_read (GFile *file,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_local_file_input_stream_new (fd);
|
return _g_local_file_input_stream_new (fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFileOutputStream *
|
static GFileOutputStream *
|
||||||
@ -1045,8 +1046,8 @@ g_local_file_append_to (GFile *file,
|
|||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return g_local_file_output_stream_append (G_LOCAL_FILE (file)->filename,
|
return _g_local_file_output_stream_append (G_LOCAL_FILE (file)->filename,
|
||||||
flags, cancellable, error);
|
flags, cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFileOutputStream *
|
static GFileOutputStream *
|
||||||
@ -1055,8 +1056,8 @@ g_local_file_create (GFile *file,
|
|||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return g_local_file_output_stream_create (G_LOCAL_FILE (file)->filename,
|
return _g_local_file_output_stream_create (G_LOCAL_FILE (file)->filename,
|
||||||
flags, cancellable, error);
|
flags, cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFileOutputStream *
|
static GFileOutputStream *
|
||||||
@ -1067,9 +1068,9 @@ g_local_file_replace (GFile *file,
|
|||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return g_local_file_output_stream_replace (G_LOCAL_FILE (file)->filename,
|
return _g_local_file_output_stream_replace (G_LOCAL_FILE (file)->filename,
|
||||||
etag, make_backup, flags,
|
etag, make_backup, flags,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1774,7 +1775,7 @@ g_local_file_monitor_dir (GFile* file,
|
|||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
GLocalFile* local_file = G_LOCAL_FILE(file);
|
GLocalFile* local_file = G_LOCAL_FILE(file);
|
||||||
return g_local_directory_monitor_new (local_file->filename, flags);
|
return _g_local_directory_monitor_new (local_file->filename, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFileMonitor*
|
static GFileMonitor*
|
||||||
@ -1783,7 +1784,7 @@ g_local_file_monitor_file (GFile* file,
|
|||||||
GCancellable *cancellable)
|
GCancellable *cancellable)
|
||||||
{
|
{
|
||||||
GLocalFile* local_file = G_LOCAL_FILE(file);
|
GLocalFile* local_file = G_LOCAL_FILE(file);
|
||||||
return g_local_file_monitor_new (local_file->filename, flags);
|
return _g_local_file_monitor_new (local_file->filename, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_LOCAL_FILE (g_local_file_get_type ())
|
#define G_TYPE_LOCAL_FILE (_g_local_file_get_type ())
|
||||||
#define G_LOCAL_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE, GLocalFile))
|
#define G_LOCAL_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE, GLocalFile))
|
||||||
#define G_LOCAL_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE, GLocalFileClass))
|
#define G_LOCAL_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE, GLocalFileClass))
|
||||||
#define G_IS_LOCAL_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE))
|
#define G_IS_LOCAL_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE))
|
||||||
@ -42,9 +42,9 @@ struct _GLocalFileClass
|
|||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_local_file_get_type (void) G_GNUC_CONST;
|
GType _g_local_file_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFile * g_local_file_new (const char *filename);
|
GFile * _g_local_file_new (const char *filename);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ struct _GLocalFileEnumerator
|
|||||||
gboolean follow_symlinks;
|
gboolean follow_symlinks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define g_local_file_enumerator_get_type _g_local_file_enumerator_get_type
|
||||||
G_DEFINE_TYPE (GLocalFileEnumerator, g_local_file_enumerator, G_TYPE_FILE_ENUMERATOR);
|
G_DEFINE_TYPE (GLocalFileEnumerator, g_local_file_enumerator, G_TYPE_FILE_ENUMERATOR);
|
||||||
|
|
||||||
static GFileInfo *g_local_file_enumerator_next_file (GFileEnumerator *enumerator,
|
static GFileInfo *g_local_file_enumerator_next_file (GFileEnumerator *enumerator,
|
||||||
@ -132,16 +133,15 @@ convert_file_to_io_error (GError **error,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GFileEnumerator *
|
GFileEnumerator *
|
||||||
g_local_file_enumerator_new (const char *filename,
|
_g_local_file_enumerator_new (const char *filename,
|
||||||
const char *attributes,
|
const char *attributes,
|
||||||
GFileQueryInfoFlags flags,
|
GFileQueryInfoFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFileEnumerator *local;
|
GLocalFileEnumerator *local;
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
GError *dir_error;
|
GError *dir_error;
|
||||||
int new_code;
|
|
||||||
|
|
||||||
dir_error = NULL;
|
dir_error = NULL;
|
||||||
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);
|
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_LOCAL_FILE_ENUMERATOR (g_local_file_enumerator_get_type ())
|
#define G_TYPE_LOCAL_FILE_ENUMERATOR (_g_local_file_enumerator_get_type ())
|
||||||
#define G_LOCAL_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_ENUMERATOR, GLocalFileEnumerator))
|
#define G_LOCAL_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_ENUMERATOR, GLocalFileEnumerator))
|
||||||
#define G_LOCAL_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_ENUMERATOR, GLocalFileEnumeratorClass))
|
#define G_LOCAL_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_ENUMERATOR, GLocalFileEnumeratorClass))
|
||||||
#define G_IS_LOCAL_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_ENUMERATOR))
|
#define G_IS_LOCAL_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_ENUMERATOR))
|
||||||
@ -47,13 +47,13 @@ struct _GLocalFileEnumeratorClass
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_local_file_enumerator_get_type (void) G_GNUC_CONST;
|
GType _g_local_file_enumerator_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFileEnumerator *g_local_file_enumerator_new (const char *filename,
|
GFileEnumerator *_g_local_file_enumerator_new (const char *filename,
|
||||||
const char *attributes,
|
const char *attributes,
|
||||||
GFileQueryInfoFlags flags,
|
GFileQueryInfoFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "gioalias.h"
|
#include "gioalias.h"
|
||||||
|
|
||||||
|
#define g_local_file_input_stream_get_type _g_local_file_input_stream_get_type
|
||||||
G_DEFINE_TYPE (GLocalFileInputStream, g_local_file_input_stream, G_TYPE_FILE_INPUT_STREAM);
|
G_DEFINE_TYPE (GLocalFileInputStream, g_local_file_input_stream, G_TYPE_FILE_INPUT_STREAM);
|
||||||
|
|
||||||
struct _GLocalFileInputStreamPrivate {
|
struct _GLocalFileInputStreamPrivate {
|
||||||
@ -113,7 +114,7 @@ g_local_file_input_stream_init (GLocalFileInputStream *info)
|
|||||||
* Returns: #GFileInputStream for the given file descriptor.
|
* Returns: #GFileInputStream for the given file descriptor.
|
||||||
**/
|
**/
|
||||||
GFileInputStream *
|
GFileInputStream *
|
||||||
g_local_file_input_stream_new (int fd)
|
_g_local_file_input_stream_new (int fd)
|
||||||
{
|
{
|
||||||
GLocalFileInputStream *stream;
|
GLocalFileInputStream *stream;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_LOCAL_FILE_INPUT_STREAM (g_local_file_input_stream_get_type ())
|
#define G_TYPE_LOCAL_FILE_INPUT_STREAM (_g_local_file_input_stream_get_type ())
|
||||||
#define G_LOCAL_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_INPUT_STREAM, GLocalFileInputStream))
|
#define G_LOCAL_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_INPUT_STREAM, GLocalFileInputStream))
|
||||||
#define G_LOCAL_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_INPUT_STREAM, GLocalFileInputStreamClass))
|
#define G_LOCAL_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_INPUT_STREAM, GLocalFileInputStreamClass))
|
||||||
#define G_IS_LOCAL_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_INPUT_STREAM))
|
#define G_IS_LOCAL_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_INPUT_STREAM))
|
||||||
@ -51,9 +51,9 @@ struct _GLocalFileInputStreamClass
|
|||||||
GFileInputStreamClass parent_class;
|
GFileInputStreamClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_local_file_input_stream_get_type (void) G_GNUC_CONST;
|
GType _g_local_file_input_stream_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFileInputStream *g_local_file_input_stream_new (int fd);
|
GFileInputStream *_g_local_file_input_stream_new (int fd);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ _compare_monitor_class_by_prio (gconstpointer a,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern GType g_inotify_file_monitor_get_type (void);
|
extern GType _g_inotify_file_monitor_get_type (void);
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
get_default_local_file_monitor (gpointer data)
|
get_default_local_file_monitor (gpointer data)
|
||||||
@ -155,7 +155,7 @@ get_default_local_file_monitor (gpointer data)
|
|||||||
|
|
||||||
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
|
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
|
||||||
/* Register Inotify monitor */
|
/* Register Inotify monitor */
|
||||||
g_inotify_file_monitor_get_type ();
|
_g_inotify_file_monitor_get_type ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_io_modules_ensure_loaded (GIO_MODULE_DIR);
|
g_io_modules_ensure_loaded (GIO_MODULE_DIR);
|
||||||
@ -198,8 +198,8 @@ get_default_local_file_monitor (gpointer data)
|
|||||||
* Returns: a new #GFileMonitor for the given @pathname.
|
* Returns: a new #GFileMonitor for the given @pathname.
|
||||||
**/
|
**/
|
||||||
GFileMonitor*
|
GFileMonitor*
|
||||||
g_local_file_monitor_new (const char* pathname,
|
_g_local_file_monitor_new (const char* pathname,
|
||||||
GFileMonitorFlags flags)
|
GFileMonitorFlags flags)
|
||||||
{
|
{
|
||||||
static GOnce once_init = G_ONCE_INIT;
|
static GOnce once_init = G_ONCE_INIT;
|
||||||
static GType monitor_type = G_TYPE_INVALID;
|
static GType monitor_type = G_TYPE_INVALID;
|
||||||
@ -211,3 +211,6 @@ g_local_file_monitor_new (const char* pathname,
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define __G_LOCAL_FILE_MONITOR_C__
|
||||||
|
#include "gioaliasdef.c"
|
||||||
|
@ -51,8 +51,8 @@ struct _GLocalFileMonitorClass {
|
|||||||
|
|
||||||
GType g_local_file_monitor_get_type (void) G_GNUC_CONST;
|
GType g_local_file_monitor_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFileMonitor* g_local_file_monitor_new (const char* pathname,
|
GFileMonitor* _g_local_file_monitor_new (const char* pathname,
|
||||||
GFileMonitorFlags flags);
|
GFileMonitorFlags flags);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include "gioalias.h"
|
#include "gioalias.h"
|
||||||
|
|
||||||
|
#define g_local_file_output_stream_get_type _g_local_file_output_stream_get_type
|
||||||
G_DEFINE_TYPE (GLocalFileOutputStream, g_local_file_output_stream, G_TYPE_FILE_OUTPUT_STREAM);
|
G_DEFINE_TYPE (GLocalFileOutputStream, g_local_file_output_stream, G_TYPE_FILE_OUTPUT_STREAM);
|
||||||
|
|
||||||
/* Some of the file replacement code was based on the code from gedit,
|
/* Some of the file replacement code was based on the code from gedit,
|
||||||
@ -403,10 +404,10 @@ g_local_file_output_stream_query_info (GFileOutputStream *stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GFileOutputStream *
|
GFileOutputStream *
|
||||||
g_local_file_output_stream_create (const char *filename,
|
_g_local_file_output_stream_create (const char *filename,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFileOutputStream *stream;
|
GLocalFileOutputStream *stream;
|
||||||
int mode;
|
int mode;
|
||||||
@ -446,10 +447,10 @@ g_local_file_output_stream_create (const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GFileOutputStream *
|
GFileOutputStream *
|
||||||
g_local_file_output_stream_append (const char *filename,
|
_g_local_file_output_stream_append (const char *filename,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFileOutputStream *stream;
|
GLocalFileOutputStream *stream;
|
||||||
int mode;
|
int mode;
|
||||||
@ -819,12 +820,12 @@ handle_overwrite_open (const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GFileOutputStream *
|
GFileOutputStream *
|
||||||
g_local_file_output_stream_replace (const char *filename,
|
_g_local_file_output_stream_replace (const char *filename,
|
||||||
const char *etag,
|
const char *etag,
|
||||||
gboolean create_backup,
|
gboolean create_backup,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFileOutputStream *stream;
|
GLocalFileOutputStream *stream;
|
||||||
int mode;
|
int mode;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_LOCAL_FILE_OUTPUT_STREAM (g_local_file_output_stream_get_type ())
|
#define G_TYPE_LOCAL_FILE_OUTPUT_STREAM (_g_local_file_output_stream_get_type ())
|
||||||
#define G_LOCAL_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_OUTPUT_STREAM, GLocalFileOutputStream))
|
#define G_LOCAL_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_LOCAL_FILE_OUTPUT_STREAM, GLocalFileOutputStream))
|
||||||
#define G_LOCAL_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_OUTPUT_STREAM, GLocalFileOutputStreamClass))
|
#define G_LOCAL_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_LOCAL_FILE_OUTPUT_STREAM, GLocalFileOutputStreamClass))
|
||||||
#define G_IS_LOCAL_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_OUTPUT_STREAM))
|
#define G_IS_LOCAL_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_LOCAL_FILE_OUTPUT_STREAM))
|
||||||
@ -52,21 +52,21 @@ struct _GLocalFileOutputStreamClass
|
|||||||
GFileOutputStreamClass parent_class;
|
GFileOutputStreamClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_local_file_output_stream_get_type (void) G_GNUC_CONST;
|
GType _g_local_file_output_stream_get_type (void) G_GNUC_CONST;
|
||||||
GFileOutputStream *g_local_file_output_stream_create (const char *filename,
|
GFileOutputStream *_g_local_file_output_stream_create (const char *filename,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
GFileOutputStream *g_local_file_output_stream_append (const char *filename,
|
GFileOutputStream *_g_local_file_output_stream_append (const char *filename,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
GFileOutputStream *g_local_file_output_stream_replace (const char *filename,
|
GFileOutputStream *_g_local_file_output_stream_replace (const char *filename,
|
||||||
const char *etag,
|
const char *etag,
|
||||||
gboolean create_backup,
|
gboolean create_backup,
|
||||||
GFileCreateFlags flags,
|
GFileCreateFlags flags,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ struct _GLocalVfsClass
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define g_local_vfs_get_type _g_local_vfs_get_type
|
||||||
G_DEFINE_TYPE (GLocalVfs, g_local_vfs, G_TYPE_VFS)
|
G_DEFINE_TYPE (GLocalVfs, g_local_vfs, G_TYPE_VFS)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -62,7 +63,7 @@ g_local_vfs_init (GLocalVfs *vfs)
|
|||||||
* Returns: a new #GVfs handle.
|
* Returns: a new #GVfs handle.
|
||||||
**/
|
**/
|
||||||
GVfs *
|
GVfs *
|
||||||
g_local_vfs_new (void)
|
_g_local_vfs_new (void)
|
||||||
{
|
{
|
||||||
return g_object_new (G_TYPE_LOCAL_VFS, NULL);
|
return g_object_new (G_TYPE_LOCAL_VFS, NULL);
|
||||||
}
|
}
|
||||||
@ -71,7 +72,7 @@ static GFile *
|
|||||||
g_local_vfs_get_file_for_path (GVfs *vfs,
|
g_local_vfs_get_file_for_path (GVfs *vfs,
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
return g_local_file_new (path);
|
return _g_local_file_new (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GFile *
|
static GFile *
|
||||||
@ -84,9 +85,9 @@ g_local_vfs_get_file_for_uri (GVfs *vfs,
|
|||||||
path = g_filename_from_uri (uri, NULL, NULL);
|
path = g_filename_from_uri (uri, NULL, NULL);
|
||||||
|
|
||||||
if (path != NULL)
|
if (path != NULL)
|
||||||
file = g_local_file_new (path);
|
file = _g_local_file_new (path);
|
||||||
else
|
else
|
||||||
file = g_dummy_file_new (uri);
|
file = _g_dummy_file_new (uri);
|
||||||
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
@ -160,7 +161,7 @@ g_local_vfs_parse_name (GVfs *vfs,
|
|||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
filename = g_strdup (parse_name);
|
filename = g_strdup (parse_name);
|
||||||
|
|
||||||
file = g_local_file_new (filename);
|
file = _g_local_file_new (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_LOCAL_VFS (g_local_vfs_get_type ())
|
#define G_TYPE_LOCAL_VFS (_g_local_vfs_get_type ())
|
||||||
#define G_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOCAL_VFS, GLocalVfs))
|
#define G_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOCAL_VFS, GLocalVfs))
|
||||||
#define G_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_LOCAL_VFS, GLocalVfsClass))
|
#define G_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_LOCAL_VFS, GLocalVfsClass))
|
||||||
#define G_IS_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOCAL_VFS))
|
#define G_IS_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOCAL_VFS))
|
||||||
@ -37,9 +37,9 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _GLocalVfs GLocalVfs;
|
typedef struct _GLocalVfs GLocalVfs;
|
||||||
typedef struct _GLocalVfsClass GLocalVfsClass;
|
typedef struct _GLocalVfsClass GLocalVfsClass;
|
||||||
|
|
||||||
GType g_local_vfs_get_type (void) G_GNUC_CONST;
|
GType _g_local_vfs_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GVfs *g_local_vfs_new (void);
|
GVfs *_g_local_vfs_new (void);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -30,3 +30,6 @@ static void
|
|||||||
g_native_volume_monitor_init (GNativeVolumeMonitor *native_monitor)
|
g_native_volume_monitor_init (GNativeVolumeMonitor *native_monitor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define __G_NATIVE_VOLUME_MONITOR_C__
|
||||||
|
#include "gioaliasdef.c"
|
||||||
|
@ -41,6 +41,7 @@ struct _GPollFileMonitor
|
|||||||
|
|
||||||
#define POLL_TIME_SECS 5
|
#define POLL_TIME_SECS 5
|
||||||
|
|
||||||
|
#define g_poll_file_monitor_get_type _g_poll_file_monitor_get_type
|
||||||
G_DEFINE_TYPE (GPollFileMonitor, g_poll_file_monitor, G_TYPE_FILE_MONITOR)
|
G_DEFINE_TYPE (GPollFileMonitor, g_poll_file_monitor, G_TYPE_FILE_MONITOR)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -201,7 +202,7 @@ got_initial_info (GObject *source_object,
|
|||||||
* Returns: a new #GFileMonitor for the given #GFile.
|
* Returns: a new #GFileMonitor for the given #GFile.
|
||||||
**/
|
**/
|
||||||
GFileMonitor*
|
GFileMonitor*
|
||||||
g_poll_file_monitor_new (GFile *file)
|
_g_poll_file_monitor_new (GFile *file)
|
||||||
{
|
{
|
||||||
GPollFileMonitor* poll_monitor;
|
GPollFileMonitor* poll_monitor;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_POLL_FILE_MONITOR (g_poll_file_monitor_get_type ())
|
#define G_TYPE_POLL_FILE_MONITOR (_g_poll_file_monitor_get_type ())
|
||||||
#define G_POLL_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_POLL_FILE_MONITOR, GPollFileMonitor))
|
#define G_POLL_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_POLL_FILE_MONITOR, GPollFileMonitor))
|
||||||
#define G_POLL_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_POLL_FILE_MONITOR, GPollFileMonitorClass))
|
#define G_POLL_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_POLL_FILE_MONITOR, GPollFileMonitorClass))
|
||||||
#define G_IS_POLL_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_POLL_FILE_MONITOR))
|
#define G_IS_POLL_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_POLL_FILE_MONITOR))
|
||||||
@ -41,9 +41,9 @@ struct _GPollFileMonitorClass {
|
|||||||
GFileMonitorClass parent_class;
|
GFileMonitorClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_poll_file_monitor_get_type (void) G_GNUC_CONST;
|
GType _g_poll_file_monitor_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GFileMonitor* g_poll_file_monitor_new (GFile *file);
|
GFileMonitor* _g_poll_file_monitor_new (GFile *file);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ static void g_union_volume_monitor_remove_monitor (GUnionVolumeMonitor *union_mo
|
|||||||
GVolumeMonitor *child_monitor);
|
GVolumeMonitor *child_monitor);
|
||||||
|
|
||||||
|
|
||||||
|
#define g_union_volume_monitor_get_type _g_union_volume_monitor_get_type
|
||||||
G_DEFINE_TYPE (GUnionVolumeMonitor, g_union_volume_monitor, G_TYPE_VOLUME_MONITOR);
|
G_DEFINE_TYPE (GUnionVolumeMonitor, g_union_volume_monitor, G_TYPE_VOLUME_MONITOR);
|
||||||
|
|
||||||
|
|
||||||
@ -253,7 +254,7 @@ get_default_native_type (gpointer data)
|
|||||||
{
|
{
|
||||||
volatile GType unix_type;
|
volatile GType unix_type;
|
||||||
/* volatile is required to avoid any G_GNUC_CONST optimizations */
|
/* volatile is required to avoid any G_GNUC_CONST optimizations */
|
||||||
unix_type = g_unix_volume_monitor_get_type ();
|
unix_type = _g_unix_volume_monitor_get_type ();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -374,7 +375,7 @@ g_volume_monitor_get (void)
|
|||||||
* Returns: a #GVolume for given @mountpoint or %NULL.
|
* Returns: a #GVolume for given @mountpoint or %NULL.
|
||||||
**/
|
**/
|
||||||
GVolume *
|
GVolume *
|
||||||
g_volume_get_for_mount_path (const char *mountpoint)
|
_g_volume_get_for_mount_path (const char *mountpoint)
|
||||||
{
|
{
|
||||||
GType native_type;
|
GType native_type;
|
||||||
GNativeVolumeMonitorClass *klass;
|
GNativeVolumeMonitorClass *klass;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_UNION_VOLUME_MONITOR (g_union_volume_monitor_get_type ())
|
#define G_TYPE_UNION_VOLUME_MONITOR (_g_union_volume_monitor_get_type ())
|
||||||
#define G_UNION_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNION_VOLUME_MONITOR, GUnionVolumeMonitor))
|
#define G_UNION_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNION_VOLUME_MONITOR, GUnionVolumeMonitor))
|
||||||
#define G_UNION_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNION_VOLUME_MONITOR, GUnionVolumeMonitorClass))
|
#define G_UNION_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNION_VOLUME_MONITOR, GUnionVolumeMonitorClass))
|
||||||
#define G_IS_UNION_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNION_VOLUME_MONITOR))
|
#define G_IS_UNION_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNION_VOLUME_MONITOR))
|
||||||
@ -42,12 +42,7 @@ struct _GUnionVolumeMonitorClass {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_union_volume_monitor_get_type (void) G_GNUC_CONST;
|
GType _g_union_volume_monitor_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GList * g_union_volume_monitor_convert_volumes (GUnionVolumeMonitor *monitor,
|
|
||||||
GList *child_volumes);
|
|
||||||
GDrive *g_union_volume_monitor_convert_drive (GUnionVolumeMonitor *monitor,
|
|
||||||
GDrive *child_drive);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "gunixdrive.h"
|
#include "gunixdrive.h"
|
||||||
#include "gunixvolume.h"
|
#include "gunixvolume.h"
|
||||||
#include "gdriveprivate.h"
|
|
||||||
#include "gthemedicon.h"
|
#include "gthemedicon.h"
|
||||||
#include "gvolumemonitor.h"
|
#include "gvolumemonitor.h"
|
||||||
#include "glibintl.h"
|
#include "glibintl.h"
|
||||||
@ -46,6 +45,7 @@ struct _GUnixDrive {
|
|||||||
|
|
||||||
static void g_unix_volume_drive_iface_init (GDriveIface *iface);
|
static void g_unix_volume_drive_iface_init (GDriveIface *iface);
|
||||||
|
|
||||||
|
#define g_unix_drive_get_type _g_unix_drive_get_type
|
||||||
G_DEFINE_TYPE_WITH_CODE (GUnixDrive, g_unix_drive, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GUnixDrive, g_unix_drive, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_DRIVE,
|
G_IMPLEMENT_INTERFACE (G_TYPE_DRIVE,
|
||||||
g_unix_volume_drive_iface_init))
|
g_unix_volume_drive_iface_init))
|
||||||
@ -58,7 +58,7 @@ g_unix_drive_finalize (GObject *object)
|
|||||||
drive = G_UNIX_DRIVE (object);
|
drive = G_UNIX_DRIVE (object);
|
||||||
|
|
||||||
if (drive->volume)
|
if (drive->volume)
|
||||||
g_unix_volume_unset_drive (drive->volume, drive);
|
_g_unix_volume_unset_drive (drive->volume, drive);
|
||||||
|
|
||||||
g_free (drive->name);
|
g_free (drive->name);
|
||||||
g_free (drive->icon);
|
g_free (drive->icon);
|
||||||
@ -126,8 +126,8 @@ type_to_icon (GUnixMountType type)
|
|||||||
* Returns: a #GUnixDrive for the given #GUnixMountPoint.
|
* Returns: a #GUnixDrive for the given #GUnixMountPoint.
|
||||||
**/
|
**/
|
||||||
GUnixDrive *
|
GUnixDrive *
|
||||||
g_unix_drive_new (GVolumeMonitor *volume_monitor,
|
_g_unix_drive_new (GVolumeMonitor *volume_monitor,
|
||||||
GUnixMountPoint *mountpoint)
|
GUnixMountPoint *mountpoint)
|
||||||
{
|
{
|
||||||
GUnixDrive *drive;
|
GUnixDrive *drive;
|
||||||
|
|
||||||
@ -154,11 +154,11 @@ g_unix_drive_new (GVolumeMonitor *volume_monitor,
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_unix_drive_disconnected (GUnixDrive *drive)
|
_g_unix_drive_disconnected (GUnixDrive *drive)
|
||||||
{
|
{
|
||||||
if (drive->volume)
|
if (drive->volume)
|
||||||
{
|
{
|
||||||
g_unix_volume_unset_drive (drive->volume, drive);
|
_g_unix_volume_unset_drive (drive->volume, drive);
|
||||||
drive->volume = NULL;
|
drive->volume = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -170,14 +170,14 @@ g_unix_drive_disconnected (GUnixDrive *drive)
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_unix_drive_set_volume (GUnixDrive *drive,
|
_g_unix_drive_set_volume (GUnixDrive *drive,
|
||||||
GUnixVolume *volume)
|
GUnixVolume *volume)
|
||||||
{
|
{
|
||||||
if (drive->volume == volume)
|
if (drive->volume == volume)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (drive->volume)
|
if (drive->volume)
|
||||||
g_unix_volume_unset_drive (drive->volume, drive);
|
_g_unix_volume_unset_drive (drive->volume, drive);
|
||||||
|
|
||||||
drive->volume = volume;
|
drive->volume = volume;
|
||||||
|
|
||||||
@ -192,8 +192,8 @@ g_unix_drive_set_volume (GUnixDrive *drive,
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_unix_drive_unset_volume (GUnixDrive *drive,
|
_g_unix_drive_unset_volume (GUnixDrive *drive,
|
||||||
GUnixVolume *volume)
|
GUnixVolume *volume)
|
||||||
{
|
{
|
||||||
if (drive->volume == volume)
|
if (drive->volume == volume)
|
||||||
{
|
{
|
||||||
@ -263,7 +263,7 @@ g_unix_drive_has_volumes (GDrive *drive)
|
|||||||
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_drive_has_mountpoint (GUnixDrive *drive,
|
_g_unix_drive_has_mountpoint (GUnixDrive *drive,
|
||||||
const char *mountpoint)
|
const char *mountpoint)
|
||||||
{
|
{
|
||||||
return strcmp (drive->mountpoint, mountpoint) == 0;
|
return strcmp (drive->mountpoint, mountpoint) == 0;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_UNIX_DRIVE (g_unix_drive_get_type ())
|
#define G_TYPE_UNIX_DRIVE (_g_unix_drive_get_type ())
|
||||||
#define G_UNIX_DRIVE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_DRIVE, GUnixDrive))
|
#define G_UNIX_DRIVE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_DRIVE, GUnixDrive))
|
||||||
#define G_UNIX_DRIVE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_DRIVE, GUnixDriveClass))
|
#define G_UNIX_DRIVE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_DRIVE, GUnixDriveClass))
|
||||||
#define G_IS_UNIX_DRIVE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_DRIVE))
|
#define G_IS_UNIX_DRIVE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_DRIVE))
|
||||||
@ -42,17 +42,17 @@ struct _GUnixDriveClass {
|
|||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_unix_drive_get_type (void) G_GNUC_CONST;
|
GType _g_unix_drive_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GUnixDrive *g_unix_drive_new (GVolumeMonitor *volume_monitor,
|
GUnixDrive *_g_unix_drive_new (GVolumeMonitor *volume_monitor,
|
||||||
GUnixMountPoint *mountpoint);
|
GUnixMountPoint *mountpoint);
|
||||||
gboolean g_unix_drive_has_mountpoint (GUnixDrive *drive,
|
gboolean _g_unix_drive_has_mountpoint (GUnixDrive *drive,
|
||||||
const char *mountpoint);
|
const char *mountpoint);
|
||||||
void g_unix_drive_set_volume (GUnixDrive *drive,
|
void _g_unix_drive_set_volume (GUnixDrive *drive,
|
||||||
GUnixVolume *volume);
|
GUnixVolume *volume);
|
||||||
void g_unix_drive_unset_volume (GUnixDrive *drive,
|
void _g_unix_drive_unset_volume (GUnixDrive *drive,
|
||||||
GUnixVolume *volume);
|
GUnixVolume *volume);
|
||||||
void g_unix_drive_disconnected (GUnixDrive *drive);
|
void _g_unix_drive_disconnected (GUnixDrive *drive);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ struct _GUnixVolume {
|
|||||||
|
|
||||||
static void g_unix_volume_volume_iface_init (GVolumeIface *iface);
|
static void g_unix_volume_volume_iface_init (GVolumeIface *iface);
|
||||||
|
|
||||||
|
#define g_unix_volume_get_type _g_unix_volume_get_type
|
||||||
G_DEFINE_TYPE_WITH_CODE (GUnixVolume, g_unix_volume, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GUnixVolume, g_unix_volume, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_VOLUME,
|
G_IMPLEMENT_INTERFACE (G_TYPE_VOLUME,
|
||||||
g_unix_volume_volume_iface_init))
|
g_unix_volume_volume_iface_init))
|
||||||
@ -59,7 +60,7 @@ g_unix_volume_finalize (GObject *object)
|
|||||||
volume = G_UNIX_VOLUME (object);
|
volume = G_UNIX_VOLUME (object);
|
||||||
|
|
||||||
if (volume->drive)
|
if (volume->drive)
|
||||||
g_unix_drive_unset_volume (volume->drive, volume);
|
_g_unix_drive_unset_volume (volume->drive, volume);
|
||||||
|
|
||||||
g_assert (volume->drive == NULL);
|
g_assert (volume->drive == NULL);
|
||||||
g_free (volume->name);
|
g_free (volume->name);
|
||||||
@ -138,8 +139,8 @@ type_to_icon (GUnixMountType type)
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
GUnixVolume *
|
GUnixVolume *
|
||||||
g_unix_volume_new (GUnixMount *mount,
|
_g_unix_volume_new (GUnixMount *mount,
|
||||||
GUnixDrive *drive)
|
GUnixDrive *drive)
|
||||||
{
|
{
|
||||||
GUnixVolume *volume;
|
GUnixVolume *volume;
|
||||||
GUnixMountType type;
|
GUnixMountType type;
|
||||||
@ -155,7 +156,7 @@ g_unix_volume_new (GUnixMount *mount,
|
|||||||
volume = g_object_new (G_TYPE_UNIX_VOLUME, NULL);
|
volume = g_object_new (G_TYPE_UNIX_VOLUME, NULL);
|
||||||
volume->drive = drive;
|
volume->drive = drive;
|
||||||
if (drive)
|
if (drive)
|
||||||
g_unix_drive_set_volume (drive, volume);
|
_g_unix_drive_set_volume (drive, volume);
|
||||||
volume->mountpoint = g_strdup (mount_path);
|
volume->mountpoint = g_strdup (mount_path);
|
||||||
|
|
||||||
type = g_unix_mount_guess_type (mount);
|
type = g_unix_mount_guess_type (mount);
|
||||||
@ -194,11 +195,11 @@ g_unix_volume_new (GUnixMount *mount,
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_unix_volume_unmounted (GUnixVolume *volume)
|
_g_unix_volume_unmounted (GUnixVolume *volume)
|
||||||
{
|
{
|
||||||
if (volume->drive)
|
if (volume->drive)
|
||||||
{
|
{
|
||||||
g_unix_drive_unset_volume (volume->drive, volume);
|
_g_unix_drive_unset_volume (volume->drive, volume);
|
||||||
volume->drive = NULL;
|
volume->drive = NULL;
|
||||||
g_signal_emit_by_name (volume, "changed");
|
g_signal_emit_by_name (volume, "changed");
|
||||||
}
|
}
|
||||||
@ -211,8 +212,8 @@ g_unix_volume_unmounted (GUnixVolume *volume)
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
g_unix_volume_unset_drive (GUnixVolume *volume,
|
_g_unix_volume_unset_drive (GUnixVolume *volume,
|
||||||
GUnixDrive *drive)
|
GUnixDrive *drive)
|
||||||
{
|
{
|
||||||
if (volume->drive == drive)
|
if (volume->drive == drive)
|
||||||
{
|
{
|
||||||
@ -254,8 +255,8 @@ g_unix_volume_get_name (GVolume *volume)
|
|||||||
* Returns:
|
* Returns:
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_volume_has_mountpoint (GUnixVolume *volume,
|
_g_unix_volume_has_mountpoint (GUnixVolume *volume,
|
||||||
const char *mountpoint)
|
const char *mountpoint)
|
||||||
{
|
{
|
||||||
return strcmp (volume->mountpoint, mountpoint) == 0;
|
return strcmp (volume->mountpoint, mountpoint) == 0;
|
||||||
}
|
}
|
||||||
@ -287,6 +288,7 @@ g_unix_volume_can_eject (GVolume *volume)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
g_unix_volume_unmount (GVolume *volume,
|
g_unix_volume_unmount (GVolume *volume,
|
||||||
|
GCancellable *cancellable,
|
||||||
GAsyncReadyCallback callback,
|
GAsyncReadyCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@ -303,6 +305,7 @@ g_unix_volume_unmount_finish (GVolume *volume,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
g_unix_volume_eject (GVolume *volume,
|
g_unix_volume_eject (GVolume *volume,
|
||||||
|
GCancellable *cancellable,
|
||||||
GAsyncReadyCallback callback,
|
GAsyncReadyCallback callback,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_UNIX_VOLUME (g_unix_volume_get_type ())
|
#define G_TYPE_UNIX_VOLUME (_g_unix_volume_get_type ())
|
||||||
#define G_UNIX_VOLUME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_VOLUME, GUnixVolume))
|
#define G_UNIX_VOLUME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_VOLUME, GUnixVolume))
|
||||||
#define G_UNIX_VOLUME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_VOLUME, GUnixVolumeClass))
|
#define G_UNIX_VOLUME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_VOLUME, GUnixVolumeClass))
|
||||||
#define G_IS_UNIX_VOLUME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_VOLUME))
|
#define G_IS_UNIX_VOLUME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_VOLUME))
|
||||||
@ -42,15 +42,15 @@ struct _GUnixVolumeClass {
|
|||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_unix_volume_get_type (void) G_GNUC_CONST;
|
GType _g_unix_volume_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GUnixVolume *g_unix_volume_new (GUnixMount *mount,
|
GUnixVolume *_g_unix_volume_new (GUnixMount *mount,
|
||||||
GUnixDrive *drive);
|
GUnixDrive *drive);
|
||||||
gboolean g_unix_volume_has_mountpoint (GUnixVolume *volume,
|
gboolean _g_unix_volume_has_mountpoint (GUnixVolume *volume,
|
||||||
const char *mountpoint);
|
const char *mountpoint);
|
||||||
void g_unix_volume_unset_drive (GUnixVolume *volume,
|
void _g_unix_volume_unset_drive (GUnixVolume *volume,
|
||||||
GUnixDrive *drive);
|
GUnixDrive *drive);
|
||||||
void g_unix_volume_unmounted (GUnixVolume *volume);
|
void _g_unix_volume_unmounted (GUnixVolume *volume);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ static void mounts_changed (GUnixMountMonitor *mount_monitor,
|
|||||||
static void update_drives (GUnixVolumeMonitor *monitor);
|
static void update_drives (GUnixVolumeMonitor *monitor);
|
||||||
static void update_volumes (GUnixVolumeMonitor *monitor);
|
static void update_volumes (GUnixVolumeMonitor *monitor);
|
||||||
|
|
||||||
|
#define g_unix_volume_monitor_get_type _g_unix_volume_monitor_get_type
|
||||||
G_DEFINE_TYPE (GUnixVolumeMonitor, g_unix_volume_monitor, G_TYPE_NATIVE_VOLUME_MONITOR);
|
G_DEFINE_TYPE (GUnixVolumeMonitor, g_unix_volume_monitor, G_TYPE_NATIVE_VOLUME_MONITOR);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -116,7 +117,7 @@ get_volume_for_mountpoint (const char *mountpoint)
|
|||||||
mount = g_get_unix_mount_at (mountpoint, NULL);
|
mount = g_get_unix_mount_at (mountpoint, NULL);
|
||||||
|
|
||||||
/* TODO: Set drive? */
|
/* TODO: Set drive? */
|
||||||
volume = g_unix_volume_new (mount, NULL);
|
volume = _g_unix_volume_new (mount, NULL);
|
||||||
|
|
||||||
return G_VOLUME (volume);
|
return G_VOLUME (volume);
|
||||||
}
|
}
|
||||||
@ -184,7 +185,7 @@ g_unix_volume_monitor_init (GUnixVolumeMonitor *unix_monitor)
|
|||||||
* Returns: a new #GVolumeMonitor.
|
* Returns: a new #GVolumeMonitor.
|
||||||
**/
|
**/
|
||||||
GVolumeMonitor *
|
GVolumeMonitor *
|
||||||
g_unix_volume_monitor_new (void)
|
_g_unix_volume_monitor_new (void)
|
||||||
{
|
{
|
||||||
GUnixVolumeMonitor *monitor;
|
GUnixVolumeMonitor *monitor;
|
||||||
|
|
||||||
@ -242,8 +243,8 @@ diff_sorted_lists (GList *list1, GList *list2, GCompareFunc compare,
|
|||||||
* Returns: #GUnixDrive for the given @mountpoint.
|
* Returns: #GUnixDrive for the given @mountpoint.
|
||||||
**/
|
**/
|
||||||
GUnixDrive *
|
GUnixDrive *
|
||||||
g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
|
_g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
|
||||||
const char *mountpoint)
|
const char *mountpoint)
|
||||||
{
|
{
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
@ -251,7 +252,7 @@ g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
|
|||||||
{
|
{
|
||||||
GUnixDrive *drive = l->data;
|
GUnixDrive *drive = l->data;
|
||||||
|
|
||||||
if (g_unix_drive_has_mountpoint (drive, mountpoint))
|
if (_g_unix_drive_has_mountpoint (drive, mountpoint))
|
||||||
return drive;
|
return drive;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +269,7 @@ find_volume_by_mountpoint (GUnixVolumeMonitor *monitor,
|
|||||||
{
|
{
|
||||||
GUnixVolume *volume = l->data;
|
GUnixVolume *volume = l->data;
|
||||||
|
|
||||||
if (g_unix_volume_has_mountpoint (volume, mountpoint))
|
if (_g_unix_volume_has_mountpoint (volume, mountpoint))
|
||||||
return volume;
|
return volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,11 +296,11 @@ update_drives (GUnixVolumeMonitor *monitor)
|
|||||||
{
|
{
|
||||||
GUnixMountPoint *mountpoint = l->data;
|
GUnixMountPoint *mountpoint = l->data;
|
||||||
|
|
||||||
drive = g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
|
drive = _g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
|
||||||
g_unix_mount_point_get_mount_path (mountpoint));
|
g_unix_mount_point_get_mount_path (mountpoint));
|
||||||
if (drive)
|
if (drive)
|
||||||
{
|
{
|
||||||
g_unix_drive_disconnected (drive);
|
_g_unix_drive_disconnected (drive);
|
||||||
monitor->drives = g_list_remove (monitor->drives, drive);
|
monitor->drives = g_list_remove (monitor->drives, drive);
|
||||||
g_signal_emit_by_name (monitor, "drive_disconnected", drive);
|
g_signal_emit_by_name (monitor, "drive_disconnected", drive);
|
||||||
g_object_unref (drive);
|
g_object_unref (drive);
|
||||||
@ -310,7 +311,7 @@ update_drives (GUnixVolumeMonitor *monitor)
|
|||||||
{
|
{
|
||||||
GUnixMountPoint *mountpoint = l->data;
|
GUnixMountPoint *mountpoint = l->data;
|
||||||
|
|
||||||
drive = g_unix_drive_new (G_VOLUME_MONITOR (monitor), mountpoint);
|
drive = _g_unix_drive_new (G_VOLUME_MONITOR (monitor), mountpoint);
|
||||||
if (drive)
|
if (drive)
|
||||||
{
|
{
|
||||||
monitor->drives = g_list_prepend (monitor->drives, drive);
|
monitor->drives = g_list_prepend (monitor->drives, drive);
|
||||||
@ -351,7 +352,7 @@ update_volumes (GUnixVolumeMonitor *monitor)
|
|||||||
volume = find_volume_by_mountpoint (monitor, g_unix_mount_get_mount_path (mount));
|
volume = find_volume_by_mountpoint (monitor, g_unix_mount_get_mount_path (mount));
|
||||||
if (volume)
|
if (volume)
|
||||||
{
|
{
|
||||||
g_unix_volume_unmounted (volume);
|
_g_unix_volume_unmounted (volume);
|
||||||
monitor->volumes = g_list_remove (monitor->volumes, volume);
|
monitor->volumes = g_list_remove (monitor->volumes, volume);
|
||||||
g_signal_emit_by_name (monitor, "volume_unmounted", volume);
|
g_signal_emit_by_name (monitor, "volume_unmounted", volume);
|
||||||
g_object_unref (volume);
|
g_object_unref (volume);
|
||||||
@ -364,9 +365,9 @@ update_volumes (GUnixVolumeMonitor *monitor)
|
|||||||
|
|
||||||
mount_path = g_unix_mount_get_mount_path (mount);
|
mount_path = g_unix_mount_get_mount_path (mount);
|
||||||
|
|
||||||
drive = g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
|
drive = _g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
|
||||||
mount_path);
|
mount_path);
|
||||||
volume = g_unix_volume_new (mount, drive);
|
volume = _g_unix_volume_new (mount, drive);
|
||||||
if (volume)
|
if (volume)
|
||||||
{
|
{
|
||||||
monitor->volumes = g_list_prepend (monitor->volumes, volume);
|
monitor->volumes = g_list_prepend (monitor->volumes, volume);
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_UNIX_VOLUME_MONITOR (g_unix_volume_monitor_get_type ())
|
#define G_TYPE_UNIX_VOLUME_MONITOR (_g_unix_volume_monitor_get_type ())
|
||||||
#define G_UNIX_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_VOLUME_MONITOR, GUnixVolumeMonitor))
|
#define G_UNIX_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_VOLUME_MONITOR, GUnixVolumeMonitor))
|
||||||
#define G_UNIX_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_VOLUME_MONITOR, GUnixVolumeMonitorClass))
|
#define G_UNIX_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_VOLUME_MONITOR, GUnixVolumeMonitorClass))
|
||||||
#define G_IS_UNIX_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_VOLUME_MONITOR))
|
#define G_IS_UNIX_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_VOLUME_MONITOR))
|
||||||
@ -46,11 +46,11 @@ struct _GUnixVolumeMonitorClass {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_unix_volume_monitor_get_type (void) G_GNUC_CONST;
|
GType _g_unix_volume_monitor_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GVolumeMonitor *g_unix_volume_monitor_new (void);
|
GVolumeMonitor *_g_unix_volume_monitor_new (void);
|
||||||
GUnixDrive * g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
|
GUnixDrive * _g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
|
||||||
const char *mountpoint);
|
const char *mountpoint);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ get_default_vfs (gpointer arg)
|
|||||||
|
|
||||||
/* Ensure GLocalVfs type is available
|
/* Ensure GLocalVfs type is available
|
||||||
the cast is required to avoid any G_GNUC_CONST optimizations */
|
the cast is required to avoid any G_GNUC_CONST optimizations */
|
||||||
casted_get_type = g_local_vfs_get_type;
|
casted_get_type = _g_local_vfs_get_type;
|
||||||
local_type = casted_get_type ();
|
local_type = casted_get_type ();
|
||||||
|
|
||||||
/* Ensure vfs in modules loaded */
|
/* Ensure vfs in modules loaded */
|
||||||
@ -271,7 +271,7 @@ g_vfs_get_local (void)
|
|||||||
static gsize vfs = 0;
|
static gsize vfs = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&vfs))
|
if (g_once_init_enter (&vfs))
|
||||||
g_once_init_leave (&vfs, (gsize)g_local_vfs_new ());
|
g_once_init_leave (&vfs, (gsize)_g_local_vfs_new ());
|
||||||
|
|
||||||
return G_VFS (vfs);
|
return G_VFS (vfs);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
GVolume *g_volume_get_for_mount_path (const char *mountpoint);
|
GVolume *_g_volume_get_for_mount_path (const char *mountpoint);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ struct _GInotifyDirectoryMonitor
|
|||||||
|
|
||||||
static gboolean g_inotify_directory_monitor_cancel (GDirectoryMonitor* monitor);
|
static gboolean g_inotify_directory_monitor_cancel (GDirectoryMonitor* monitor);
|
||||||
|
|
||||||
|
#define g_inotify_directory_monitor_get_type _g_inotify_directory_monitor_get_type
|
||||||
G_DEFINE_TYPE (GInotifyDirectoryMonitor, g_inotify_directory_monitor, G_TYPE_LOCAL_DIRECTORY_MONITOR)
|
G_DEFINE_TYPE (GInotifyDirectoryMonitor, g_inotify_directory_monitor, G_TYPE_LOCAL_DIRECTORY_MONITOR)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_INOTIFY_DIRECTORY_MONITOR (g_inotify_directory_monitor_get_type ())
|
#define G_TYPE_INOTIFY_DIRECTORY_MONITOR (_g_inotify_directory_monitor_get_type ())
|
||||||
#define G_INOTIFY_DIRECTORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INOTIFY_DIRECTORY_MONITOR, GInotifyDirectoryMonitor))
|
#define G_INOTIFY_DIRECTORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INOTIFY_DIRECTORY_MONITOR, GInotifyDirectoryMonitor))
|
||||||
#define G_INOTIFY_DIRECTORY_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_INOTIFY_DIRECTORY_MONITOR, GInotifyDirectoryMonitorClass))
|
#define G_INOTIFY_DIRECTORY_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_INOTIFY_DIRECTORY_MONITOR, GInotifyDirectoryMonitorClass))
|
||||||
#define G_IS_INOTIFY_DIRECTORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INOTIFY_DIRECTORY_MONITOR))
|
#define G_IS_INOTIFY_DIRECTORY_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INOTIFY_DIRECTORY_MONITOR))
|
||||||
@ -47,7 +47,7 @@ struct _GInotifyDirectoryMonitorClass {
|
|||||||
GLocalDirectoryMonitorClass parent_class;
|
GLocalDirectoryMonitorClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_inotify_directory_monitor_get_type (void);
|
GType _g_inotify_directory_monitor_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ struct _GInotifyFileMonitor
|
|||||||
|
|
||||||
static gboolean g_inotify_file_monitor_cancel (GFileMonitor* monitor);
|
static gboolean g_inotify_file_monitor_cancel (GFileMonitor* monitor);
|
||||||
|
|
||||||
|
#define g_inotify_file_monitor_get_type _g_inotify_file_monitor_get_type
|
||||||
G_DEFINE_TYPE (GInotifyFileMonitor, g_inotify_file_monitor, G_TYPE_LOCAL_FILE_MONITOR)
|
G_DEFINE_TYPE (GInotifyFileMonitor, g_inotify_file_monitor, G_TYPE_LOCAL_FILE_MONITOR)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define G_TYPE_INOTIFY_FILE_MONITOR (g_inotify_file_monitor_get_type ())
|
#define G_TYPE_INOTIFY_FILE_MONITOR (_g_inotify_file_monitor_get_type ())
|
||||||
#define G_INOTIFY_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INOTIFY_FILE_MONITOR, GInotifyFileMonitor))
|
#define G_INOTIFY_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INOTIFY_FILE_MONITOR, GInotifyFileMonitor))
|
||||||
#define G_INOTIFY_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_INOTIFY_FILE_MONITOR, GInotifyFileMonitorClass))
|
#define G_INOTIFY_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), G_TYPE_INOTIFY_FILE_MONITOR, GInotifyFileMonitorClass))
|
||||||
#define G_IS_INOTIFY_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INOTIFY_FILE_MONITOR))
|
#define G_IS_INOTIFY_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INOTIFY_FILE_MONITOR))
|
||||||
#define G_IS_INOTIFY_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INOTIFY_FILE_MONITOR))
|
#define G_IS_INOTIFY_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INOTIFY_FILE_MONITOR))
|
||||||
@ -47,7 +47,7 @@ struct _GInotifyFileMonitorClass {
|
|||||||
GLocalFileMonitorClass parent_class;
|
GLocalFileMonitorClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_inotify_file_monitor_get_type (void);
|
GType _g_inotify_file_monitor_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -49,6 +49,9 @@
|
|||||||
#include "inotify-path.h"
|
#include "inotify-path.h"
|
||||||
#include "inotify-diag.h"
|
#include "inotify-diag.h"
|
||||||
|
|
||||||
|
#include "gioalias.h"
|
||||||
|
|
||||||
|
|
||||||
static gboolean ih_debug_enabled = FALSE;
|
static gboolean ih_debug_enabled = FALSE;
|
||||||
#define IH_W if (ih_debug_enabled) g_warning
|
#define IH_W if (ih_debug_enabled) g_warning
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user