gio2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/gio2/extconf.rb +4 -42
- data/ext/gio2/gio2.c +18 -117
- data/ext/gio2/gio2.h +20 -339
- data/ext/gio2/rbgio.c +132 -0
- data/ext/gio2/rbgio2.h +156 -0
- data/ext/gio2/rbgio2conversions.h +154 -0
- data/ext/gio2/rbgio2private.h +147 -0
- data/ext/gio2/{gappinfo.c → rbgioappinfo.c} +81 -82
- data/ext/gio2/rbgioapplaunchcontext.c +81 -0
- data/ext/gio2/{gasyncinitable.c → rbgioasyncinitable.c} +33 -30
- data/ext/gio2/rbgioasyncresult.c +41 -0
- data/ext/gio2/{gbufferedinputstream.c → rbgiobufferedinputstream.c} +37 -35
- data/ext/gio2/rbgiobufferedoutputstream.c +50 -0
- data/ext/gio2/rbgiocancellable.c +180 -0
- data/ext/gio2/rbgiocharsetconverter.c +57 -0
- data/ext/gio2/rbgiocontenttype.c +131 -0
- data/ext/gio2/{gconverter.c → rbgioconverter.c} +24 -28
- data/ext/gio2/rbgioconverterinputstream.c +43 -0
- data/ext/gio2/rbgioconverteroutputstream.c +43 -0
- data/ext/gio2/{gdatainputstream.c → rbgiodatainputstream.c} +49 -58
- data/ext/gio2/{gdataoutputstream.c → rbgiodataoutputstream.c} +39 -37
- data/ext/gio2/rbgiodesktopappinfo.c +87 -0
- data/ext/gio2/{gdrive.c → rbgiodrive.c} +75 -76
- data/ext/gio2/rbgioemblem.c +52 -0
- data/ext/gio2/rbgioemblemedicon.c +65 -0
- data/ext/gio2/{gfile.c → rbgiofile.c} +256 -266
- data/ext/gio2/rbgiofileattribute.c +114 -0
- data/ext/gio2/rbgiofileattributeinfo.c +86 -0
- data/ext/gio2/rbgiofileattributeinfolist.c +106 -0
- data/ext/gio2/rbgiofileattributematcher.c +93 -0
- data/ext/gio2/rbgiofiledescriptorbased.c +45 -0
- data/ext/gio2/{gfileenumerator.c → rbgiofileenumerator.c} +42 -40
- data/ext/gio2/rbgiofileicon.c +41 -0
- data/ext/gio2/{gfileinfo.c → rbgiofileinfo.c} +159 -163
- data/ext/gio2/{gfileinputstream.c → rbgiofileinputstream.c} +26 -25
- data/ext/gio2/{gfileiostream.c → rbgiofileiostream.c} +28 -26
- data/ext/gio2/rbgiofilemonitor.c +46 -0
- data/ext/gio2/rbgiofilenamecompleter.c +74 -0
- data/ext/gio2/{gfileoutputstream.c → rbgiofileoutputstream.c} +28 -26
- data/ext/gio2/rbgiofilterinputstream.c +28 -0
- data/ext/gio2/rbgiofilteroutputstream.c +28 -0
- data/ext/gio2/rbgioicon.c +69 -0
- data/ext/gio2/rbgioinetaddress.c +118 -0
- data/ext/gio2/rbgioinetsocketaddress.c +41 -0
- data/ext/gio2/{ginitable.c → rbgioinitable.c} +29 -25
- data/ext/gio2/{ginputstream.c → rbgioinputstream.c} +50 -48
- data/ext/gio2/rbgioio.c +73 -0
- data/ext/gio2/rbgioiomodule.c +45 -0
- data/ext/gio2/rbgioiomodules.c +47 -0
- data/ext/gio2/rbgioioscheduler.c +102 -0
- data/ext/gio2/rbgioioschedulerjob.c +121 -0
- data/ext/gio2/rbgioiostream.c +108 -0
- data/ext/gio2/{gloadableicon.c → rbgioloadableicon.c} +26 -24
- data/ext/gio2/rbgiomemoryinputstream.c +67 -0
- data/ext/gio2/rbgiomemoryoutputstream.c +44 -0
- data/ext/gio2/{gmount.c → rbgiomount.c} +70 -68
- data/ext/gio2/rbgiomountoperation.c +53 -0
- data/ext/gio2/rbgionetworkaddress.c +59 -0
- data/ext/gio2/rbgionetworkservice.c +45 -0
- data/ext/gio2/{goutputstream.c → rbgiooutputstream.c} +61 -62
- data/ext/gio2/{gresolver.c → rbgioresolver.c} +50 -48
- data/ext/gio2/rbgioseekable.c +91 -0
- data/ext/gio2/rbgiosimpleasyncresult.c +155 -0
- data/ext/gio2/{gsocket.c → rbgiosocket.c} +74 -76
- data/ext/gio2/rbgiosocketaddress.c +34 -0
- data/ext/gio2/rbgiosocketaddressenumerator.c +83 -0
- data/ext/gio2/{gsocketclient.c → rbgiosocketclient.c} +41 -39
- data/ext/gio2/rbgiosocketconnectable.c +41 -0
- data/ext/gio2/rbgiosocketconnection.c +66 -0
- data/ext/gio2/rbgiosocketconnectionfactory.c +39 -0
- data/ext/gio2/rbgiosocketcontrolmessage.c +82 -0
- data/ext/gio2/{gsocketlistener.c → rbgiosocketlistener.c} +49 -47
- data/ext/gio2/rbgiosocketservice.c +66 -0
- data/ext/gio2/rbgiosrvtarget.c +76 -0
- data/ext/gio2/rbgiotcpconnection.c +28 -0
- data/ext/gio2/rbgiothemedicon.c +83 -0
- data/ext/gio2/rbgiothreadedsocketservice.c +43 -0
- data/ext/gio2/rbgiounixconnection.c +71 -0
- data/ext/gio2/rbgiounixfdlist.c +115 -0
- data/ext/gio2/rbgiounixfdmessage.c +74 -0
- data/ext/gio2/rbgiounixinputstream.c +51 -0
- data/ext/gio2/rbgiounixmount.c +164 -0
- data/ext/gio2/rbgiounixmountmonitor.c +66 -0
- data/ext/gio2/rbgiounixmountpoint.c +136 -0
- data/ext/gio2/rbgiounixmountpoints.c +58 -0
- data/ext/gio2/rbgiounixmounts.c +58 -0
- data/ext/gio2/rbgiounixoutputstream.c +51 -0
- data/ext/gio2/rbgiounixsocketaddress.c +69 -0
- data/ext/gio2/rbgiovfs.c +84 -0
- data/ext/gio2/rbgiovolume.c +193 -0
- data/ext/gio2/rbgiovolumemonitor.c +77 -0
- data/ext/gio2/rbgiozlibcompressor.c +52 -0
- data/ext/gio2/rbgiozlibdecompressor.c +45 -0
- data/ext/gio2/util.c +57 -60
- data/lib/1.8/gio2.so +0 -0
- data/lib/1.9/gio2.so +0 -0
- data/lib/gio2/deprecated.rb +102 -0
- data/lib/gio2.rb +14 -12
- metadata +100 -88
- data/ChangeLog +0 -129
- data/ext/gio2/gapplaunchcontext.c +0 -79
- data/ext/gio2/gasyncresult.c +0 -39
- data/ext/gio2/gbufferedoutputstream.c +0 -48
- data/ext/gio2/gcancellable.c +0 -177
- data/ext/gio2/gcharsetconverter.c +0 -55
- data/ext/gio2/gcontenttype.c +0 -128
- data/ext/gio2/gconverterinputstream.c +0 -41
- data/ext/gio2/gconverteroutputstream.c +0 -41
- data/ext/gio2/gdesktopappinfo.c +0 -88
- data/ext/gio2/gemblem.c +0 -52
- data/ext/gio2/gemblemedicon.c +0 -63
- data/ext/gio2/gfileattribute.c +0 -111
- data/ext/gio2/gfileattributeinfo.c +0 -89
- data/ext/gio2/gfileattributeinfolist.c +0 -109
- data/ext/gio2/gfileattributematcher.c +0 -90
- data/ext/gio2/gfiledescriptorbased.c +0 -42
- data/ext/gio2/gfileicon.c +0 -39
- data/ext/gio2/gfilemonitor.c +0 -44
- data/ext/gio2/gfilenamecompleter.c +0 -72
- data/ext/gio2/gfilterinputstream.c +0 -27
- data/ext/gio2/gfilteroutputstream.c +0 -27
- data/ext/gio2/gicon.c +0 -67
- data/ext/gio2/ginetaddress.c +0 -116
- data/ext/gio2/ginetsocketaddress.c +0 -38
- data/ext/gio2/gioerror.c +0 -70
- data/ext/gio2/giomodule.c +0 -63
- data/ext/gio2/gioscheduler.c +0 -193
- data/ext/gio2/giostream.c +0 -106
- data/ext/gio2/gmemoryinputstream.c +0 -65
- data/ext/gio2/gmemoryoutputstream.c +0 -41
- data/ext/gio2/gmountoperation.c +0 -66
- data/ext/gio2/gnetworkaddress.c +0 -57
- data/ext/gio2/gnetworkservice.c +0 -43
- data/ext/gio2/gseekable.c +0 -89
- data/ext/gio2/gsimpleasyncresult.c +0 -153
- data/ext/gio2/gsocketaddress.c +0 -33
- data/ext/gio2/gsocketconnectable.c +0 -97
- data/ext/gio2/gsocketconnection.c +0 -75
- data/ext/gio2/gsocketcontrolmessage.c +0 -80
- data/ext/gio2/gsocketservice.c +0 -64
- data/ext/gio2/gsrvtarget.c +0 -77
- data/ext/gio2/gtcpconnection.c +0 -27
- data/ext/gio2/gthemedicon.c +0 -81
- data/ext/gio2/gthreadedsocketservice.c +0 -40
- data/ext/gio2/gunixconnection.c +0 -69
- data/ext/gio2/gunixfdlist.c +0 -112
- data/ext/gio2/gunixfdmessage.c +0 -72
- data/ext/gio2/gunixinputstream.c +0 -49
- data/ext/gio2/gunixmounts.c +0 -343
- data/ext/gio2/gunixoutputstream.c +0 -49
- data/ext/gio2/gunixsocketaddress.c +0 -67
- data/ext/gio2/gvfs.c +0 -82
- data/ext/gio2/gvolume.c +0 -191
- data/ext/gio2/gvolumemonitor.c +0 -75
- data/ext/gio2/gzlibcompressor.c +0 -50
- data/ext/gio2/gzlibdecompressor.c +0 -43
@@ -1,49 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#ifdef HAVE_GIO_UNIX
|
24
|
-
#include <gio/gunixoutputstream.h>
|
25
|
-
|
26
|
-
#define _SELF(value) G_UNIX_OUTPUT_STREAM(RVAL2GOBJ(value))
|
27
|
-
|
28
|
-
static VALUE
|
29
|
-
unixoutputstream_initialize(int argc, VALUE *argv, VALUE self)
|
30
|
-
{
|
31
|
-
VALUE fd, close_fd;
|
32
|
-
|
33
|
-
rb_scan_args(argc, argv, "11", &fd, &close_fd);
|
34
|
-
G_INITIALIZE(self, g_unix_output_stream_new(RVAL2FD(fd),
|
35
|
-
RVAL2CBOOL(close_fd)));
|
36
|
-
|
37
|
-
return Qnil;
|
38
|
-
}
|
39
|
-
#endif
|
40
|
-
|
41
|
-
void
|
42
|
-
Init_gunixoutputstream(G_GNUC_UNUSED VALUE glib)
|
43
|
-
{
|
44
|
-
#ifdef HAVE_GIO_UNIX
|
45
|
-
VALUE unixoutputstream = G_DEF_CLASS(G_TYPE_UNIX_OUTPUT_STREAM, "UnixOutputStream", glib);
|
46
|
-
|
47
|
-
rb_define_method(unixoutputstream, "initialize", unixoutputstream_initialize, -1);
|
48
|
-
#endif
|
49
|
-
}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#ifdef HAVE_GIO_UNIX
|
24
|
-
#include <gio/gunixsocketaddress.h>
|
25
|
-
|
26
|
-
#define _SELF(value) G_UNIX_SOCKET_ADDRESS(RVAL2GOBJ(value))
|
27
|
-
|
28
|
-
static VALUE
|
29
|
-
unixsocketaddress_initialize(VALUE self, VALUE path)
|
30
|
-
{
|
31
|
-
G_INITIALIZE(self, g_unix_socket_address_new(RVAL2CSTR(path)));
|
32
|
-
|
33
|
-
return Qnil;
|
34
|
-
}
|
35
|
-
|
36
|
-
static VALUE
|
37
|
-
unixsocketaddress_new_abstract(G_GNUC_UNUSED VALUE self, VALUE path)
|
38
|
-
{
|
39
|
-
StringValue(path);
|
40
|
-
return GOBJ2RVAL_UNREF(g_unix_socket_address_new_abstract(RSTRING_PTR(path),
|
41
|
-
RSTRING_LEN(path)));
|
42
|
-
}
|
43
|
-
|
44
|
-
static VALUE
|
45
|
-
unixsocketaddress_abstract_names_supported(G_GNUC_UNUSED VALUE self)
|
46
|
-
{
|
47
|
-
return CBOOL2RVAL(g_unix_socket_address_abstract_names_supported());
|
48
|
-
}
|
49
|
-
#endif
|
50
|
-
|
51
|
-
void
|
52
|
-
Init_gunixsocketaddress(G_GNUC_UNUSED VALUE glib)
|
53
|
-
{
|
54
|
-
#ifdef HAVE_GIO_UNIX
|
55
|
-
VALUE unixsocketaddress = G_DEF_CLASS(G_TYPE_UNIX_SOCKET_ADDRESS, "UnixSocketAddress", glib);
|
56
|
-
|
57
|
-
# if GLIB_CHECK_VERSION(2, 26, 0)
|
58
|
-
G_DEF_CLASS(G_TYPE_UNIX_SOCKET_ADDRESS_TYPE, "Type", unixsocketaddress);
|
59
|
-
G_DEF_CONSTANTS(unixsocketaddress, G_TYPE_UNIX_SOCKET_ADDRESS_TYPE, "G_UNIX_SOCKET_ADDRESS_");
|
60
|
-
# endif
|
61
|
-
|
62
|
-
rb_define_singleton_method(unixsocketaddress, "new_abstract", unixsocketaddress_new_abstract, 1);
|
63
|
-
rb_define_singleton_method(unixsocketaddress, "abstract_names_supported?", unixsocketaddress_abstract_names_supported, 0);
|
64
|
-
|
65
|
-
rb_define_method(unixsocketaddress, "initialize", unixsocketaddress_initialize, 1);
|
66
|
-
#endif
|
67
|
-
}
|
data/ext/gio2/gvfs.c
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#define _SELF(value) G_VFS(RVAL2GOBJ(value))
|
24
|
-
|
25
|
-
static VALUE
|
26
|
-
vfs_get_file_for_path(VALUE self, VALUE path)
|
27
|
-
{
|
28
|
-
return GOBJ2RVAL_UNREF(g_vfs_get_file_for_path(_SELF(self), RVAL2CSTR(path)));
|
29
|
-
}
|
30
|
-
|
31
|
-
static VALUE
|
32
|
-
vfs_get_file_for_uri(VALUE self, VALUE uri)
|
33
|
-
{
|
34
|
-
return GOBJ2RVAL_UNREF(g_vfs_get_file_for_uri(_SELF(self), RVAL2CSTR(uri)));
|
35
|
-
}
|
36
|
-
|
37
|
-
static VALUE
|
38
|
-
vfs_parse_name(VALUE self, VALUE parse_name)
|
39
|
-
{
|
40
|
-
return GOBJ2RVAL_UNREF(g_vfs_parse_name(_SELF(self), RVAL2CSTR(parse_name)));
|
41
|
-
}
|
42
|
-
|
43
|
-
static VALUE
|
44
|
-
vfs_get_default(G_GNUC_UNUSED VALUE self)
|
45
|
-
{
|
46
|
-
return GOBJ2RVAL(g_vfs_get_default());
|
47
|
-
}
|
48
|
-
|
49
|
-
static VALUE
|
50
|
-
vfs_get_local(G_GNUC_UNUSED VALUE self)
|
51
|
-
{
|
52
|
-
return GOBJ2RVAL(g_vfs_get_local());
|
53
|
-
}
|
54
|
-
|
55
|
-
static VALUE
|
56
|
-
vfs_is_active(VALUE self)
|
57
|
-
{
|
58
|
-
return CBOOL2RVAL(g_vfs_is_active(_SELF(self)));
|
59
|
-
}
|
60
|
-
|
61
|
-
static VALUE
|
62
|
-
vfs_get_supported_uri_schemes(VALUE self)
|
63
|
-
{
|
64
|
-
return STRVECTOR2ARY(g_vfs_get_supported_uri_schemes(_SELF(self)));
|
65
|
-
}
|
66
|
-
|
67
|
-
void
|
68
|
-
Init_gvfs(VALUE glib)
|
69
|
-
{
|
70
|
-
VALUE vfs = G_DEF_CLASS(G_TYPE_VFS, "Vfs", glib);
|
71
|
-
|
72
|
-
rb_define_const(vfs, "EXTENSION_POINT_NAME", CSTR2RVAL(G_VFS_EXTENSION_POINT_NAME));
|
73
|
-
|
74
|
-
rb_define_singleton_method(vfs, "default", vfs_get_default, 0);
|
75
|
-
rb_define_singleton_method(vfs, "local", vfs_get_local, 0);
|
76
|
-
|
77
|
-
rb_define_method(vfs, "file_for_path", vfs_get_file_for_path, 1);
|
78
|
-
rb_define_method(vfs, "file_for_uri", vfs_get_file_for_uri, 1);
|
79
|
-
rb_define_method(vfs, "parse_name", vfs_parse_name, 1);
|
80
|
-
rb_define_method(vfs, "active?", vfs_is_active, 0);
|
81
|
-
rb_define_method(vfs, "supported_uri_schemes", vfs_get_supported_uri_schemes, 0);
|
82
|
-
}
|
data/ext/gio2/gvolume.c
DELETED
@@ -1,191 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#define _SELF(value) G_VOLUME(RVAL2GOBJ(value))
|
24
|
-
|
25
|
-
static VALUE
|
26
|
-
volume_get_name(VALUE self)
|
27
|
-
{
|
28
|
-
return CSTR2RVAL_FREE(g_volume_get_name(_SELF(self)));
|
29
|
-
}
|
30
|
-
|
31
|
-
static VALUE
|
32
|
-
volume_get_uuid(VALUE self)
|
33
|
-
{
|
34
|
-
return CSTR2RVAL_FREE(g_volume_get_uuid(_SELF(self)));
|
35
|
-
}
|
36
|
-
|
37
|
-
static VALUE
|
38
|
-
volume_get_icon(VALUE self)
|
39
|
-
{
|
40
|
-
return GOBJ2RVAL_UNREF(g_volume_get_icon(_SELF(self)));
|
41
|
-
}
|
42
|
-
|
43
|
-
static VALUE
|
44
|
-
volume_get_drive(VALUE self)
|
45
|
-
{
|
46
|
-
return GOBJ2RVAL_UNREF(g_volume_get_drive(_SELF(self)));
|
47
|
-
}
|
48
|
-
|
49
|
-
static VALUE
|
50
|
-
volume_get_mount(VALUE self)
|
51
|
-
{
|
52
|
-
return GOBJ2RVAL_UNREF(g_volume_get_mount(_SELF(self)));
|
53
|
-
}
|
54
|
-
|
55
|
-
static VALUE
|
56
|
-
volume_can_mount(VALUE self)
|
57
|
-
{
|
58
|
-
return CBOOL2RVAL(g_volume_can_mount(_SELF(self)));
|
59
|
-
}
|
60
|
-
|
61
|
-
static VALUE
|
62
|
-
volume_should_automount(VALUE self)
|
63
|
-
{
|
64
|
-
return CBOOL2RVAL(g_volume_should_automount(_SELF(self)));
|
65
|
-
}
|
66
|
-
|
67
|
-
static VALUE
|
68
|
-
volume_get_activation_root(VALUE self)
|
69
|
-
{
|
70
|
-
return GOBJ2RVAL_UNREF(g_volume_get_activation_root(_SELF(self)));
|
71
|
-
}
|
72
|
-
|
73
|
-
static VALUE
|
74
|
-
volume_mount(int argc, VALUE *argv, VALUE self)
|
75
|
-
{
|
76
|
-
VALUE rbflags, rbmount_operation, rbcancellable, block;
|
77
|
-
GMountMountFlags flags;
|
78
|
-
GMountOperation *mount_operation;
|
79
|
-
GCancellable *cancellable;
|
80
|
-
|
81
|
-
rb_scan_args(argc, argv, "03&", &rbflags, &rbmount_operation, &rbcancellable, &block);
|
82
|
-
flags = RVAL2GMOUNTMOUNTFLAGSDEFAULT(rbflags);
|
83
|
-
mount_operation = RVAL2GMOUNTOPERATION(rbmount_operation);
|
84
|
-
cancellable = RVAL2GCANCELLABLE(rbcancellable);
|
85
|
-
SAVE_BLOCK(block);
|
86
|
-
g_volume_mount(_SELF(self),
|
87
|
-
flags,
|
88
|
-
mount_operation,
|
89
|
-
cancellable,
|
90
|
-
rbgio_async_ready_callback,
|
91
|
-
(gpointer)block);
|
92
|
-
|
93
|
-
return self;
|
94
|
-
}
|
95
|
-
|
96
|
-
typedef gboolean (*BooleanFinishMethod)(GVolume *,
|
97
|
-
GAsyncResult *,
|
98
|
-
GError **);
|
99
|
-
|
100
|
-
static VALUE
|
101
|
-
boolean_finish_method(BooleanFinishMethod method, VALUE self, VALUE result)
|
102
|
-
{
|
103
|
-
GError *error = NULL;
|
104
|
-
|
105
|
-
if (!method(_SELF(self), RVAL2GASYNCRESULT(result), &error))
|
106
|
-
rbgio_raise_error(error);
|
107
|
-
|
108
|
-
return self;
|
109
|
-
}
|
110
|
-
|
111
|
-
static VALUE
|
112
|
-
volume_mount_finish(VALUE self, VALUE result)
|
113
|
-
{
|
114
|
-
return boolean_finish_method(g_volume_mount_finish, self, result);
|
115
|
-
}
|
116
|
-
|
117
|
-
static VALUE
|
118
|
-
volume_can_eject(VALUE self)
|
119
|
-
{
|
120
|
-
return CBOOL2RVAL(g_volume_can_eject(_SELF(self)));
|
121
|
-
}
|
122
|
-
|
123
|
-
static VALUE
|
124
|
-
volume_eject_with_operation(int argc, VALUE *argv, VALUE self)
|
125
|
-
{
|
126
|
-
VALUE rbflags, rbmount_operation, rbcancellable, block;
|
127
|
-
GMountUnmountFlags flags;
|
128
|
-
GMountOperation *mount_operation;
|
129
|
-
GCancellable *cancellable;
|
130
|
-
|
131
|
-
rb_scan_args(argc, argv, "03&", &rbflags, &rbmount_operation, &rbcancellable, &block);
|
132
|
-
flags = RVAL2GMOUNTUNMOUNTFLAGSDEFAULT(rbflags);
|
133
|
-
mount_operation = RVAL2GMOUNTOPERATION(rbmount_operation);
|
134
|
-
cancellable = RVAL2GCANCELLABLE(rbcancellable);
|
135
|
-
SAVE_BLOCK(block);
|
136
|
-
g_volume_eject_with_operation(_SELF(self),
|
137
|
-
flags,
|
138
|
-
mount_operation,
|
139
|
-
cancellable,
|
140
|
-
rbgio_async_ready_callback,
|
141
|
-
(gpointer)block);
|
142
|
-
|
143
|
-
return self;
|
144
|
-
}
|
145
|
-
|
146
|
-
static VALUE
|
147
|
-
volume_eject_with_operation_finish(VALUE self, VALUE result)
|
148
|
-
{
|
149
|
-
return boolean_finish_method(g_volume_eject_with_operation_finish, self, result);
|
150
|
-
}
|
151
|
-
|
152
|
-
static VALUE
|
153
|
-
volume_enumerate_identifiers(VALUE self)
|
154
|
-
{
|
155
|
-
return STRVECTOR2ARY_FREE(g_volume_enumerate_identifiers(_SELF(self)));
|
156
|
-
}
|
157
|
-
|
158
|
-
static VALUE
|
159
|
-
volume_get_identifier(VALUE self, VALUE kind)
|
160
|
-
{
|
161
|
-
return CSTR2RVAL_FREE(g_volume_get_identifier(_SELF(self), RVAL2CSTR(kind)));
|
162
|
-
}
|
163
|
-
|
164
|
-
void
|
165
|
-
Init_gvolume(VALUE glib)
|
166
|
-
{
|
167
|
-
VALUE volume = G_DEF_INTERFACE(G_TYPE_VOLUME, "Volume", glib);
|
168
|
-
|
169
|
-
rb_define_const(volume, "IDENTIFIER_KIND_HAL_UDI", CSTR2RVAL(G_VOLUME_IDENTIFIER_KIND_HAL_UDI));
|
170
|
-
rb_define_const(volume, "IDENTIFIER_KIND_LABEL", CSTR2RVAL(G_VOLUME_IDENTIFIER_KIND_LABEL));
|
171
|
-
rb_define_const(volume, "IDENTIFIER_KIND_NFS_MOUNT", CSTR2RVAL(G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT));
|
172
|
-
rb_define_const(volume, "IDENTIFIER_KIND_UNIX_DEVICE", CSTR2RVAL(G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE));
|
173
|
-
rb_define_const(volume, "IDENTIFIER_KIND_UUID", CSTR2RVAL(G_VOLUME_IDENTIFIER_KIND_UUID));
|
174
|
-
|
175
|
-
rb_define_method(volume, "name", volume_get_name, 0);
|
176
|
-
rb_define_method(volume, "uuid", volume_get_uuid, 0);
|
177
|
-
rb_define_method(volume, "icon", volume_get_icon, 0);
|
178
|
-
rb_define_method(volume, "drive", volume_get_drive, 0);
|
179
|
-
rb_define_method(volume, "get_mount", volume_get_mount, 0);
|
180
|
-
rb_define_method(volume, "can_mount?", volume_can_mount, 0);
|
181
|
-
rb_define_method(volume, "should_automount?", volume_should_automount, 0);
|
182
|
-
rb_define_method(volume, "activation_root", volume_get_activation_root, 0);
|
183
|
-
rb_define_method(volume, "mount", volume_mount, -1);
|
184
|
-
rb_define_method(volume, "mount_finish", volume_mount_finish, 1);
|
185
|
-
rb_define_method(volume, "can_eject?", volume_can_eject, 0);
|
186
|
-
rb_define_method(volume, "eject_with_operation", volume_eject_with_operation, -1);
|
187
|
-
rb_define_method(volume, "eject_with_operation_finish", volume_eject_with_operation_finish, 1);
|
188
|
-
rb_define_method(volume, "enumerate_identifiers", volume_enumerate_identifiers, -1);
|
189
|
-
rb_define_alias(volume, "identifiers", "enumerate_identifiers");
|
190
|
-
rb_define_method(volume, "get_identifier", volume_get_identifier, 1);
|
191
|
-
}
|
data/ext/gio2/gvolumemonitor.c
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#define _SELF(value) G_VOLUME_MONITOR(RVAL2GOBJ(value))
|
24
|
-
|
25
|
-
static VALUE
|
26
|
-
volumemonitor_get(G_GNUC_UNUSED VALUE self)
|
27
|
-
{
|
28
|
-
return GOBJ2RVAL_UNREF(g_volume_monitor_get());
|
29
|
-
}
|
30
|
-
|
31
|
-
static VALUE
|
32
|
-
volumemonitor_get_connected_drives(VALUE self)
|
33
|
-
{
|
34
|
-
return GLIST2ARY_FREE(g_volume_monitor_get_connected_drives(_SELF(self)));
|
35
|
-
}
|
36
|
-
|
37
|
-
static VALUE
|
38
|
-
volumemonitor_get_volumes(VALUE self)
|
39
|
-
{
|
40
|
-
return GLIST2ARY_FREE(g_volume_monitor_get_volumes(_SELF(self)));
|
41
|
-
}
|
42
|
-
|
43
|
-
static VALUE
|
44
|
-
volumemonitor_get_mounts(VALUE self)
|
45
|
-
{
|
46
|
-
return GLIST2ARY_FREE(g_volume_monitor_get_mounts(_SELF(self)));
|
47
|
-
}
|
48
|
-
|
49
|
-
static VALUE
|
50
|
-
volumemonitor_get_mount_for_uuid(VALUE self, VALUE value)
|
51
|
-
{
|
52
|
-
return GOBJ2RVAL_UNREF(g_volume_monitor_get_mount_for_uuid(_SELF(self), RVAL2CSTR(value)));
|
53
|
-
}
|
54
|
-
|
55
|
-
static VALUE
|
56
|
-
volumemonitor_get_volume_for_uuid(VALUE self, VALUE value)
|
57
|
-
{
|
58
|
-
return GOBJ2RVAL_UNREF(g_volume_monitor_get_volume_for_uuid(_SELF(self), RVAL2CSTR(value)));
|
59
|
-
}
|
60
|
-
|
61
|
-
void
|
62
|
-
Init_gvolumemonitor(VALUE glib)
|
63
|
-
{
|
64
|
-
VALUE volumemonitor = G_DEF_CLASS(G_TYPE_VOLUME_MONITOR, "VolumeMonitor", glib);
|
65
|
-
|
66
|
-
rb_define_const(volumemonitor, "EXTENSION_POINT_NAME", CSTR2RVAL(G_VOLUME_MONITOR_EXTENSION_POINT_NAME));
|
67
|
-
|
68
|
-
rb_define_singleton_method(volumemonitor, "get", volumemonitor_get, 0);
|
69
|
-
|
70
|
-
rb_define_method(volumemonitor, "connected_drives", volumemonitor_get_connected_drives, 0);
|
71
|
-
rb_define_method(volumemonitor, "volumes", volumemonitor_get_volumes, 0);
|
72
|
-
rb_define_method(volumemonitor, "mounts", volumemonitor_get_mounts, 0);
|
73
|
-
rb_define_method(volumemonitor, "get_mount_for_uuid", volumemonitor_get_mount_for_uuid, 0);
|
74
|
-
rb_define_method(volumemonitor, "get_volume_for_uuid", volumemonitor_get_volume_for_uuid, 0);
|
75
|
-
}
|
data/ext/gio2/gzlibcompressor.c
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#define _SELF(value) G_ZLIB_COMPRESSOR(RVAL2GOBJ(value))
|
24
|
-
|
25
|
-
#define RVAL2ZLIBCOMPRESSORLEVELDEFAULT(value) \
|
26
|
-
RVAL2TYPE_WITH_DEFAULT((value), FIX2INT, -1)
|
27
|
-
|
28
|
-
static VALUE
|
29
|
-
zlibcompressor_initialize(int argc, VALUE *argv, VALUE self)
|
30
|
-
{
|
31
|
-
VALUE format, level;
|
32
|
-
|
33
|
-
rb_scan_args(argc, argv, "02", &format, &level);
|
34
|
-
G_INITIALIZE(self,
|
35
|
-
g_zlib_compressor_new(RVAL2GZLIBCOMPRESSORFORMATDEFAULT(format),
|
36
|
-
RVAL2GZLIBCOMPRESSORFORMATDEFAULT(level)));
|
37
|
-
|
38
|
-
return Qnil;
|
39
|
-
}
|
40
|
-
|
41
|
-
void
|
42
|
-
Init_gzlibcompressor(VALUE glib)
|
43
|
-
{
|
44
|
-
VALUE zlibcompressor = G_DEF_CLASS(G_TYPE_ZLIB_COMPRESSOR, "ZlibCompressor", glib);
|
45
|
-
|
46
|
-
G_DEF_CLASS(G_TYPE_ZLIB_COMPRESSOR_FORMAT, "Format", zlibcompressor);
|
47
|
-
G_DEF_CONSTANTS(zlibcompressor, G_TYPE_ZLIB_COMPRESSOR_FORMAT, "G_ZLIB_");
|
48
|
-
|
49
|
-
rb_define_method(zlibcompressor, "initialize", zlibcompressor_initialize, -1);
|
50
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
* Ruby/GIO: a Ruby binding of gio-2.0.x.
|
4
|
-
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "gio2.h"
|
22
|
-
|
23
|
-
#define _SELF(value) G_ZLIB_DECOMPRESSOR(RVAL2GOBJ(value))
|
24
|
-
|
25
|
-
static VALUE
|
26
|
-
zlibdecompressor_initialize(int argc, VALUE *argv, VALUE self)
|
27
|
-
{
|
28
|
-
VALUE format;
|
29
|
-
|
30
|
-
rb_scan_args(argc, argv, "01", &format);
|
31
|
-
G_INITIALIZE(self,
|
32
|
-
g_zlib_decompressor_new(RVAL2GZLIBCOMPRESSORFORMATDEFAULT(format)));
|
33
|
-
|
34
|
-
return Qnil;
|
35
|
-
}
|
36
|
-
|
37
|
-
void
|
38
|
-
Init_gzlibdecompressor(VALUE glib)
|
39
|
-
{
|
40
|
-
VALUE zlibdecompressor = G_DEF_CLASS(G_TYPE_ZLIB_DECOMPRESSOR, "ZlibDecompressor", glib);
|
41
|
-
|
42
|
-
rb_define_method(zlibdecompressor, "initialize", zlibdecompressor_initialize, -1);
|
43
|
-
}
|