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.
Files changed (156) hide show
  1. data/ext/gio2/extconf.rb +4 -42
  2. data/ext/gio2/gio2.c +18 -117
  3. data/ext/gio2/gio2.h +20 -339
  4. data/ext/gio2/rbgio.c +132 -0
  5. data/ext/gio2/rbgio2.h +156 -0
  6. data/ext/gio2/rbgio2conversions.h +154 -0
  7. data/ext/gio2/rbgio2private.h +147 -0
  8. data/ext/gio2/{gappinfo.c → rbgioappinfo.c} +81 -82
  9. data/ext/gio2/rbgioapplaunchcontext.c +81 -0
  10. data/ext/gio2/{gasyncinitable.c → rbgioasyncinitable.c} +33 -30
  11. data/ext/gio2/rbgioasyncresult.c +41 -0
  12. data/ext/gio2/{gbufferedinputstream.c → rbgiobufferedinputstream.c} +37 -35
  13. data/ext/gio2/rbgiobufferedoutputstream.c +50 -0
  14. data/ext/gio2/rbgiocancellable.c +180 -0
  15. data/ext/gio2/rbgiocharsetconverter.c +57 -0
  16. data/ext/gio2/rbgiocontenttype.c +131 -0
  17. data/ext/gio2/{gconverter.c → rbgioconverter.c} +24 -28
  18. data/ext/gio2/rbgioconverterinputstream.c +43 -0
  19. data/ext/gio2/rbgioconverteroutputstream.c +43 -0
  20. data/ext/gio2/{gdatainputstream.c → rbgiodatainputstream.c} +49 -58
  21. data/ext/gio2/{gdataoutputstream.c → rbgiodataoutputstream.c} +39 -37
  22. data/ext/gio2/rbgiodesktopappinfo.c +87 -0
  23. data/ext/gio2/{gdrive.c → rbgiodrive.c} +75 -76
  24. data/ext/gio2/rbgioemblem.c +52 -0
  25. data/ext/gio2/rbgioemblemedicon.c +65 -0
  26. data/ext/gio2/{gfile.c → rbgiofile.c} +256 -266
  27. data/ext/gio2/rbgiofileattribute.c +114 -0
  28. data/ext/gio2/rbgiofileattributeinfo.c +86 -0
  29. data/ext/gio2/rbgiofileattributeinfolist.c +106 -0
  30. data/ext/gio2/rbgiofileattributematcher.c +93 -0
  31. data/ext/gio2/rbgiofiledescriptorbased.c +45 -0
  32. data/ext/gio2/{gfileenumerator.c → rbgiofileenumerator.c} +42 -40
  33. data/ext/gio2/rbgiofileicon.c +41 -0
  34. data/ext/gio2/{gfileinfo.c → rbgiofileinfo.c} +159 -163
  35. data/ext/gio2/{gfileinputstream.c → rbgiofileinputstream.c} +26 -25
  36. data/ext/gio2/{gfileiostream.c → rbgiofileiostream.c} +28 -26
  37. data/ext/gio2/rbgiofilemonitor.c +46 -0
  38. data/ext/gio2/rbgiofilenamecompleter.c +74 -0
  39. data/ext/gio2/{gfileoutputstream.c → rbgiofileoutputstream.c} +28 -26
  40. data/ext/gio2/rbgiofilterinputstream.c +28 -0
  41. data/ext/gio2/rbgiofilteroutputstream.c +28 -0
  42. data/ext/gio2/rbgioicon.c +69 -0
  43. data/ext/gio2/rbgioinetaddress.c +118 -0
  44. data/ext/gio2/rbgioinetsocketaddress.c +41 -0
  45. data/ext/gio2/{ginitable.c → rbgioinitable.c} +29 -25
  46. data/ext/gio2/{ginputstream.c → rbgioinputstream.c} +50 -48
  47. data/ext/gio2/rbgioio.c +73 -0
  48. data/ext/gio2/rbgioiomodule.c +45 -0
  49. data/ext/gio2/rbgioiomodules.c +47 -0
  50. data/ext/gio2/rbgioioscheduler.c +102 -0
  51. data/ext/gio2/rbgioioschedulerjob.c +121 -0
  52. data/ext/gio2/rbgioiostream.c +108 -0
  53. data/ext/gio2/{gloadableicon.c → rbgioloadableicon.c} +26 -24
  54. data/ext/gio2/rbgiomemoryinputstream.c +67 -0
  55. data/ext/gio2/rbgiomemoryoutputstream.c +44 -0
  56. data/ext/gio2/{gmount.c → rbgiomount.c} +70 -68
  57. data/ext/gio2/rbgiomountoperation.c +53 -0
  58. data/ext/gio2/rbgionetworkaddress.c +59 -0
  59. data/ext/gio2/rbgionetworkservice.c +45 -0
  60. data/ext/gio2/{goutputstream.c → rbgiooutputstream.c} +61 -62
  61. data/ext/gio2/{gresolver.c → rbgioresolver.c} +50 -48
  62. data/ext/gio2/rbgioseekable.c +91 -0
  63. data/ext/gio2/rbgiosimpleasyncresult.c +155 -0
  64. data/ext/gio2/{gsocket.c → rbgiosocket.c} +74 -76
  65. data/ext/gio2/rbgiosocketaddress.c +34 -0
  66. data/ext/gio2/rbgiosocketaddressenumerator.c +83 -0
  67. data/ext/gio2/{gsocketclient.c → rbgiosocketclient.c} +41 -39
  68. data/ext/gio2/rbgiosocketconnectable.c +41 -0
  69. data/ext/gio2/rbgiosocketconnection.c +66 -0
  70. data/ext/gio2/rbgiosocketconnectionfactory.c +39 -0
  71. data/ext/gio2/rbgiosocketcontrolmessage.c +82 -0
  72. data/ext/gio2/{gsocketlistener.c → rbgiosocketlistener.c} +49 -47
  73. data/ext/gio2/rbgiosocketservice.c +66 -0
  74. data/ext/gio2/rbgiosrvtarget.c +76 -0
  75. data/ext/gio2/rbgiotcpconnection.c +28 -0
  76. data/ext/gio2/rbgiothemedicon.c +83 -0
  77. data/ext/gio2/rbgiothreadedsocketservice.c +43 -0
  78. data/ext/gio2/rbgiounixconnection.c +71 -0
  79. data/ext/gio2/rbgiounixfdlist.c +115 -0
  80. data/ext/gio2/rbgiounixfdmessage.c +74 -0
  81. data/ext/gio2/rbgiounixinputstream.c +51 -0
  82. data/ext/gio2/rbgiounixmount.c +164 -0
  83. data/ext/gio2/rbgiounixmountmonitor.c +66 -0
  84. data/ext/gio2/rbgiounixmountpoint.c +136 -0
  85. data/ext/gio2/rbgiounixmountpoints.c +58 -0
  86. data/ext/gio2/rbgiounixmounts.c +58 -0
  87. data/ext/gio2/rbgiounixoutputstream.c +51 -0
  88. data/ext/gio2/rbgiounixsocketaddress.c +69 -0
  89. data/ext/gio2/rbgiovfs.c +84 -0
  90. data/ext/gio2/rbgiovolume.c +193 -0
  91. data/ext/gio2/rbgiovolumemonitor.c +77 -0
  92. data/ext/gio2/rbgiozlibcompressor.c +52 -0
  93. data/ext/gio2/rbgiozlibdecompressor.c +45 -0
  94. data/ext/gio2/util.c +57 -60
  95. data/lib/1.8/gio2.so +0 -0
  96. data/lib/1.9/gio2.so +0 -0
  97. data/lib/gio2/deprecated.rb +102 -0
  98. data/lib/gio2.rb +14 -12
  99. metadata +100 -88
  100. data/ChangeLog +0 -129
  101. data/ext/gio2/gapplaunchcontext.c +0 -79
  102. data/ext/gio2/gasyncresult.c +0 -39
  103. data/ext/gio2/gbufferedoutputstream.c +0 -48
  104. data/ext/gio2/gcancellable.c +0 -177
  105. data/ext/gio2/gcharsetconverter.c +0 -55
  106. data/ext/gio2/gcontenttype.c +0 -128
  107. data/ext/gio2/gconverterinputstream.c +0 -41
  108. data/ext/gio2/gconverteroutputstream.c +0 -41
  109. data/ext/gio2/gdesktopappinfo.c +0 -88
  110. data/ext/gio2/gemblem.c +0 -52
  111. data/ext/gio2/gemblemedicon.c +0 -63
  112. data/ext/gio2/gfileattribute.c +0 -111
  113. data/ext/gio2/gfileattributeinfo.c +0 -89
  114. data/ext/gio2/gfileattributeinfolist.c +0 -109
  115. data/ext/gio2/gfileattributematcher.c +0 -90
  116. data/ext/gio2/gfiledescriptorbased.c +0 -42
  117. data/ext/gio2/gfileicon.c +0 -39
  118. data/ext/gio2/gfilemonitor.c +0 -44
  119. data/ext/gio2/gfilenamecompleter.c +0 -72
  120. data/ext/gio2/gfilterinputstream.c +0 -27
  121. data/ext/gio2/gfilteroutputstream.c +0 -27
  122. data/ext/gio2/gicon.c +0 -67
  123. data/ext/gio2/ginetaddress.c +0 -116
  124. data/ext/gio2/ginetsocketaddress.c +0 -38
  125. data/ext/gio2/gioerror.c +0 -70
  126. data/ext/gio2/giomodule.c +0 -63
  127. data/ext/gio2/gioscheduler.c +0 -193
  128. data/ext/gio2/giostream.c +0 -106
  129. data/ext/gio2/gmemoryinputstream.c +0 -65
  130. data/ext/gio2/gmemoryoutputstream.c +0 -41
  131. data/ext/gio2/gmountoperation.c +0 -66
  132. data/ext/gio2/gnetworkaddress.c +0 -57
  133. data/ext/gio2/gnetworkservice.c +0 -43
  134. data/ext/gio2/gseekable.c +0 -89
  135. data/ext/gio2/gsimpleasyncresult.c +0 -153
  136. data/ext/gio2/gsocketaddress.c +0 -33
  137. data/ext/gio2/gsocketconnectable.c +0 -97
  138. data/ext/gio2/gsocketconnection.c +0 -75
  139. data/ext/gio2/gsocketcontrolmessage.c +0 -80
  140. data/ext/gio2/gsocketservice.c +0 -64
  141. data/ext/gio2/gsrvtarget.c +0 -77
  142. data/ext/gio2/gtcpconnection.c +0 -27
  143. data/ext/gio2/gthemedicon.c +0 -81
  144. data/ext/gio2/gthreadedsocketservice.c +0 -40
  145. data/ext/gio2/gunixconnection.c +0 -69
  146. data/ext/gio2/gunixfdlist.c +0 -112
  147. data/ext/gio2/gunixfdmessage.c +0 -72
  148. data/ext/gio2/gunixinputstream.c +0 -49
  149. data/ext/gio2/gunixmounts.c +0 -343
  150. data/ext/gio2/gunixoutputstream.c +0 -49
  151. data/ext/gio2/gunixsocketaddress.c +0 -67
  152. data/ext/gio2/gvfs.c +0 -82
  153. data/ext/gio2/gvolume.c +0 -191
  154. data/ext/gio2/gvolumemonitor.c +0 -75
  155. data/ext/gio2/gzlibcompressor.c +0 -50
  156. 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
- * Ruby/GIO: a Ruby binding of gio-2.0.x.
4
- * Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
5
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.
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
- * 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.
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
- * 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
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 "gio2.h"
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
- mount_get_name(VALUE self)
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
- mount_get_uuid(VALUE self)
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
- mount_get_icon(VALUE self)
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
- mount_get_drive(VALUE self)
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
- mount_get_root(VALUE self)
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
- mount_get_volume(VALUE self)
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
- mount_get_default_location(VALUE self)
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
- mount_can_unmount(VALUE self)
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
- mount_unmount_with_operation(int argc, VALUE *argv, VALUE self)
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
- mount_unmount_with_operation_finish(VALUE self, VALUE result)
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
- mount_remount(int argc, VALUE *argv, VALUE self)
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
- mount_remount_finish(VALUE self, VALUE result)
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
- mount_can_eject(VALUE self)
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
- mount_eject_with_operation(int argc, VALUE *argv, VALUE self)
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
- mount_eject_with_operation_finish(VALUE self, VALUE result)
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
- mount_guess_content_type(int argc, VALUE *argv, VALUE self)
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
- mount_guess_content_type_finish(VALUE self, VALUE result)
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 STRVECTOR2ARY_FREE(content_types);
211
+ return STRV2RVAL_FREE(content_types);
210
212
  }
211
213
 
212
214
  static VALUE
213
- mount_guess_content_type_sync(int argc, VALUE *argv, VALUE self)
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 STRVECTOR2ARY_FREE(content_types);
229
+ return STRV2RVAL_FREE(content_types);
228
230
  }
229
231
 
230
232
  static VALUE
231
- mount_is_shadowed(VALUE self)
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
- mount_shadow(VALUE self)
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
- mount_unshadow(VALUE self)
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 glib)
255
+ Init_gmount(VALUE mGio)
254
256
  {
255
- VALUE mount = G_DEF_INTERFACE(G_TYPE_MOUNT, "Mount", glib);
256
-
257
- G_DEF_CLASS(G_TYPE_MOUNT_MOUNT_FLAGS, "MountFlags", mount);
258
- G_DEF_CONSTANTS(mount, G_TYPE_MOUNT_MOUNT_FLAGS, "G_MOUNT_");
259
-
260
- G_DEF_CLASS(G_TYPE_MOUNT_UNMOUNT_FLAGS, "UnmountFlags", mount);
261
- G_DEF_CONSTANTS(mount, G_TYPE_MOUNT_UNMOUNT_FLAGS, "G_MOUNT_");
262
-
263
- rb_define_method(mount, "name", mount_get_name, 0);
264
- rb_define_method(mount, "uuid", mount_get_uuid, 0);
265
- rb_define_method(mount, "icon", mount_get_icon, 0);
266
- rb_define_method(mount, "drive", mount_get_drive, 0);
267
- rb_define_method(mount, "root", mount_get_root, 0);
268
- rb_define_method(mount, "volume", mount_get_volume, 0);
269
- rb_define_method(mount, "default_location", mount_get_default_location, 0);
270
- rb_define_method(mount, "can_unmount?", mount_can_unmount, 0);
271
- rb_define_method(mount, "unmount_with_operation", mount_unmount_with_operation, -1);
272
- rb_define_method(mount, "unmount_with_operation_finish", mount_unmount_with_operation_finish, 1);
273
- rb_define_method(mount, "remount", mount_remount, -1);
274
- rb_define_method(mount, "remount_finish", mount_remount_finish, 1);
275
- rb_define_method(mount, "can_eject?", mount_can_eject, 0);
276
- rb_define_method(mount, "eject_with_operation", mount_eject_with_operation, -1);
277
- rb_define_method(mount, "eject_with_operation_finish", mount_eject_with_operation_finish, 1);
278
- rb_define_method(mount, "guess_content_type", mount_guess_content_type, -1);
279
- rb_define_method(mount, "guess_content_type_finish", mount_guess_content_type_finish, 1);
280
- rb_define_method(mount, "guess_content_type_sync", mount_guess_content_type_sync, -1);
281
- rb_define_method(mount, "shadowed?", mount_is_shadowed, 0);
282
- rb_define_method(mount, "shadow", mount_shadow, 0);
283
- rb_define_method(mount, "unshadow", mount_unshadow, 0);
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
+ }