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:
Alexander Larsson 2007-11-28 16:01:59 +00:00 committed by Alexander Larsson
parent 3deb5aceda
commit d9594f5709
41 changed files with 277 additions and 229 deletions

View File

@ -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>
* Makefile.am:

View File

@ -129,7 +129,6 @@ libgio_2_0_la_SOURCES = \
gdataoutputstream.c \
gdirectorymonitor.c \
gdrive.c \
gdriveprivate.h \
gdummyfile.h \
gdummyfile.c \
gfile.c \

View File

@ -72,6 +72,7 @@ struct _GDesktopAppInfo
/* 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_IMPLEMENT_INTERFACE (G_TYPE_APP_INFO,
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.
**/
GDesktopAppInfo *
g_desktop_app_info_new_from_filename (const char *filename)
_g_desktop_app_info_new_from_filename (const char *filename)
{
GDesktopAppInfo *info;
GKeyFile *key_file;
@ -257,7 +258,7 @@ g_desktop_app_info_new_from_filename (const char *filename)
* Returns: a new #GDesktopAppInfo.
**/
GDesktopAppInfo *
g_desktop_app_info_new (const char *desktop_id)
_g_desktop_app_info_new (const char *desktop_id)
{
GDesktopAppInfo *appinfo;
const char * const *dirs;
@ -272,7 +273,7 @@ g_desktop_app_info_new (const char *desktop_id)
char *p;
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);
if (appinfo != NULL)
{
@ -286,7 +287,7 @@ g_desktop_app_info_new (const char *desktop_id)
*p = '/';
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);
if (appinfo != NULL)
{
@ -303,7 +304,7 @@ g_desktop_app_info_new (const char *desktop_id)
found:
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);
appinfo = NULL;
@ -380,7 +381,7 @@ g_desktop_app_info_get_name (GAppInfo *appinfo)
* Returns: %TRUE if hidden, %FALSE otherwise.
**/
gboolean
g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info)
_g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info)
{
return info->hidden;
}
@ -1437,7 +1438,7 @@ g_app_info_create_from_commandline (const char *commandline,
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);
if (info == NULL)
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;
info = g_desktop_app_info_new (desktop_entry);
info = _g_desktop_app_info_new (desktop_entry);
if (info)
{
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;
info = (GAppInfo *)g_desktop_app_info_new (desktop_entry);
info = (GAppInfo *)_g_desktop_app_info_new (desktop_entry);
if (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) */
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 */
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,"%f") == NULL &&

View File

@ -27,7 +27,7 @@
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_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))
@ -42,11 +42,11 @@ struct _GDesktopAppInfoClass
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 (const char *desktop_id);
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
GDesktopAppInfo *_g_desktop_app_info_new_from_filename (const char *filename);
GDesktopAppInfo *_g_desktop_app_info_new (const char *desktop_id);
gboolean _g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
G_END_DECLS

View File

@ -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__ */

View File

@ -54,6 +54,7 @@ struct _GDummyFile
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_IMPLEMENT_INTERFACE (G_TYPE_FILE,
g_dummy_file_file_iface_init))
@ -108,7 +109,7 @@ g_dummy_file_init (GDummyFile *dummy)
* Returns: a new #GFile.
**/
GFile *
g_dummy_file_new (const char *uri)
_g_dummy_file_new (const char *uri)
{
GDummyFile *dummy;
@ -184,7 +185,7 @@ g_dummy_file_get_parent (GFile *file)
uri = _g_encode_uri (&new_decoded_uri);
g_free (dirname);
parent = g_dummy_file_new (uri);
parent = _g_dummy_file_new (uri);
g_free (uri);
return parent;
@ -195,7 +196,7 @@ g_dummy_file_dup (GFile *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
@ -350,7 +351,7 @@ g_dummy_file_resolve_relative_path (GFile *file,
str = g_string_new (dummy->text_uri);
g_string_append (str, "/");
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);
}
else
@ -365,7 +366,7 @@ g_dummy_file_resolve_relative_path (GFile *file,
uri = _g_encode_uri (&new_decoded_uri);
g_free (new_decoded_uri.path);
child = g_dummy_file_new (uri);
child = _g_dummy_file_new (uri);
g_free (uri);
}

View File

@ -27,7 +27,7 @@
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_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))
@ -42,9 +42,9 @@ struct _GDummyFileClass
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

View File

@ -3076,7 +3076,7 @@ g_file_monitor_file (GFile *file,
/* Fallback to polling */
if (monitor == NULL)
monitor = g_poll_file_monitor_new (file);
monitor = _g_poll_file_monitor_new (file);
return monitor;
}

View File

@ -347,11 +347,19 @@ g_file_info_get_attribute
g_file_info_get_attribute_string
g_file_info_get_attribute_byte_string
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_set_attribute
g_file_info_set_attribute_string
g_file_info_set_attribute_byte_string
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_clear_status
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_symlink_target
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_matches
g_file_attribute_matcher_matches_only
@ -686,3 +696,21 @@ g_volume_monitor_get_connected_drives
g_volume_monitor_get
#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

View File

@ -207,7 +207,7 @@ _compare_monitor_class_by_prio (gconstpointer a,
return ret;
}
extern GType g_inotify_directory_monitor_get_type (void);
extern GType _g_inotify_directory_monitor_get_type (void);
static gpointer
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)
/* Register Inotify monitor */
g_inotify_directory_monitor_get_type ();
_g_inotify_directory_monitor_get_type ();
#endif
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.
**/
GDirectoryMonitor*
g_local_directory_monitor_new (const char* dirname,
GFileMonitorFlags flags)
_g_local_directory_monitor_new (const char* dirname,
GFileMonitorFlags flags)
{
static GOnce once_init = G_ONCE_INIT;
static GType monitor_type = G_TYPE_INVALID;
@ -290,3 +290,5 @@ g_local_directory_monitor_cancel (GDirectoryMonitor* monitor)
return TRUE;
}
#define __G_LOCAL_DIRECTORY_MONITOR_C__
#include "gioaliasdef.c"

View File

@ -57,8 +57,8 @@ struct _GLocalDirectoryMonitorClass {
GType g_local_directory_monitor_get_type (void) G_GNUC_CONST;
GDirectoryMonitor* g_local_directory_monitor_new (const char* dirname,
GFileMonitorFlags flags);
GDirectoryMonitor* _g_local_directory_monitor_new (const char* dirname,
GFileMonitorFlags flags);
G_END_DECLS

View File

@ -91,6 +91,7 @@ struct _GLocalFile
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_IMPLEMENT_INTERFACE (G_TYPE_FILE,
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.
*
* Returns: new local #GFile.
**/
GFile *
g_local_file_new (const char *filename)
_g_local_file_new (const char *filename)
{
GLocalFile *local;
@ -419,7 +420,7 @@ g_local_file_get_parent (GFile *file)
return NULL;
dirname = g_path_get_dirname (local->filename);
parent = g_local_file_new (dirname);
parent = _g_local_file_new (dirname);
g_free (dirname);
return parent;
}
@ -429,7 +430,7 @@ g_local_file_dup (GFile *file)
{
GLocalFile *local = G_LOCAL_FILE (file);
return g_local_file_new (local->filename);
return _g_local_file_new (local->filename);
}
static guint
@ -499,10 +500,10 @@ g_local_file_resolve_relative_path (GFile *file,
GFile *child;
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);
child = g_local_file_new (filename);
child = _g_local_file_new (filename);
g_free (filename);
return child;
@ -516,9 +517,9 @@ g_local_file_enumerate_children (GFile *file,
GError **error)
{
GLocalFile *local = G_LOCAL_FILE (file);
return g_local_file_enumerator_new (local->filename,
attributes, flags,
cancellable, error);
return _g_local_file_enumerator_new (local->filename,
attributes, flags,
cancellable, error);
}
static GFile *
@ -845,7 +846,7 @@ g_local_file_find_enclosing_volume (GFile *file,
return NULL;
}
volume = g_volume_get_for_mount_path (mountpoint);
volume = _g_volume_get_for_mount_path (mountpoint);
g_free (mountpoint);
if (volume)
return volume;
@ -1036,7 +1037,7 @@ g_local_file_read (GFile *file,
return NULL;
}
return g_local_file_input_stream_new (fd);
return _g_local_file_input_stream_new (fd);
}
static GFileOutputStream *
@ -1045,8 +1046,8 @@ g_local_file_append_to (GFile *file,
GCancellable *cancellable,
GError **error)
{
return g_local_file_output_stream_append (G_LOCAL_FILE (file)->filename,
flags, cancellable, error);
return _g_local_file_output_stream_append (G_LOCAL_FILE (file)->filename,
flags, cancellable, error);
}
static GFileOutputStream *
@ -1055,8 +1056,8 @@ g_local_file_create (GFile *file,
GCancellable *cancellable,
GError **error)
{
return g_local_file_output_stream_create (G_LOCAL_FILE (file)->filename,
flags, cancellable, error);
return _g_local_file_output_stream_create (G_LOCAL_FILE (file)->filename,
flags, cancellable, error);
}
static GFileOutputStream *
@ -1067,9 +1068,9 @@ g_local_file_replace (GFile *file,
GCancellable *cancellable,
GError **error)
{
return g_local_file_output_stream_replace (G_LOCAL_FILE (file)->filename,
etag, make_backup, flags,
cancellable, error);
return _g_local_file_output_stream_replace (G_LOCAL_FILE (file)->filename,
etag, make_backup, flags,
cancellable, error);
}
@ -1774,7 +1775,7 @@ g_local_file_monitor_dir (GFile* file,
GCancellable *cancellable)
{
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*
@ -1783,7 +1784,7 @@ g_local_file_monitor_file (GFile* file,
GCancellable *cancellable)
{
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

View File

@ -27,7 +27,7 @@
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_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))
@ -42,9 +42,9 @@ struct _GLocalFileClass
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

View File

@ -52,6 +52,7 @@ struct _GLocalFileEnumerator
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);
static GFileInfo *g_local_file_enumerator_next_file (GFileEnumerator *enumerator,
@ -132,16 +133,15 @@ convert_file_to_io_error (GError **error,
}
GFileEnumerator *
g_local_file_enumerator_new (const char *filename,
const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error)
_g_local_file_enumerator_new (const char *filename,
const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error)
{
GLocalFileEnumerator *local;
GDir *dir;
GError *dir_error;
int new_code;
dir_error = NULL;
dir = g_dir_open (filename, 0, error != NULL ? &dir_error : NULL);

View File

@ -29,7 +29,7 @@
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_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))
@ -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,
const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
GFileEnumerator *_g_local_file_enumerator_new (const char *filename,
const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
G_END_DECLS

View File

@ -37,6 +37,7 @@
#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);
struct _GLocalFileInputStreamPrivate {
@ -113,7 +114,7 @@ g_local_file_input_stream_init (GLocalFileInputStream *info)
* Returns: #GFileInputStream for the given file descriptor.
**/
GFileInputStream *
g_local_file_input_stream_new (int fd)
_g_local_file_input_stream_new (int fd)
{
GLocalFileInputStream *stream;

View File

@ -27,7 +27,7 @@
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_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))
@ -51,9 +51,9 @@ struct _GLocalFileInputStreamClass
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

View File

@ -143,7 +143,7 @@ _compare_monitor_class_by_prio (gconstpointer a,
return ret;
}
extern GType g_inotify_file_monitor_get_type (void);
extern GType _g_inotify_file_monitor_get_type (void);
static gpointer
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)
/* Register Inotify monitor */
g_inotify_file_monitor_get_type ();
_g_inotify_file_monitor_get_type ();
#endif
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.
**/
GFileMonitor*
g_local_file_monitor_new (const char* pathname,
GFileMonitorFlags flags)
_g_local_file_monitor_new (const char* pathname,
GFileMonitorFlags flags)
{
static GOnce once_init = G_ONCE_INIT;
static GType monitor_type = G_TYPE_INVALID;
@ -211,3 +211,6 @@ g_local_file_monitor_new (const char* pathname,
return NULL;
}
#define __G_LOCAL_FILE_MONITOR_C__
#include "gioaliasdef.c"

View File

@ -51,8 +51,8 @@ struct _GLocalFileMonitorClass {
GType g_local_file_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor* g_local_file_monitor_new (const char* pathname,
GFileMonitorFlags flags);
GFileMonitor* _g_local_file_monitor_new (const char* pathname,
GFileMonitorFlags flags);
G_END_DECLS

View File

@ -38,6 +38,7 @@
#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);
/* 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 *
g_local_file_output_stream_create (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
_g_local_file_output_stream_create (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
{
GLocalFileOutputStream *stream;
int mode;
@ -446,10 +447,10 @@ g_local_file_output_stream_create (const char *filename,
}
GFileOutputStream *
g_local_file_output_stream_append (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
_g_local_file_output_stream_append (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
{
GLocalFileOutputStream *stream;
int mode;
@ -819,12 +820,12 @@ handle_overwrite_open (const char *filename,
}
GFileOutputStream *
g_local_file_output_stream_replace (const char *filename,
const char *etag,
gboolean create_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
_g_local_file_output_stream_replace (const char *filename,
const char *etag,
gboolean create_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error)
{
GLocalFileOutputStream *stream;
int mode;

View File

@ -28,7 +28,7 @@
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_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))
@ -52,21 +52,21 @@ struct _GLocalFileOutputStreamClass
GFileOutputStreamClass parent_class;
};
GType g_local_file_output_stream_get_type (void) G_GNUC_CONST;
GFileOutputStream *g_local_file_output_stream_create (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
GFileOutputStream *g_local_file_output_stream_append (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
GFileOutputStream *g_local_file_output_stream_replace (const char *filename,
const char *etag,
gboolean create_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
GType _g_local_file_output_stream_get_type (void) G_GNUC_CONST;
GFileOutputStream *_g_local_file_output_stream_create (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
GFileOutputStream *_g_local_file_output_stream_append (const char *filename,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
GFileOutputStream *_g_local_file_output_stream_replace (const char *filename,
const char *etag,
gboolean create_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
G_END_DECLS

View File

@ -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)
static void
@ -62,7 +63,7 @@ g_local_vfs_init (GLocalVfs *vfs)
* Returns: a new #GVfs handle.
**/
GVfs *
g_local_vfs_new (void)
_g_local_vfs_new (void)
{
return g_object_new (G_TYPE_LOCAL_VFS, NULL);
}
@ -71,7 +72,7 @@ static GFile *
g_local_vfs_get_file_for_path (GVfs *vfs,
const char *path)
{
return g_local_file_new (path);
return _g_local_file_new (path);
}
static GFile *
@ -84,9 +85,9 @@ g_local_vfs_get_file_for_uri (GVfs *vfs,
path = g_filename_from_uri (uri, NULL, NULL);
if (path != NULL)
file = g_local_file_new (path);
file = _g_local_file_new (path);
else
file = g_dummy_file_new (uri);
file = _g_dummy_file_new (uri);
g_free (path);
@ -160,7 +161,7 @@ g_local_vfs_parse_name (GVfs *vfs,
if (filename == NULL)
filename = g_strdup (parse_name);
file = g_local_file_new (filename);
file = _g_local_file_new (filename);
g_free (filename);
return file;

View File

@ -27,7 +27,7 @@
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_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))
@ -37,9 +37,9 @@ G_BEGIN_DECLS
typedef struct _GLocalVfs GLocalVfs;
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

View File

@ -30,3 +30,6 @@ static void
g_native_volume_monitor_init (GNativeVolumeMonitor *native_monitor)
{
}
#define __G_NATIVE_VOLUME_MONITOR_C__
#include "gioaliasdef.c"

View File

@ -41,6 +41,7 @@ struct _GPollFileMonitor
#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)
static void
@ -201,7 +202,7 @@ got_initial_info (GObject *source_object,
* Returns: a new #GFileMonitor for the given #GFile.
**/
GFileMonitor*
g_poll_file_monitor_new (GFile *file)
_g_poll_file_monitor_new (GFile *file)
{
GPollFileMonitor* poll_monitor;

View File

@ -28,7 +28,7 @@
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_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))
@ -41,9 +41,9 @@ struct _GPollFileMonitorClass {
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

View File

@ -47,6 +47,7 @@ static void g_union_volume_monitor_remove_monitor (GUnionVolumeMonitor *union_mo
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);
@ -253,7 +254,7 @@ get_default_native_type (gpointer data)
{
volatile GType unix_type;
/* 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
@ -374,7 +375,7 @@ g_volume_monitor_get (void)
* Returns: a #GVolume for given @mountpoint or %NULL.
**/
GVolume *
g_volume_get_for_mount_path (const char *mountpoint)
_g_volume_get_for_mount_path (const char *mountpoint)
{
GType native_type;
GNativeVolumeMonitorClass *klass;

View File

@ -28,7 +28,7 @@
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_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))
@ -42,12 +42,7 @@ struct _GUnionVolumeMonitorClass {
};
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);
GType _g_union_volume_monitor_get_type (void) G_GNUC_CONST;
G_END_DECLS

View File

@ -27,7 +27,6 @@
#include <glib.h>
#include "gunixdrive.h"
#include "gunixvolume.h"
#include "gdriveprivate.h"
#include "gthemedicon.h"
#include "gvolumemonitor.h"
#include "glibintl.h"
@ -46,6 +45,7 @@ struct _GUnixDrive {
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_IMPLEMENT_INTERFACE (G_TYPE_DRIVE,
g_unix_volume_drive_iface_init))
@ -58,7 +58,7 @@ g_unix_drive_finalize (GObject *object)
drive = G_UNIX_DRIVE (object);
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->icon);
@ -126,8 +126,8 @@ type_to_icon (GUnixMountType type)
* Returns: a #GUnixDrive for the given #GUnixMountPoint.
**/
GUnixDrive *
g_unix_drive_new (GVolumeMonitor *volume_monitor,
GUnixMountPoint *mountpoint)
_g_unix_drive_new (GVolumeMonitor *volume_monitor,
GUnixMountPoint *mountpoint)
{
GUnixDrive *drive;
@ -154,11 +154,11 @@ g_unix_drive_new (GVolumeMonitor *volume_monitor,
*
**/
void
g_unix_drive_disconnected (GUnixDrive *drive)
_g_unix_drive_disconnected (GUnixDrive *drive)
{
if (drive->volume)
{
g_unix_volume_unset_drive (drive->volume, drive);
_g_unix_volume_unset_drive (drive->volume, drive);
drive->volume = NULL;
}
}
@ -170,14 +170,14 @@ g_unix_drive_disconnected (GUnixDrive *drive)
*
**/
void
g_unix_drive_set_volume (GUnixDrive *drive,
GUnixVolume *volume)
_g_unix_drive_set_volume (GUnixDrive *drive,
GUnixVolume *volume)
{
if (drive->volume == volume)
return;
if (drive->volume)
g_unix_volume_unset_drive (drive->volume, drive);
_g_unix_volume_unset_drive (drive->volume, drive);
drive->volume = volume;
@ -192,8 +192,8 @@ g_unix_drive_set_volume (GUnixDrive *drive,
*
**/
void
g_unix_drive_unset_volume (GUnixDrive *drive,
GUnixVolume *volume)
_g_unix_drive_unset_volume (GUnixDrive *drive,
GUnixVolume *volume)
{
if (drive->volume == volume)
{
@ -263,7 +263,7 @@ g_unix_drive_has_volumes (GDrive *drive)
gboolean
g_unix_drive_has_mountpoint (GUnixDrive *drive,
_g_unix_drive_has_mountpoint (GUnixDrive *drive,
const char *mountpoint)
{
return strcmp (drive->mountpoint, mountpoint) == 0;

View File

@ -30,7 +30,7 @@
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_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))
@ -42,17 +42,17 @@ struct _GUnixDriveClass {
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,
GUnixMountPoint *mountpoint);
gboolean g_unix_drive_has_mountpoint (GUnixDrive *drive,
const char *mountpoint);
void g_unix_drive_set_volume (GUnixDrive *drive,
GUnixVolume *volume);
void g_unix_drive_unset_volume (GUnixDrive *drive,
GUnixVolume *volume);
void g_unix_drive_disconnected (GUnixDrive *drive);
GUnixDrive *_g_unix_drive_new (GVolumeMonitor *volume_monitor,
GUnixMountPoint *mountpoint);
gboolean _g_unix_drive_has_mountpoint (GUnixDrive *drive,
const char *mountpoint);
void _g_unix_drive_set_volume (GUnixDrive *drive,
GUnixVolume *volume);
void _g_unix_drive_unset_volume (GUnixDrive *drive,
GUnixVolume *volume);
void _g_unix_drive_disconnected (GUnixDrive *drive);
G_END_DECLS

View File

@ -46,6 +46,7 @@ struct _GUnixVolume {
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_IMPLEMENT_INTERFACE (G_TYPE_VOLUME,
g_unix_volume_volume_iface_init))
@ -59,7 +60,7 @@ g_unix_volume_finalize (GObject *object)
volume = G_UNIX_VOLUME (object);
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_free (volume->name);
@ -138,8 +139,8 @@ type_to_icon (GUnixMountType type)
*
**/
GUnixVolume *
g_unix_volume_new (GUnixMount *mount,
GUnixDrive *drive)
_g_unix_volume_new (GUnixMount *mount,
GUnixDrive *drive)
{
GUnixVolume *volume;
GUnixMountType type;
@ -155,7 +156,7 @@ g_unix_volume_new (GUnixMount *mount,
volume = g_object_new (G_TYPE_UNIX_VOLUME, NULL);
volume->drive = drive;
if (drive)
g_unix_drive_set_volume (drive, volume);
_g_unix_drive_set_volume (drive, volume);
volume->mountpoint = g_strdup (mount_path);
type = g_unix_mount_guess_type (mount);
@ -194,11 +195,11 @@ g_unix_volume_new (GUnixMount *mount,
*
**/
void
g_unix_volume_unmounted (GUnixVolume *volume)
_g_unix_volume_unmounted (GUnixVolume *volume)
{
if (volume->drive)
{
g_unix_drive_unset_volume (volume->drive, volume);
_g_unix_drive_unset_volume (volume->drive, volume);
volume->drive = NULL;
g_signal_emit_by_name (volume, "changed");
}
@ -211,8 +212,8 @@ g_unix_volume_unmounted (GUnixVolume *volume)
*
**/
void
g_unix_volume_unset_drive (GUnixVolume *volume,
GUnixDrive *drive)
_g_unix_volume_unset_drive (GUnixVolume *volume,
GUnixDrive *drive)
{
if (volume->drive == drive)
{
@ -254,8 +255,8 @@ g_unix_volume_get_name (GVolume *volume)
* Returns:
**/
gboolean
g_unix_volume_has_mountpoint (GUnixVolume *volume,
const char *mountpoint)
_g_unix_volume_has_mountpoint (GUnixVolume *volume,
const char *mountpoint)
{
return strcmp (volume->mountpoint, mountpoint) == 0;
}
@ -287,6 +288,7 @@ g_unix_volume_can_eject (GVolume *volume)
static void
g_unix_volume_unmount (GVolume *volume,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
@ -303,6 +305,7 @@ g_unix_volume_unmount_finish (GVolume *volume,
static void
g_unix_volume_eject (GVolume *volume,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{

View File

@ -30,7 +30,7 @@
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_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))
@ -42,15 +42,15 @@ struct _GUnixVolumeClass {
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,
GUnixDrive *drive);
gboolean g_unix_volume_has_mountpoint (GUnixVolume *volume,
const char *mountpoint);
void g_unix_volume_unset_drive (GUnixVolume *volume,
GUnixDrive *drive);
void g_unix_volume_unmounted (GUnixVolume *volume);
GUnixVolume *_g_unix_volume_new (GUnixMount *mount,
GUnixDrive *drive);
gboolean _g_unix_volume_has_mountpoint (GUnixVolume *volume,
const char *mountpoint);
void _g_unix_volume_unset_drive (GUnixVolume *volume,
GUnixDrive *drive);
void _g_unix_volume_unmounted (GUnixVolume *volume);
G_END_DECLS

View File

@ -53,6 +53,7 @@ static void mounts_changed (GUnixMountMonitor *mount_monitor,
static void update_drives (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);
static void
@ -116,7 +117,7 @@ get_volume_for_mountpoint (const char *mountpoint)
mount = g_get_unix_mount_at (mountpoint, NULL);
/* TODO: Set drive? */
volume = g_unix_volume_new (mount, NULL);
volume = _g_unix_volume_new (mount, NULL);
return G_VOLUME (volume);
}
@ -184,7 +185,7 @@ g_unix_volume_monitor_init (GUnixVolumeMonitor *unix_monitor)
* Returns: a new #GVolumeMonitor.
**/
GVolumeMonitor *
g_unix_volume_monitor_new (void)
_g_unix_volume_monitor_new (void)
{
GUnixVolumeMonitor *monitor;
@ -242,8 +243,8 @@ diff_sorted_lists (GList *list1, GList *list2, GCompareFunc compare,
* Returns: #GUnixDrive for the given @mountpoint.
**/
GUnixDrive *
g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
const char *mountpoint)
_g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
const char *mountpoint)
{
GList *l;
@ -251,7 +252,7 @@ g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
{
GUnixDrive *drive = l->data;
if (g_unix_drive_has_mountpoint (drive, mountpoint))
if (_g_unix_drive_has_mountpoint (drive, mountpoint))
return drive;
}
@ -268,7 +269,7 @@ find_volume_by_mountpoint (GUnixVolumeMonitor *monitor,
{
GUnixVolume *volume = l->data;
if (g_unix_volume_has_mountpoint (volume, mountpoint))
if (_g_unix_volume_has_mountpoint (volume, mountpoint))
return volume;
}
@ -295,11 +296,11 @@ update_drives (GUnixVolumeMonitor *monitor)
{
GUnixMountPoint *mountpoint = l->data;
drive = g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
g_unix_mount_point_get_mount_path (mountpoint));
drive = _g_unix_volume_monitor_lookup_drive_for_mountpoint (monitor,
g_unix_mount_point_get_mount_path (mountpoint));
if (drive)
{
g_unix_drive_disconnected (drive);
_g_unix_drive_disconnected (drive);
monitor->drives = g_list_remove (monitor->drives, drive);
g_signal_emit_by_name (monitor, "drive_disconnected", drive);
g_object_unref (drive);
@ -310,7 +311,7 @@ update_drives (GUnixVolumeMonitor *monitor)
{
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)
{
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));
if (volume)
{
g_unix_volume_unmounted (volume);
_g_unix_volume_unmounted (volume);
monitor->volumes = g_list_remove (monitor->volumes, volume);
g_signal_emit_by_name (monitor, "volume_unmounted", volume);
g_object_unref (volume);
@ -364,9 +365,9 @@ update_volumes (GUnixVolumeMonitor *monitor)
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);
volume = g_unix_volume_new (mount, drive);
volume = _g_unix_volume_new (mount, drive);
if (volume)
{
monitor->volumes = g_list_prepend (monitor->volumes, volume);

View File

@ -28,7 +28,7 @@
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_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))
@ -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);
GUnixDrive * g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
const char *mountpoint);
GVolumeMonitor *_g_unix_volume_monitor_new (void);
GUnixDrive * _g_unix_volume_monitor_lookup_drive_for_mountpoint (GUnixVolumeMonitor *monitor,
const char *mountpoint);
G_END_DECLS

View File

@ -216,7 +216,7 @@ get_default_vfs (gpointer arg)
/* Ensure GLocalVfs type is available
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 ();
/* Ensure vfs in modules loaded */
@ -271,7 +271,7 @@ g_vfs_get_local (void)
static gsize vfs = 0;
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);
}

View File

@ -27,7 +27,7 @@
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

View File

@ -41,6 +41,7 @@ struct _GInotifyDirectoryMonitor
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)
static void

View File

@ -34,7 +34,7 @@
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_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))
@ -47,7 +47,7 @@ struct _GInotifyDirectoryMonitorClass {
GLocalDirectoryMonitorClass parent_class;
};
GType g_inotify_directory_monitor_get_type (void);
GType _g_inotify_directory_monitor_get_type (void);
G_END_DECLS

View File

@ -43,6 +43,7 @@ struct _GInotifyFileMonitor
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)
static void

View File

@ -34,8 +34,8 @@
G_BEGIN_DECLS
#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_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_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_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INOTIFY_FILE_MONITOR))
@ -47,7 +47,7 @@ struct _GInotifyFileMonitorClass {
GLocalFileMonitorClass parent_class;
};
GType g_inotify_file_monitor_get_type (void);
GType _g_inotify_file_monitor_get_type (void);
G_END_DECLS

View File

@ -49,6 +49,9 @@
#include "inotify-path.h"
#include "inotify-diag.h"
#include "gioalias.h"
static gboolean ih_debug_enabled = FALSE;
#define IH_W if (ih_debug_enabled) g_warning