summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2010-01-29 14:22:19 +0100
committerMurray Cumming <murrayc@murrayc.com>2010-01-29 14:22:19 +0100
commitafa80fbc792015d7f9143e5ae7d92329356640fc (patch)
tree80698a17a8130fcd68a7eee3ebcadd00d3036ca9
parent6c48bee7dc03671e5e88e8060f68240cfb68fc6f (diff)
downloadglibmm-afa80fbc792015d7f9143e5ae7d92329356640fc.tar.gz
Use Glib::unwrap() instead of ->gobj(),
* gio/src/*.ccg: Use Glib::unwrap() instead of ->gobj(), so we don't crash if people pass in null RefPtr<>s, which they might do by accident, or if we have not wrapped all the may-be-null cases as method overrides.
-rw-r--r--ChangeLog9
-rw-r--r--gio/src/bufferedinputstream.ccg2
-rw-r--r--gio/src/datainputstream.ccg8
-rw-r--r--gio/src/drive.ccg24
-rw-r--r--gio/src/file.ccg96
-rw-r--r--gio/src/fileenumerator.ccg4
-rw-r--r--gio/src/fileinputstream.ccg2
-rw-r--r--gio/src/fileiostream.ccg2
-rw-r--r--gio/src/fileoutputstream.ccg2
-rw-r--r--gio/src/inputstream.ccg6
-rw-r--r--gio/src/iostream.ccg2
-rw-r--r--gio/src/loadableicon.ccg4
-rw-r--r--gio/src/mount.ccg32
-rw-r--r--gio/src/outputstream.ccg8
-rw-r--r--gio/src/resolver.ccg10
-rw-r--r--gio/src/socketaddressenumerator.ccg2
-rw-r--r--gio/src/socketclient.ccg6
-rw-r--r--gio/src/socketlistener.ccg28
-rw-r--r--gio/src/volume.ccg18
19 files changed, 137 insertions, 128 deletions
diff --git a/ChangeLog b/ChangeLog
index 315c121e..d7431801 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-01-29 Murray Cumming <murrayc@murrayc.com>
+ Use Glib::unwrap() instead of ->gobj(),
+
+ * gio/src/*.ccg: Use Glib::unwrap() instead of ->gobj(), so we don't
+ crash if people pass in null RefPtr<>s, which they might do by
+ accident, or if we have not wrapped all the may-be-null cases as
+ method overrides.
+
+2010-01-29 Murray Cumming <murrayc@murrayc.com>
+
File: Added has_parent() and supports_thread_contexts().
* gio/src/file.[hg|ccg]: Added has_parent(), supports_thread_contexts().
diff --git a/gio/src/bufferedinputstream.ccg b/gio/src/bufferedinputstream.ccg
index d3ed7c21..e4c6d3d5 100644
--- a/gio/src/bufferedinputstream.ccg
+++ b/gio/src/bufferedinputstream.ccg
@@ -59,7 +59,7 @@ void BufferedInputStream::fill_async(const SlotAsyncReady& slot,
g_buffered_input_stream_fill_async(gobj(),
count,
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/datainputstream.ccg b/gio/src/datainputstream.ccg
index 3ff2c8f9..925f5a70 100644
--- a/gio/src/datainputstream.ccg
+++ b/gio/src/datainputstream.ccg
@@ -165,7 +165,7 @@ bool DataInputStream::read_line(std::string& line, const Glib::RefPtr<Cancellabl
GError* gerror = 0;
char* c_line = g_data_input_stream_read_line(gobj(),
NULL, // pass NULL since we can easily determine the length from the returned std::string
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&gerror);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -219,7 +219,7 @@ void DataInputStream::read_line_async(const SlotAsyncReady& slot, const Glib::Re
g_data_input_stream_read_line_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -262,7 +262,7 @@ bool DataInputStream::read_until(std::string& data, const std::string& stop_char
char* c_str = g_data_input_stream_read_until(gobj(),
stop_chars.c_str(),
NULL, // pass NULL since we can easily determine the length from the returned std::string
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&gerror);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -319,7 +319,7 @@ void DataInputStream::read_until_async(const std::string& stop_chars, const Slot
g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/drive.ccg b/gio/src/drive.ccg
index ee3f485f..acbf5122 100644
--- a/gio/src/drive.ccg
+++ b/gio/src/drive.ccg
@@ -36,7 +36,7 @@ void Drive::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& c
g_drive_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
0, // mount_operation
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -65,8 +65,8 @@ void Drive::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo
g_drive_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -80,7 +80,7 @@ void Drive::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo
g_drive_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
&SignalProxy_async_callback,
slot_copy);
@@ -90,7 +90,7 @@ void Drive::eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnmo
{
g_drive_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
0, // callback
0); // user_data
@@ -114,7 +114,7 @@ void Drive::poll_for_media(const SlotAsyncReady& slot, const Glib::RefPtr<Cancel
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_drive_poll_for_media(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -153,8 +153,8 @@ Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation,
g_drive_stop(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -171,7 +171,7 @@ Drive::stop(const Glib::RefPtr<MountOperation>& mount_operation,
g_drive_stop(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL,
&SignalProxy_async_callback,
slot_copy);
@@ -191,8 +191,8 @@ Drive::start(const Glib::RefPtr<MountOperation>& mount_operation,
g_drive_start(gobj(),
static_cast<GDriveStartFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -209,7 +209,7 @@ Drive::start(const Glib::RefPtr<MountOperation>& mount_operation,
g_drive_start(gobj(),
static_cast<GDriveStartFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL,
&SignalProxy_async_callback,
slot_copy);
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index 87320afd..2672bd92 100644
--- a/gio/src/file.ccg
+++ b/gio/src/file.ccg
@@ -165,7 +165,7 @@ File::read_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& ca
g_file_read_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -181,7 +181,7 @@ File::append_to_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable
g_file_append_to_async(gobj(),
static_cast<GFileCreateFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -213,7 +213,7 @@ File::create_file_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellab
g_file_create_async(gobj(),
static_cast<GFileCreateFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -245,7 +245,7 @@ File::create_file_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr
g_file_create_async(gobj(),
static_cast<GFileCreateFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -280,7 +280,7 @@ File::replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>&
make_backup,
static_cast<GFileCreateFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -328,7 +328,7 @@ File::open_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancel
g_file_open_readwrite_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -346,7 +346,7 @@ File::replace_readwrite_async(const SlotAsyncReady& slot, const Glib::RefPtr<Can
make_backup,
static_cast<GFileCreateFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -429,7 +429,7 @@ File::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellabl
attributes.c_str(),
static_cast<GFileQueryInfoFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -501,7 +501,7 @@ File::query_filesystem_info_async(const SlotAsyncReady& slot, const Glib::RefPtr
g_file_query_filesystem_info_async(const_cast<GFile*>(gobj()),
attributes.c_str(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -572,7 +572,7 @@ File::enumerate_children_async(const SlotAsyncReady& slot, const Glib::RefPtr<Ca
attributes.c_str(),
static_cast<GFileQueryInfoFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -625,7 +625,7 @@ File::set_display_name_async(const Glib::ustring& display_name, const SlotAsyncR
g_file_set_display_name_async(gobj(),
display_name.c_str(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -663,9 +663,9 @@ File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
SlotFileProgress* slot_copy = new SlotFileProgress(slot);
res = g_file_copy(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_file_progress_callback,
slot_copy,
&gerror);
@@ -698,7 +698,7 @@ File::copy(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
SlotFileProgress* slot_copy = new SlotFileProgress(slot);
res = g_file_copy(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
NULL,
&SignalProxy_file_progress_callback,
@@ -726,7 +726,7 @@ File::copy(const Glib::RefPtr<File>& destination, FileCopyFlags flags, std::auto
{
GError* gerror = 0;
bool res = g_file_copy(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
NULL,
NULL,
@@ -759,10 +759,10 @@ File::copy_async(const Glib::RefPtr<File>& destination,
SlotFileProgress* slot_progress_copy = new SlotFileProgress(slot_progress);
g_file_copy_async(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_file_progress_callback,
slot_progress_copy,
&SignalProxy_async_callback,
@@ -782,10 +782,10 @@ File::copy_async(const Glib::RefPtr<File>& destination,
SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
g_file_copy_async(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
NULL,
NULL,
&SignalProxy_async_callback,
@@ -806,7 +806,7 @@ File::copy_async(const Glib::RefPtr<File>& destination,
SlotFileProgress* slot_progress_copy = new SlotFileProgress(slot_progress);
g_file_copy_async(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
io_priority,
NULL,
@@ -828,7 +828,7 @@ File::copy_async(const Glib::RefPtr<File>& destination,
SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
g_file_copy_async(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
io_priority,
NULL,
@@ -855,9 +855,9 @@ File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
SlotFileProgress* slot_copy = new SlotFileProgress(slot);
res = g_file_move(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_file_progress_callback,
slot_copy,
&gerror);
@@ -890,7 +890,7 @@ File::move(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot,
SlotFileProgress* slot_copy = new SlotFileProgress(slot);
res = g_file_move(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
NULL,
&SignalProxy_file_progress_callback,
@@ -920,7 +920,7 @@ File::move(const Glib::RefPtr<File>& destination, FileCopyFlags flags, std::auto
bool res;
res = g_file_move(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
NULL,
NULL,
@@ -947,10 +947,10 @@ File::set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncRe
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_file_set_attributes_async(gobj(),
- info->gobj(),
+ Glib::unwrap(info),
static_cast<GFileQueryInfoFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -964,7 +964,7 @@ File::set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncRe
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_file_set_attributes_async(gobj(),
- info->gobj(),
+ Glib::unwrap(info),
static_cast<GFileQueryInfoFlags>(flags),
io_priority,
NULL,
@@ -984,11 +984,11 @@ File::set_attributes_finish(const Glib::RefPtr<AsyncResult>& result,
#endif // GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
- GFileInfo* cinfo = info->gobj();
+ GFileInfo* cinfo = Glib::unwrap(info);
bool res;
res = g_file_set_attributes_finish(gobj(),
- result->gobj(),
+ Glib::unwrap(result),
&cinfo,
&gerror);
@@ -1132,8 +1132,8 @@ void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation,
g_file_mount_mountable(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1147,7 +1147,7 @@ void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation,
g_file_mount_mountable(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL,
&SignalProxy_async_callback,
slot_copy);
@@ -1188,7 +1188,7 @@ void File::unmount_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Canc
g_file_unmount_mountable_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
0,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1230,7 +1230,7 @@ void File::unmount_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Canc
g_file_unmount_mountable_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
Glib::unwrap(mount_operation),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1273,8 +1273,8 @@ void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_oper
g_file_mount_enclosing_volume(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1288,7 +1288,7 @@ void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_oper
g_file_mount_enclosing_volume(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL,
&SignalProxy_async_callback,
slot_copy);
@@ -1330,7 +1330,7 @@ File::eject_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable
g_file_eject_mountable_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
Glib::unwrap(mount_operation),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1373,7 +1373,7 @@ File::eject_mountable(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable
g_file_eject_mountable_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
0,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1414,7 +1414,7 @@ File::load_contents_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancell
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_file_load_contents_async(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1446,7 +1446,7 @@ File::load_partial_contents_async(const SlotReadMore& slot_read_more, const Slot
slots->second = slot_async_copy;
g_file_load_partial_contents_async(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_load_partial_contents_read_more_callback,
&SignalProxy_load_partial_contents_ready_callback,
slots);
@@ -1584,7 +1584,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -1632,7 +1632,7 @@ File::replace_contents_async(const SlotAsyncReady& slot,
etag.empty() ? NULL : etag.c_str(),
make_backup,
static_cast<GFileCreateFlags>(flags),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -2011,7 +2011,7 @@ void File::find_enclosing_mount_async(const SlotAsyncReady& slot, const Glib::Re
g_file_find_enclosing_mount_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -2080,9 +2080,9 @@ File::copy_attributes(const Glib::RefPtr<File>& destination, const Glib::RefPtr<
bool res;
res = g_file_copy_attributes(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&gerror);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -2108,7 +2108,7 @@ File::copy_attributes(const Glib::RefPtr<File>& destination, FileCopyFlags flags
bool res;
res = g_file_copy_attributes(gobj(),
- destination->gobj(),
+ Glib::unwrap(destination),
static_cast<GFileCopyFlags>(flags),
NULL,
&gerror);
diff --git a/gio/src/fileenumerator.ccg b/gio/src/fileenumerator.ccg
index a99ec4f2..4479e4eb 100644
--- a/gio/src/fileenumerator.ccg
+++ b/gio/src/fileenumerator.ccg
@@ -37,7 +37,7 @@ FileEnumerator::next_files_async(const SlotAsyncReady& slot, const Glib::RefPtr<
g_file_enumerator_next_files_async(gobj(),
num_files,
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -70,7 +70,7 @@ FileEnumerator::close_async(int io_priority,
g_file_enumerator_close_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/fileinputstream.ccg b/gio/src/fileinputstream.ccg
index bf89e0c6..5ac95586 100644
--- a/gio/src/fileinputstream.ccg
+++ b/gio/src/fileinputstream.ccg
@@ -73,7 +73,7 @@ FileInputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr
g_file_input_stream_query_info_async(gobj(),
const_cast<char*>(attributes.c_str()),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/fileiostream.ccg b/gio/src/fileiostream.ccg
index 2c017eab..c6f28ae7 100644
--- a/gio/src/fileiostream.ccg
+++ b/gio/src/fileiostream.ccg
@@ -73,7 +73,7 @@ FileIOStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Ca
g_file_io_stream_query_info_async(gobj(),
const_cast<char*>(attributes.c_str()),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/fileoutputstream.ccg b/gio/src/fileoutputstream.ccg
index 068bdd14..269a1fe4 100644
--- a/gio/src/fileoutputstream.ccg
+++ b/gio/src/fileoutputstream.ccg
@@ -79,7 +79,7 @@ FileOutputStream::query_info_async(const SlotAsyncReady& slot, const Glib::RefPt
g_file_output_stream_query_info_async(gobj(),
const_cast<char*>(attributes.c_str()),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/inputstream.ccg b/gio/src/inputstream.ccg
index 1fba3a5d..9ee11ac3 100644
--- a/gio/src/inputstream.ccg
+++ b/gio/src/inputstream.ccg
@@ -113,7 +113,7 @@ InputStream::read_async(void* buffer, gsize count, const SlotAsyncReady& slot, c
buffer,
count,
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -147,7 +147,7 @@ InputStream::skip_async(gsize count, const SlotAsyncReady& slot, const Glib::Ref
g_input_stream_skip_async(gobj(),
count,
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -178,7 +178,7 @@ InputStream::close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancella
g_input_stream_close_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/iostream.ccg b/gio/src/iostream.ccg
index e86d6e7b..7ade3d68 100644
--- a/gio/src/iostream.ccg
+++ b/gio/src/iostream.ccg
@@ -56,7 +56,7 @@ IOStream::close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable
g_io_stream_close_async(gobj(),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/loadableicon.ccg b/gio/src/loadableicon.ccg
index 94c14cbd..5080477c 100644
--- a/gio/src/loadableicon.ccg
+++ b/gio/src/loadableicon.ccg
@@ -38,7 +38,7 @@ LoadableIcon::load(int size, Glib::ustring& type, const Glib::RefPtr<Cancellable
Glib::wrap(g_loadable_icon_load(gobj(),
size,
&c_type,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -97,7 +97,7 @@ LoadableIcon::load_async(int size, const SlotAsyncReady& slot, const
g_loadable_icon_load_async(gobj(),
size,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/mount.ccg b/gio/src/mount.ccg
index bd67ac95..1494b07e 100644
--- a/gio/src/mount.ccg
+++ b/gio/src/mount.ccg
@@ -35,7 +35,7 @@ void Mount::unmount(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>&
g_mount_unmount_with_operation(gobj(),
GMountUnmountFlags(flags),
0, // mount_operation
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -75,8 +75,8 @@ void Mount::unmount(const Glib::RefPtr<MountOperation>& mount_operation,
g_mount_unmount_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -91,7 +91,7 @@ void Mount::unmount(const Glib::RefPtr<MountOperation>& mount_operation,
g_mount_unmount_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
&SignalProxy_async_callback,
slot_copy);
@@ -102,7 +102,7 @@ void Mount::unmount(const Glib::RefPtr<MountOperation>& mount_operation,
{
g_mount_unmount_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
0, // callback
0); // data
@@ -118,8 +118,8 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy
g_mount_remount(gobj(),
static_cast<GMountMountFlags>(flags),
- operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -133,7 +133,7 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy
g_mount_remount(gobj(),
static_cast<GMountMountFlags>(flags),
- operation->gobj(),
+ Glib::unwrap(operation),
NULL,
&SignalProxy_async_callback,
slot_copy);
@@ -143,7 +143,7 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, MountMountFla
{
g_mount_remount(gobj(),
static_cast<GMountMountFlags>(flags),
- operation->gobj(),
+ Glib::unwrap(operation),
NULL,
NULL,
NULL);
@@ -169,7 +169,7 @@ void Mount::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& c
g_mount_eject_with_operation(gobj(),
GMountUnmountFlags(flags),
0, // mount_operation
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -208,8 +208,8 @@ void Mount::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo
g_mount_eject_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -223,7 +223,7 @@ void Mount::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Slo
g_mount_eject_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
&SignalProxy_async_callback,
slot_copy);
@@ -233,7 +233,7 @@ void Mount::eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnmo
{
g_mount_eject_with_operation(gobj(),
GMountUnmountFlags(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
0, // callback
0); // data
@@ -249,7 +249,7 @@ void Mount::guess_content_type(const SlotAsyncReady& slot, const Glib::RefPtr<Ca
g_mount_guess_content_type(gobj(),
force_rescan,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -284,7 +284,7 @@ void Mount::guess_content_type_sync(const Glib::RefPtr<Cancellable>& cancellable
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
- g_mount_guess_content_type_sync(gobj(), force_rescan, cancellable->gobj(),
+ g_mount_guess_content_type_sync(gobj(), force_rescan, Glib::unwrap(cancellable),
&gerror);
if(gerror)
#ifndef GLIBMM_EXCEPTIONS_ENABLED
diff --git a/gio/src/outputstream.ccg b/gio/src/outputstream.ccg
index 70c31717..17daedea 100644
--- a/gio/src/outputstream.ccg
+++ b/gio/src/outputstream.ccg
@@ -36,7 +36,7 @@ OutputStream::write_async(const void* buffer, gsize count, const SlotAsyncReady&
buffer,
count,
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -67,10 +67,10 @@ OutputStream::splice_async(const Glib::RefPtr<InputStream>& source, const SlotAs
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_output_stream_splice_async(gobj(),
- source->gobj(),
+ Glib::unwrap(source),
static_cast<GOutputStreamSpliceFlags>(flags),
io_priority,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -84,7 +84,7 @@ OutputStream::splice_async(const Glib::RefPtr<InputStream>& source, const SlotAs
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_output_stream_splice_async(gobj(),
- source->gobj(),
+ Glib::unwrap(source),
static_cast<GOutputStreamSpliceFlags>(flags),
io_priority,
0,
diff --git a/gio/src/resolver.ccg b/gio/src/resolver.ccg
index 5f8996d9..e7be91b8 100644
--- a/gio/src/resolver.ccg
+++ b/gio/src/resolver.ccg
@@ -102,7 +102,7 @@ Resolver::lookup_by_name_async(const Glib::ustring& hostname,
g_resolver_lookup_by_name_async (gobj(),
hostname.c_str(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -128,8 +128,8 @@ Resolver::lookup_by_address_async(const Glib::RefPtr<InetAddress>& address,
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_resolver_lookup_by_address_async (gobj(),
- address->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(address),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -141,7 +141,7 @@ Resolver::lookup_by_address_async(const Glib::RefPtr<InetAddress>& address,
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_resolver_lookup_by_address_async (gobj(),
- address->gobj(),
+ Glib::unwrap(address),
0,
&SignalProxy_async_callback,
slot_copy);
@@ -160,7 +160,7 @@ Resolver::lookup_service_async(const Glib::ustring& service,
service.c_str(),
protocol.c_str(),
domain.c_str(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/socketaddressenumerator.ccg b/gio/src/socketaddressenumerator.ccg
index 235f2883..1ff77481 100644
--- a/gio/src/socketaddressenumerator.ccg
+++ b/gio/src/socketaddressenumerator.ccg
@@ -33,7 +33,7 @@ namespace Gio {
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_socket_address_enumerator_next_async(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/socketclient.ccg b/gio/src/socketclient.ccg
index 6d6687b8..45da38b3 100644
--- a/gio/src/socketclient.ccg
+++ b/gio/src/socketclient.ccg
@@ -36,7 +36,7 @@ SocketClient::connect_async(const Glib::RefPtr<SocketConnectable>& connectable,
g_socket_client_connect_async (gobj(),
connectable->gobj (),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -71,7 +71,7 @@ SocketClient::connect_to_host_async(const Glib::ustring& host_and_port,
g_socket_client_connect_to_host_async (gobj(),
host_and_port.c_str (),
default_port,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -108,7 +108,7 @@ SocketClient::connect_to_service_async(const Glib::ustring& domain,
g_socket_client_connect_to_service_async (gobj(),
domain.c_str (),
service.c_str (),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gio/src/socketlistener.ccg b/gio/src/socketlistener.ccg
index fb4c2030..629d10f0 100644
--- a/gio/src/socketlistener.ccg
+++ b/gio/src/socketlistener.ccg
@@ -32,7 +32,7 @@ bool SocketListener::add_socket(const Glib::RefPtr<Socket>& socket, std::auto_pt
GError* gerror = 0;
bool retval;
retval = g_socket_listener_add_socket (gobj(),
- socket->gobj(),
+ Glib::unwrap(socket),
0,
&gerror);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -56,10 +56,10 @@ bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, Soc
bool retval;
GSocketAddress *retaddr = NULL;
retval = g_socket_listener_add_address (gobj(),
- address->gobj(),
+ Glib::unwrap(address),
static_cast<GSocketType>(type),
static_cast<GSocketProtocol>(protocol),
- source_object->gobj(),
+ Glib::unwrap(source_object),
&retaddr,
&gerror);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -84,7 +84,7 @@ bool SocketListener::add_address(const Glib::RefPtr<SocketAddress>& address, Soc
bool retval;
GSocketAddress *retaddr = NULL;
retval = g_socket_listener_add_address (gobj(),
- address->gobj(),
+ Glib::unwrap(address),
static_cast<GSocketType>(type),
static_cast<GSocketProtocol>(protocol),
0,
@@ -154,7 +154,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(Glib::RefPtr<Glib::Object>& s
GObject *retobj;
GSocket* retvalue = g_socket_listener_accept_socket(gobj(),
&retobj,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -203,7 +203,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket(const Glib::RefPtr<Cancellabl
GError* gerror = 0;
GSocket* retvalue = g_socket_listener_accept_socket(gobj(),
0,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -247,7 +247,7 @@ void SocketListener::accept_socket_async(const Glib::RefPtr<Cancellable>& cancel
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_socket_listener_accept_socket_async(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -274,7 +274,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy
GError* gerror = 0;
GObject *retobj = 0;
GSocket* retvalue = g_socket_listener_accept_socket_finish(gobj(),
- result->gobj(),
+ Glib::unwrap(result),
&retobj,
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -298,7 +298,7 @@ Glib::RefPtr<Socket> SocketListener::accept_socket_finish(const Glib::RefPtr<Asy
{
GError* gerror = 0;
GSocket* retvalue = g_socket_listener_accept_socket_finish(gobj(),
- result->gobj(),
+ Glib::unwrap(result),
0,
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -323,7 +323,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(Glib::RefPtr<Object>& sour
GObject *retobj = 0;
GSocketConnection* retvalue = g_socket_listener_accept(gobj(),
&retobj,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -372,7 +372,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept(const Glib::RefPtr<Cancell
GError* gerror = 0;
GSocketConnection* retvalue = g_socket_listener_accept(gobj(),
0,
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
@@ -429,7 +429,7 @@ void SocketListener::accept_async(const Glib::RefPtr<Cancellable>& cancellable,
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
g_socket_listener_accept_async(gobj(),
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -443,7 +443,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<
GError* gerror = 0;
GObject *retobj = 0;
GSocketConnection* retvalue = g_socket_listener_accept_finish(gobj(),
- result->gobj(),
+ Glib::unwrap(result),
&retobj,
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -467,7 +467,7 @@ Glib::RefPtr<SocketConnection> SocketListener::accept_finish(const Glib::RefPtr<
{
GError* gerror = 0;
GSocketConnection* retvalue = g_socket_listener_accept_finish(gobj(),
- result->gobj(),
+ Glib::unwrap(result),
0,
&(gerror));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
diff --git a/gio/src/volume.ccg b/gio/src/volume.ccg
index 3bdd9574..06bbad91 100644
--- a/gio/src/volume.ccg
+++ b/gio/src/volume.ccg
@@ -37,8 +37,8 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy
g_volume_mount(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
@@ -54,7 +54,7 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy
g_volume_mount(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL, // cancellable
&SignalProxy_async_callback,
slot_copy);
@@ -65,7 +65,7 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, MountMountFla
{
g_volume_mount(gobj(),
static_cast<GMountMountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
NULL, // cancellable
NULL,
NULL);
@@ -93,7 +93,7 @@ void Volume::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>&
g_volume_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
0, // mount_operation
- cancellable->gobj(),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -132,8 +132,8 @@ void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Sl
g_volume_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
- cancellable->gobj(),
+ Glib::unwrap(mount_operation),
+ Glib::unwrap(cancellable),
&SignalProxy_async_callback,
slot_copy);
}
@@ -147,7 +147,7 @@ void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const Sl
g_volume_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
&SignalProxy_async_callback,
slot_copy);
@@ -157,7 +157,7 @@ void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnm
{
g_volume_eject_with_operation(gobj(),
static_cast<GMountUnmountFlags>(flags),
- mount_operation->gobj(),
+ Glib::unwrap(mount_operation),
0, // cancellable
0, // callback
0); // data