gio2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- 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,71 +1,73 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
*
|
4
|
-
*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
5
|
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
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, or (at your option) any later version.
|
10
10
|
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
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
15
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
19
20
|
*/
|
20
21
|
|
21
|
-
#include "
|
22
|
+
#include "rbgio2private.h"
|
22
23
|
|
24
|
+
#define RG_TARGET_NAMESPACE mMount
|
23
25
|
#define _SELF(value) RVAL2GMOUNT(value)
|
24
26
|
|
25
27
|
static VALUE
|
26
|
-
|
28
|
+
rg_name(VALUE self)
|
27
29
|
{
|
28
30
|
return CSTR2RVAL_FREE(g_mount_get_name(_SELF(self)));
|
29
31
|
}
|
30
32
|
|
31
33
|
static VALUE
|
32
|
-
|
34
|
+
rg_uuid(VALUE self)
|
33
35
|
{
|
34
36
|
return CSTR2RVAL_FREE(g_mount_get_uuid(_SELF(self)));
|
35
37
|
}
|
36
38
|
|
37
39
|
static VALUE
|
38
|
-
|
40
|
+
rg_icon(VALUE self)
|
39
41
|
{
|
40
42
|
return GOBJ2RVAL_UNREF(g_mount_get_icon(_SELF(self)));
|
41
43
|
}
|
42
44
|
|
43
45
|
static VALUE
|
44
|
-
|
46
|
+
rg_drive(VALUE self)
|
45
47
|
{
|
46
48
|
return GOBJ2RVAL_UNREF(g_mount_get_drive(_SELF(self)));
|
47
49
|
}
|
48
50
|
|
49
51
|
static VALUE
|
50
|
-
|
52
|
+
rg_root(VALUE self)
|
51
53
|
{
|
52
54
|
return GOBJ2RVAL_UNREF(g_mount_get_root(_SELF(self)));
|
53
55
|
}
|
54
56
|
|
55
57
|
static VALUE
|
56
|
-
|
58
|
+
rg_volume(VALUE self)
|
57
59
|
{
|
58
60
|
return GOBJ2RVAL_UNREF(g_mount_get_volume(_SELF(self)));
|
59
61
|
}
|
60
62
|
|
61
63
|
static VALUE
|
62
|
-
|
64
|
+
rg_default_location(VALUE self)
|
63
65
|
{
|
64
66
|
return GOBJ2RVAL_UNREF(g_mount_get_default_location(_SELF(self)));
|
65
67
|
}
|
66
68
|
|
67
69
|
static VALUE
|
68
|
-
|
70
|
+
rg_can_unmount_p(VALUE self)
|
69
71
|
{
|
70
72
|
return CBOOL2RVAL(g_mount_can_unmount(_SELF(self)));
|
71
73
|
}
|
@@ -101,7 +103,7 @@ unmount_eject_method(UnmountEjectMethod method, int argc, VALUE *argv, VALUE sel
|
|
101
103
|
}
|
102
104
|
|
103
105
|
static VALUE
|
104
|
-
|
106
|
+
rg_unmount_with_operation(int argc, VALUE *argv, VALUE self)
|
105
107
|
{
|
106
108
|
return unmount_eject_method(g_mount_unmount_with_operation, argc, argv, self);
|
107
109
|
}
|
@@ -122,13 +124,13 @@ boolean_finish_method(BooleanFinishMethod method, VALUE self, VALUE result)
|
|
122
124
|
}
|
123
125
|
|
124
126
|
static VALUE
|
125
|
-
|
127
|
+
rg_unmount_with_operation_finish(VALUE self, VALUE result)
|
126
128
|
{
|
127
129
|
return boolean_finish_method(g_mount_unmount_with_operation_finish, self, result);
|
128
130
|
}
|
129
131
|
|
130
132
|
static VALUE
|
131
|
-
|
133
|
+
rg_remount(int argc, VALUE *argv, VALUE self)
|
132
134
|
{
|
133
135
|
VALUE rbflags, rbmount_operation, rbcancellable, block;
|
134
136
|
GMountMountFlags flags;
|
@@ -151,31 +153,31 @@ mount_remount(int argc, VALUE *argv, VALUE self)
|
|
151
153
|
}
|
152
154
|
|
153
155
|
static VALUE
|
154
|
-
|
156
|
+
rg_remount_finish(VALUE self, VALUE result)
|
155
157
|
{
|
156
158
|
return boolean_finish_method(g_mount_remount_finish, self, result);
|
157
159
|
}
|
158
160
|
|
159
161
|
static VALUE
|
160
|
-
|
162
|
+
rg_can_eject_p(VALUE self)
|
161
163
|
{
|
162
164
|
return CBOOL2RVAL(g_mount_can_eject(_SELF(self)));
|
163
165
|
}
|
164
166
|
|
165
167
|
static VALUE
|
166
|
-
|
168
|
+
rg_eject_with_operation(int argc, VALUE *argv, VALUE self)
|
167
169
|
{
|
168
170
|
return unmount_eject_method(g_mount_eject_with_operation, argc, argv, self);
|
169
171
|
}
|
170
172
|
|
171
173
|
static VALUE
|
172
|
-
|
174
|
+
rg_eject_with_operation_finish(VALUE self, VALUE result)
|
173
175
|
{
|
174
176
|
return boolean_finish_method(g_mount_eject_with_operation_finish, self, result);
|
175
177
|
}
|
176
178
|
|
177
179
|
static VALUE
|
178
|
-
|
180
|
+
rg_guess_content_type(int argc, VALUE *argv, VALUE self)
|
179
181
|
{
|
180
182
|
VALUE rbforce_rescan, rbcancellable, block;
|
181
183
|
gboolean force_rescan;
|
@@ -195,7 +197,7 @@ mount_guess_content_type(int argc, VALUE *argv, VALUE self)
|
|
195
197
|
}
|
196
198
|
|
197
199
|
static VALUE
|
198
|
-
|
200
|
+
rg_guess_content_type_finish(VALUE self, VALUE result)
|
199
201
|
{
|
200
202
|
GError *error = NULL;
|
201
203
|
gchar **content_types;
|
@@ -206,11 +208,11 @@ mount_guess_content_type_finish(VALUE self, VALUE result)
|
|
206
208
|
if (content_types == NULL)
|
207
209
|
rbgio_raise_error(error);
|
208
210
|
|
209
|
-
return
|
211
|
+
return STRV2RVAL_FREE(content_types);
|
210
212
|
}
|
211
213
|
|
212
214
|
static VALUE
|
213
|
-
|
215
|
+
rg_guess_content_type_sync(int argc, VALUE *argv, VALUE self)
|
214
216
|
{
|
215
217
|
VALUE force_rescan, cancellable;
|
216
218
|
GError *error = NULL;
|
@@ -224,17 +226,17 @@ mount_guess_content_type_sync(int argc, VALUE *argv, VALUE self)
|
|
224
226
|
if (content_types == NULL)
|
225
227
|
rbgio_raise_error(error);
|
226
228
|
|
227
|
-
return
|
229
|
+
return STRV2RVAL_FREE(content_types);
|
228
230
|
}
|
229
231
|
|
230
232
|
static VALUE
|
231
|
-
|
233
|
+
rg_shadowed_p(VALUE self)
|
232
234
|
{
|
233
235
|
return CBOOL2RVAL(g_mount_is_shadowed(_SELF(self)));
|
234
236
|
}
|
235
237
|
|
236
238
|
static VALUE
|
237
|
-
|
239
|
+
rg_shadow(VALUE self)
|
238
240
|
{
|
239
241
|
g_mount_shadow(_SELF(self));
|
240
242
|
|
@@ -242,7 +244,7 @@ mount_shadow(VALUE self)
|
|
242
244
|
}
|
243
245
|
|
244
246
|
static VALUE
|
245
|
-
|
247
|
+
rg_unshadow(VALUE self)
|
246
248
|
{
|
247
249
|
g_mount_unshadow(_SELF(self));
|
248
250
|
|
@@ -250,35 +252,35 @@ mount_unshadow(VALUE self)
|
|
250
252
|
}
|
251
253
|
|
252
254
|
void
|
253
|
-
Init_gmount(VALUE
|
255
|
+
Init_gmount(VALUE mGio)
|
254
256
|
{
|
255
|
-
VALUE
|
256
|
-
|
257
|
-
G_DEF_CLASS(G_TYPE_MOUNT_MOUNT_FLAGS, "MountFlags",
|
258
|
-
G_DEF_CONSTANTS(
|
259
|
-
|
260
|
-
G_DEF_CLASS(G_TYPE_MOUNT_UNMOUNT_FLAGS, "UnmountFlags",
|
261
|
-
G_DEF_CONSTANTS(
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
257
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(G_TYPE_MOUNT, "Mount", mGio);
|
258
|
+
|
259
|
+
G_DEF_CLASS(G_TYPE_MOUNT_MOUNT_FLAGS, "MountFlags", RG_TARGET_NAMESPACE);
|
260
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_MOUNT_MOUNT_FLAGS, "G_MOUNT_");
|
261
|
+
|
262
|
+
G_DEF_CLASS(G_TYPE_MOUNT_UNMOUNT_FLAGS, "UnmountFlags", RG_TARGET_NAMESPACE);
|
263
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_MOUNT_UNMOUNT_FLAGS, "G_MOUNT_");
|
264
|
+
|
265
|
+
RG_DEF_METHOD(name, 0);
|
266
|
+
RG_DEF_METHOD(uuid, 0);
|
267
|
+
RG_DEF_METHOD(icon, 0);
|
268
|
+
RG_DEF_METHOD(drive, 0);
|
269
|
+
RG_DEF_METHOD(root, 0);
|
270
|
+
RG_DEF_METHOD(volume, 0);
|
271
|
+
RG_DEF_METHOD(default_location, 0);
|
272
|
+
RG_DEF_METHOD_P(can_unmount, 0);
|
273
|
+
RG_DEF_METHOD(unmount_with_operation, -1);
|
274
|
+
RG_DEF_METHOD(unmount_with_operation_finish, 1);
|
275
|
+
RG_DEF_METHOD(remount, -1);
|
276
|
+
RG_DEF_METHOD(remount_finish, 1);
|
277
|
+
RG_DEF_METHOD_P(can_eject, 0);
|
278
|
+
RG_DEF_METHOD(eject_with_operation, -1);
|
279
|
+
RG_DEF_METHOD(eject_with_operation_finish, 1);
|
280
|
+
RG_DEF_METHOD(guess_content_type, -1);
|
281
|
+
RG_DEF_METHOD(guess_content_type_finish, 1);
|
282
|
+
RG_DEF_METHOD(guess_content_type_sync, -1);
|
283
|
+
RG_DEF_METHOD_P(shadowed, 0);
|
284
|
+
RG_DEF_METHOD(shadow, 0);
|
285
|
+
RG_DEF_METHOD(unshadow, 0);
|
284
286
|
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
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, or (at your option) any later version.
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cMountOperation
|
25
|
+
#define _SELF(value) RVAL2GMOUNTOPERATION(value)
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_initialize(VALUE self)
|
29
|
+
{
|
30
|
+
G_INITIALIZE(self, g_mount_operation_new());
|
31
|
+
|
32
|
+
return Qnil;
|
33
|
+
}
|
34
|
+
|
35
|
+
static VALUE
|
36
|
+
rg_reply(VALUE self, VALUE value)
|
37
|
+
{
|
38
|
+
g_mount_operation_reply(_SELF(self), RVAL2GMOUNTOPERATIONRESULT(value));
|
39
|
+
|
40
|
+
return self;
|
41
|
+
}
|
42
|
+
|
43
|
+
void
|
44
|
+
Init_gmountoperation(VALUE mGio)
|
45
|
+
{
|
46
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_MOUNT_OPERATION, "MountOperation", mGio);
|
47
|
+
|
48
|
+
G_DEF_CLASS(G_TYPE_MOUNT_OPERATION_RESULT, "Result", RG_TARGET_NAMESPACE);
|
49
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_MOUNT_OPERATION_RESULT, "G_MOUNT_OPERATION_");
|
50
|
+
|
51
|
+
RG_DEF_METHOD(initialize, 0);
|
52
|
+
RG_DEF_METHOD(reply, 1);
|
53
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
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, or (at your option) any later version.
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cNetworkAddress
|
25
|
+
#define _SELF(value) RVAL2GNETWORKADDRESS(value)
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_initialize(VALUE self, VALUE hostname, VALUE port)
|
29
|
+
{
|
30
|
+
G_INITIALIZE(self, g_network_address_new(RVAL2CSTR(hostname),
|
31
|
+
RVAL2GUINT16(port)));
|
32
|
+
|
33
|
+
return Qnil;
|
34
|
+
}
|
35
|
+
|
36
|
+
static VALUE
|
37
|
+
rg_s_parse(G_GNUC_UNUSED VALUE self, VALUE host_and_port, VALUE default_port)
|
38
|
+
{
|
39
|
+
GError *error = NULL;
|
40
|
+
GSocketConnectable *connectable;
|
41
|
+
|
42
|
+
connectable = g_network_address_parse(RVAL2CSTR(host_and_port),
|
43
|
+
RVAL2GUINT16(default_port),
|
44
|
+
&error);
|
45
|
+
if (connectable == NULL)
|
46
|
+
rbgio_raise_error(error);
|
47
|
+
|
48
|
+
return GOBJ2RVAL_UNREF(connectable);
|
49
|
+
}
|
50
|
+
|
51
|
+
void
|
52
|
+
Init_gnetworkaddress(VALUE mGio)
|
53
|
+
{
|
54
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_NETWORK_ADDRESS, "NetworkAddress", mGio);
|
55
|
+
|
56
|
+
RG_DEF_SMETHOD(parse, 2);
|
57
|
+
|
58
|
+
RG_DEF_METHOD(initialize, 2);
|
59
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
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, or (at your option) any later version.
|
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., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cNetworkService
|
25
|
+
#define _SELF(value) RVAL2GNETWORKSERVICE(value)
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_initialize(VALUE self, VALUE service, VALUE protocol, VALUE domain)
|
29
|
+
{
|
30
|
+
/* TODO: If these are infected, so should they be when returned. How
|
31
|
+
* do we deal with that? */
|
32
|
+
G_INITIALIZE(self, g_network_service_new(RVAL2CSTR(service),
|
33
|
+
RVAL2CSTR(protocol),
|
34
|
+
RVAL2CSTR(domain)));
|
35
|
+
|
36
|
+
return Qnil;
|
37
|
+
}
|
38
|
+
|
39
|
+
void
|
40
|
+
Init_gnetworkservice(VALUE mGio)
|
41
|
+
{
|
42
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_NETWORK_SERVICE, "NetworkService", mGio);
|
43
|
+
|
44
|
+
RG_DEF_METHOD(initialize, 3);
|
45
|
+
}
|