Clean up all flags enums to not have _FLAGS in them Make the names of some

2007-12-14  Alexander Larsson  <alexl@redhat.com>

        * gappinfo.h:
        * gfile.[ch]:
        * gfileattribute.[ch]:
        * gio.symbols:
        * glocalfile.c:
        * glocalfileoutputstream.c:
        * gmountoperation.[ch]:
        * goutputstream.[ch]:
	Clean up all flags enums to not have _FLAGS in them
	Make the names of some of the enums better.

        * glocalfileinfo.c:
	Fix warning


svn path=/trunk/; revision=6119
This commit is contained in:
Alexander Larsson 2007-12-14 11:07:31 +00:00 committed by Alexander Larsson
parent 0f8f543230
commit 4cb6eab803
14 changed files with 86 additions and 69 deletions

View File

@ -1,3 +1,19 @@
2007-12-14 Alexander Larsson <alexl@redhat.com>
* gappinfo.h:
* gfile.[ch]:
* gfileattribute.[ch]:
* gio.symbols:
* glocalfile.c:
* glocalfileoutputstream.c:
* gmountoperation.[ch]:
* goutputstream.[ch]:
Clean up all flags enums to not have _FLAGS in them
Make the names of some of the enums better.
* glocalfileinfo.c:
Fix warning
2007-12-14 Michael Natterer <mitch@imendio.com> 2007-12-14 Michael Natterer <mitch@imendio.com>
* gio.symbols: fix g_io_scheduler symbol names. * gio.symbols: fix g_io_scheduler symbol names.

View File

@ -52,7 +52,7 @@ G_BEGIN_DECLS
* Flags used when creating a #GAppInfo. * Flags used when creating a #GAppInfo.
*/ */
typedef enum { typedef enum {
G_APP_INFO_CREATE_FLAGS_NONE = 0, /*< nick=none >*/ G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/
G_APP_INFO_CREATE_NEEDS_TERMINAL = (1<<0) /*< nick=needs-terminal >*/ G_APP_INFO_CREATE_NEEDS_TERMINAL = (1<<0) /*< nick=needs-terminal >*/
} GAppInfoCreateFlags; } GAppInfoCreateFlags;

View File

@ -1070,7 +1070,7 @@ g_file_read (GFile *file,
* the file doesn't already exist it is created. * the file doesn't already exist it is created.
* *
* By default files created are generally readable by everyone, * By default files created are generally readable by everyone,
* but if you pass #G_FILE_CREATE_FLAGS_PRIVATE in @flags the file * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
* will be made readable only to the current user, to the level that * will be made readable only to the current user, to the level that
* is supported on the target filesystem. * is supported on the target filesystem.
* *
@ -1123,7 +1123,7 @@ g_file_append_to (GFile *file,
* The file must not already exists. * The file must not already exists.
* *
* By default files created are generally readable by everyone, * By default files created are generally readable by everyone,
* but if you pass #G_FILE_CREATE_FLAGS_PRIVATE in @flags the file * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
* will be made readable only to the current user, to the level that * will be made readable only to the current user, to the level that
* is supported on the target filesystem. * is supported on the target filesystem.
* *
@ -1189,7 +1189,7 @@ g_file_create (GFile *file,
* the destination when the stream is closed. * the destination when the stream is closed.
* *
* By default files created are generally readable by everyone, * By default files created are generally readable by everyone,
* but if you pass #G_FILE_CREATE_FLAGS_PRIVATE in @flags the file * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file
* will be made readable only to the current user, to the level that * will be made readable only to the current user, to the level that
* is supported on the target filesystem. * is supported on the target filesystem.
* *
@ -1681,8 +1681,8 @@ should_copy (GFileAttributeInfo *info,
gboolean as_move) gboolean as_move)
{ {
if (as_move) if (as_move)
return info->flags & G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED; return info->flags & G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED;
return info->flags & G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE; return info->flags & G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE;
} }
static char * static char *

View File

@ -48,7 +48,7 @@ G_BEGIN_DECLS
* Flags used when querying a #GFileInfo. * Flags used when querying a #GFileInfo.
*/ */
typedef enum { typedef enum {
G_FILE_QUERY_INFO_FLAGS_NONE = 0, G_FILE_QUERY_INFO_NONE = 0,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/
} GFileQueryInfoFlags; } GFileQueryInfoFlags;
@ -61,13 +61,13 @@ typedef enum {
* Flags used when an operation may create a file. * Flags used when an operation may create a file.
*/ */
typedef enum { typedef enum {
G_FILE_CREATE_FLAGS_NONE = 0, G_FILE_CREATE_NONE = 0,
G_FILE_CREATE_FLAGS_PRIVATE = (1<<0) G_FILE_CREATE_PRIVATE = (1<<0)
} GFileCreateFlags; } GFileCreateFlags;
/** /**
* GFileCopyFlags: * GFileCopyFlags:
* @G_FILE_COPY_FLAGS_NONE: No flags set. * @G_FILE_COPY_NONE: No flags set.
* @G_FILE_COPY_OVERWRITE: Overwrite any existing files * @G_FILE_COPY_OVERWRITE: Overwrite any existing files
* @G_FILE_COPY_BACKUP: Make a backup of any existing files. * @G_FILE_COPY_BACKUP: Make a backup of any existing files.
* @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks. * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks.
@ -77,7 +77,7 @@ typedef enum {
* Flags used when copying or moving files. * Flags used when copying or moving files.
*/ */
typedef enum { typedef enum {
G_FILE_COPY_FLAGS_NONE = 0, /*< nick=none >*/ G_FILE_COPY_NONE = 0, /*< nick=none >*/
G_FILE_COPY_OVERWRITE = (1<<0), G_FILE_COPY_OVERWRITE = (1<<0),
G_FILE_COPY_BACKUP = (1<<1), G_FILE_COPY_BACKUP = (1<<1),
G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2), G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2),
@ -87,14 +87,14 @@ typedef enum {
/** /**
* GFileMonitorFlags: * GFileMonitorFlags:
* @G_FILE_MONITOR_FLAGS_NONE: No flags set. * @G_FILE_MONITOR_NONE: No flags set.
* @G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS: Watch for mount events. * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events.
* *
* Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for. * Flags used to set what a #GFileMonitor or #GDirectoryMonitor will watch for.
*/ */
typedef enum { typedef enum {
G_FILE_MONITOR_FLAGS_NONE = 0, G_FILE_MONITOR_NONE = 0,
G_FILE_MONITOR_FLAGS_MONITOR_MOUNTS = (1<<0) G_FILE_MONITOR_WATCH_MOUNTS = (1<<0)
} GFileMonitorFlags; } GFileMonitorFlags;
/** /**

View File

@ -875,7 +875,7 @@ g_file_attribute_info_list_lookup (GFileAttributeInfoList *list,
* @list: a #GFileAttributeInfoList. * @list: a #GFileAttributeInfoList.
* @name: the name of the attribute to add. * @name: the name of the attribute to add.
* @type: the #GFileAttributeType for the attribute. * @type: the #GFileAttributeType for the attribute.
* @flags: #GFileAttributeFlags for the attribute. * @flags: #GFileAttributeInfoFlags for the attribute.
* *
* Adds a new attribute with @name to the @list, setting * Adds a new attribute with @name to the @list, setting
* its @type and @flags. * its @type and @flags.
@ -884,7 +884,7 @@ void
g_file_attribute_info_list_add (GFileAttributeInfoList *list, g_file_attribute_info_list_add (GFileAttributeInfoList *list,
const char *name, const char *name,
GFileAttributeType type, GFileAttributeType type,
GFileAttributeFlags flags) GFileAttributeInfoFlags flags)
{ {
GFileAttributeInfoListPriv *priv = (GFileAttributeInfoListPriv *)list; GFileAttributeInfoListPriv *priv = (GFileAttributeInfoListPriv *)list;
GFileAttributeInfo info; GFileAttributeInfo info;

View File

@ -58,18 +58,18 @@ typedef enum {
} GFileAttributeType; } GFileAttributeType;
/** /**
* GFileAttributeFlags: * GFileAttributeInfoFlags:
* @G_FILE_ATTRIBUTE_FLAGS_NONE: no flags set. * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set.
* @G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE: copy the attribute values when the file is copied. * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied.
* @G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED: copy the attribute values when the file is moved. * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved.
* *
* A flag specifying the behaviour of an attribute. * Flags specifying the behaviour of an attribute.
**/ **/
typedef enum { typedef enum {
G_FILE_ATTRIBUTE_FLAGS_NONE = 0, G_FILE_ATTRIBUTE_INFO_NONE = 0,
G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE = 1 << 0, G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = 1 << 0,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED = 1 << 1 G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = 1 << 1
} GFileAttributeFlags; } GFileAttributeInfoFlags;
/** /**
* GFileAttributeStatus: * GFileAttributeStatus:
@ -113,14 +113,14 @@ typedef struct {
* GFileAttributeInfo: * GFileAttributeInfo:
* @name: the name of the attribute. * @name: the name of the attribute.
* @type: the #GFileAttributeType type of the attribute. * @type: the #GFileAttributeType type of the attribute.
* @flags: a set of #GFileAttributeFlags. * @flags: a set of #GFileAttributeInfoFlags.
* *
* Information about a specific attribute. * Information about a specific attribute.
**/ **/
typedef struct { typedef struct {
char *name; char *name;
GFileAttributeType type; GFileAttributeType type;
GFileAttributeFlags flags; GFileAttributeInfoFlags flags;
} GFileAttributeInfo; } GFileAttributeInfo;
/** /**
@ -180,7 +180,7 @@ const GFileAttributeInfo *g_file_attribute_info_list_lookup (GFileAttributeInfoL
void g_file_attribute_info_list_add (GFileAttributeInfoList *list, void g_file_attribute_info_list_add (GFileAttributeInfoList *list,
const char *name, const char *name,
GFileAttributeType type, GFileAttributeType type,
GFileAttributeFlags flags); GFileAttributeInfoFlags flags);
G_END_DECLS G_END_DECLS

View File

@ -760,7 +760,7 @@ g_local_directory_monitor_get_type G_GNUC_CONST
g_app_info_create_flags_get_type G_GNUC_CONST g_app_info_create_flags_get_type G_GNUC_CONST
g_data_stream_byte_order_get_type G_GNUC_CONST g_data_stream_byte_order_get_type G_GNUC_CONST
g_data_stream_newline_type_get_type G_GNUC_CONST g_data_stream_newline_type_get_type G_GNUC_CONST
g_file_attribute_flags_get_type G_GNUC_CONST g_file_attribute_info_flags_get_type G_GNUC_CONST
g_file_attribute_status_get_type G_GNUC_CONST g_file_attribute_status_get_type G_GNUC_CONST
g_file_attribute_type_get_type G_GNUC_CONST g_file_attribute_type_get_type G_GNUC_CONST
g_file_copy_flags_get_type G_GNUC_CONST g_file_copy_flags_get_type G_GNUC_CONST
@ -771,7 +771,7 @@ g_file_query_info_flags_get_type G_GNUC_CONST
g_file_type_get_type G_GNUC_CONST g_file_type_get_type G_GNUC_CONST
g_io_error_enum_get_type G_GNUC_CONST g_io_error_enum_get_type G_GNUC_CONST
g_output_stream_splice_flags_get_type G_GNUC_CONST g_output_stream_splice_flags_get_type G_GNUC_CONST
g_password_flags_get_type G_GNUC_CONST g_ask_password_flags_get_type G_GNUC_CONST
g_password_save_get_type G_GNUC_CONST g_password_save_get_type G_GNUC_CONST
#endif #endif
#endif #endif

View File

@ -143,17 +143,17 @@ g_local_file_class_init (GLocalFileClass *klass)
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_UNIX_MODE, G_FILE_ATTRIBUTE_UNIX_MODE,
G_FILE_ATTRIBUTE_TYPE_UINT32, G_FILE_ATTRIBUTE_TYPE_UINT32,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
#ifdef HAVE_CHOWN #ifdef HAVE_CHOWN
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_UNIX_UID, G_FILE_ATTRIBUTE_UNIX_UID,
G_FILE_ATTRIBUTE_TYPE_UINT32, G_FILE_ATTRIBUTE_TYPE_UINT32,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_UNIX_GID, G_FILE_ATTRIBUTE_UNIX_GID,
G_FILE_ATTRIBUTE_TYPE_UINT32, G_FILE_ATTRIBUTE_TYPE_UINT32,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
#endif #endif
#ifdef HAVE_SYMLINK #ifdef HAVE_SYMLINK
@ -167,19 +167,19 @@ g_local_file_class_init (GLocalFileClass *klass)
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_ATTRIBUTE_TIME_MODIFIED,
G_FILE_ATTRIBUTE_TYPE_UINT64, G_FILE_ATTRIBUTE_TYPE_UINT64,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
G_FILE_ATTRIBUTE_TYPE_UINT32, G_FILE_ATTRIBUTE_TYPE_UINT32,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_TIME_ACCESS, G_FILE_ATTRIBUTE_TIME_ACCESS,
G_FILE_ATTRIBUTE_TYPE_UINT64, G_FILE_ATTRIBUTE_TYPE_UINT64,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, G_FILE_ATTRIBUTE_TIME_ACCESS_USEC,
G_FILE_ATTRIBUTE_TYPE_UINT32, G_FILE_ATTRIBUTE_TYPE_UINT32,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
#endif #endif
local_writable_attributes = list; local_writable_attributes = list;
@ -192,12 +192,12 @@ g_local_file_class_init (GLocalFileClass *klass)
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
"xattr", "xattr",
G_FILE_ATTRIBUTE_TYPE_STRING, G_FILE_ATTRIBUTE_TYPE_STRING,
G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE | G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE |
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
g_file_attribute_info_list_add (list, g_file_attribute_info_list_add (list,
"xattr-sys", "xattr-sys",
G_FILE_ATTRIBUTE_TYPE_STRING, G_FILE_ATTRIBUTE_TYPE_STRING,
G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
#endif #endif
local_writable_namespaces = list; local_writable_namespaces = list;

View File

@ -1238,7 +1238,7 @@ get_thumbnail_attributes (const char *path,
uri = g_filename_to_uri (path, NULL, NULL); uri = g_filename_to_uri (path, NULL, NULL);
checksum = g_checksum_new (G_CHECKSUM_MD5); checksum = g_checksum_new (G_CHECKSUM_MD5);
g_checksum_update (checksum, (const gchar *) uri, strlen (uri)); g_checksum_update (checksum, (const guchar *) uri, strlen (uri));
basename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL); basename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
g_checksum_free (checksum); g_checksum_free (checksum);

View File

@ -432,7 +432,7 @@ _g_local_file_output_stream_create (const char *filename,
if (g_cancellable_set_error_if_cancelled (cancellable, error)) if (g_cancellable_set_error_if_cancelled (cancellable, error))
return NULL; return NULL;
if (flags & G_FILE_CREATE_FLAGS_PRIVATE) if (flags & G_FILE_CREATE_PRIVATE)
mode = 0600; mode = 0600;
else else
mode = 0666; mode = 0666;
@ -475,7 +475,7 @@ _g_local_file_output_stream_append (const char *filename,
if (g_cancellable_set_error_if_cancelled (cancellable, error)) if (g_cancellable_set_error_if_cancelled (cancellable, error))
return NULL; return NULL;
if (flags & G_FILE_CREATE_FLAGS_PRIVATE) if (flags & G_FILE_CREATE_PRIVATE)
mode = 0600; mode = 0600;
else else
mode = 0666; mode = 0666;
@ -857,7 +857,7 @@ _g_local_file_output_stream_replace (const char *filename,
temp_file = NULL; temp_file = NULL;
if (flags & G_FILE_CREATE_FLAGS_PRIVATE) if (flags & G_FILE_CREATE_PRIVATE)
mode = 0600; mode = 0600;
else else
mode = 0666; mode = 0666;

View File

@ -212,7 +212,7 @@ ask_password (GMountOperation *op,
const char *message, const char *message,
const char *default_user, const char *default_user,
const char *default_domain, const char *default_domain,
GPasswordFlags flags) GAskPasswordFlags flags)
{ {
return FALSE; return FALSE;
} }
@ -246,7 +246,7 @@ g_mount_operation_class_init (GMountOperationClass *klass)
* @message: string containing a message to display to the user. * @message: string containing a message to display to the user.
* @default_user: string containing the default user name. * @default_user: string containing the default user name.
* @default_domain: string containing the default domain. * @default_domain: string containing the default domain.
* @flags: a set of #GPasswordFlags. * @flags: a set of #GAskPasswordFlags.
* *
* Emitted when a mount operation asks the user for a password. * Emitted when a mount operation asks the user for a password.
*/ */

View File

@ -58,25 +58,26 @@ struct _GMountOperation
}; };
/** /**
* GPasswordFlags: * GAskPasswordFlags:
* @G_PASSWORD_FLAGS_NEED_PASSWORD: operation requires a password. * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password.
* @G_PASSWORD_FLAGS_NEED_USERNAME: operation requires a username. * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username.
* @G_PASSWORD_FLAGS_NEED_DOMAIN: operation requires a domain. * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain.
* @G_PASSWORD_FLAGS_SAVING_SUPPORTED: operation supports saving settings. * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings.
* @G_PASSWORD_FLAGS_ANONYMOUS_SUPPORTED: operation supports anonymous users. * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users.
* *
* #GPasswordFlags are used to request specific information from the * #GAskPasswordFlags are used to request specific information from the
* user, or to notify the user of their choices in an authentication * user, or to notify the user of their choices in an authentication
* situation. * situation.
* *
**/ **/
typedef enum { typedef enum {
G_PASSWORD_FLAGS_NEED_PASSWORD = 1<<0, G_ASK_PASSWORD_NONE = 0,
G_PASSWORD_FLAGS_NEED_USERNAME = 1<<1, G_ASK_PASSWORD_NEED_PASSWORD = 1<<0,
G_PASSWORD_FLAGS_NEED_DOMAIN = 1<<2, G_ASK_PASSWORD_NEED_USERNAME = 1<<1,
G_PASSWORD_FLAGS_SAVING_SUPPORTED = 1<<3, G_ASK_PASSWORD_NEED_DOMAIN = 1<<2,
G_PASSWORD_FLAGS_ANONYMOUS_SUPPORTED = 1<<4 G_ASK_PASSWORD_SAVING_SUPPORTED = 1<<3,
} GPasswordFlags; G_AKS_PASSWORD_ANONYMOUS_SUPPORTED = 1<<4
} GAskPasswordFlags;
/** /**
* GPasswordSave: * GPasswordSave:
@ -102,7 +103,7 @@ struct _GMountOperationClass
const char *message, const char *message,
const char *default_user, const char *default_user,
const char *default_domain, const char *default_domain,
GPasswordFlags flags); GAskPasswordFlags flags);
gboolean (* ask_question) (GMountOperation *op, gboolean (* ask_question) (GMountOperation *op,
const char *message, const char *message,

View File

@ -439,13 +439,13 @@ g_output_stream_real_splice (GOutputStream *stream,
if (!res) if (!res)
error = NULL; /* Ignore further errors */ error = NULL; /* Ignore further errors */
if (flags & G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_SOURCE) if (flags & G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE)
{ {
/* Don't care about errors in source here */ /* Don't care about errors in source here */
g_input_stream_close (source, cancellable, NULL); g_input_stream_close (source, cancellable, NULL);
} }
if (flags & G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET) if (flags & G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET)
{ {
/* But write errors on close are bad! */ /* But write errors on close are bad! */
if (!class->close_fn (stream, cancellable, error)) if (!class->close_fn (stream, cancellable, error))

View File

@ -44,16 +44,16 @@ G_BEGIN_DECLS
/** /**
* GOutputStreamSpliceFlags: * GOutputStreamSpliceFlags:
* @G_OUTPUT_STREAM_SPLICE_FLAGS_NONE: Do not close either stream. * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
* @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_SOURCE: Close the source stream after the splice. * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice.
* @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET: Close the target stream after the splice. * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice.
* *
* GOutputStreamSpliceFlags determine how streams should be spliced. * GOutputStreamSpliceFlags determine how streams should be spliced.
**/ **/
typedef enum { typedef enum {
G_OUTPUT_STREAM_SPLICE_FLAGS_NONE = 0, G_OUTPUT_STREAM_SPLICE_NONE = 0,
G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_SOURCE = 1 << 0, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = 1 << 0,
G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET = 1 << 1 G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = 1 << 1
} GOutputStreamSpliceFlags; } GOutputStreamSpliceFlags;
/** /**