| 1 |
/* |
|---|
| 2 |
* This file is part of gtkD. |
|---|
| 3 |
* |
|---|
| 4 |
* gtkD is free software; you can redistribute it and/or modify |
|---|
| 5 |
* it under the terms of the GNU Lesser General Public License |
|---|
| 6 |
* as published by the Free Software Foundation; either version 3 |
|---|
| 7 |
* of the License, or (at your option) any later version, with |
|---|
| 8 |
* some exceptions, please read the COPYING file. |
|---|
| 9 |
* |
|---|
| 10 |
* gtkD is distributed in the hope that it will be useful, |
|---|
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 |
* GNU Lesser General Public License for more details. |
|---|
| 14 |
* |
|---|
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
|---|
| 16 |
* along with gtkD; if not, write to the Free Software |
|---|
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA |
|---|
| 18 |
*/ |
|---|
| 19 |
|
|---|
| 20 |
// generated automatically - do not change |
|---|
| 21 |
// find conversion definition on APILookup.txt |
|---|
| 22 |
// implement new conversion functionalities on the wrap.utils pakage |
|---|
| 23 |
|
|---|
| 24 |
/* |
|---|
| 25 |
* Conversion parameters: |
|---|
| 26 |
* inFile = GMount.html |
|---|
| 27 |
* outPack = gio |
|---|
| 28 |
* outFile = MountIF |
|---|
| 29 |
* strct = GMount |
|---|
| 30 |
* realStrct= |
|---|
| 31 |
* ctorStrct= |
|---|
| 32 |
* clss = MountT |
|---|
| 33 |
* interf = MountIF |
|---|
| 34 |
* class Code: No |
|---|
| 35 |
* interface Code: No |
|---|
| 36 |
* template for: |
|---|
| 37 |
* extend = |
|---|
| 38 |
* implements: |
|---|
| 39 |
* prefixes: |
|---|
| 40 |
* - g_mount_ |
|---|
| 41 |
* omit structs: |
|---|
| 42 |
* omit prefixes: |
|---|
| 43 |
* omit code: |
|---|
| 44 |
* omit signals: |
|---|
| 45 |
* imports: |
|---|
| 46 |
* - glib.Str |
|---|
| 47 |
* - glib.ErrorG |
|---|
| 48 |
* - glib.GException |
|---|
| 49 |
* - gobject.Signals |
|---|
| 50 |
* - gio.AsyncResultIF |
|---|
| 51 |
* - gio.Cancellable |
|---|
| 52 |
* - gio.Drive |
|---|
| 53 |
* - gio.DriveIF |
|---|
| 54 |
* - gio.File |
|---|
| 55 |
* - gio.Icon |
|---|
| 56 |
* - gio.IconIF |
|---|
| 57 |
* - gio.MountOperation |
|---|
| 58 |
* - gio.Volume |
|---|
| 59 |
* - gio.VolumeIF |
|---|
| 60 |
* structWrap: |
|---|
| 61 |
* - GAsyncResult* -> AsyncResultIF |
|---|
| 62 |
* - GCancellable* -> Cancellable |
|---|
| 63 |
* - GDrive* -> DriveIF |
|---|
| 64 |
* - GFile* -> File |
|---|
| 65 |
* - GIcon* -> IconIF |
|---|
| 66 |
* - GMountOperation* -> MountOperation |
|---|
| 67 |
* - GVolume* -> VolumeIF |
|---|
| 68 |
* module aliases: |
|---|
| 69 |
* local aliases: |
|---|
| 70 |
* overrides: |
|---|
| 71 |
*/ |
|---|
| 72 |
|
|---|
| 73 |
module gio.MountIF; |
|---|
| 74 |
|
|---|
| 75 |
public import gtkc.giotypes; |
|---|
| 76 |
|
|---|
| 77 |
private import gtkc.gio; |
|---|
| 78 |
private import glib.ConstructionException; |
|---|
| 79 |
|
|---|
| 80 |
private import gobject.Signals; |
|---|
| 81 |
public import gtkc.gdktypes; |
|---|
| 82 |
|
|---|
| 83 |
private import glib.Str; |
|---|
| 84 |
private import glib.ErrorG; |
|---|
| 85 |
private import glib.GException; |
|---|
| 86 |
private import gobject.Signals; |
|---|
| 87 |
private import gio.AsyncResultIF; |
|---|
| 88 |
private import gio.Cancellable; |
|---|
| 89 |
private import gio.Drive; |
|---|
| 90 |
private import gio.DriveIF; |
|---|
| 91 |
private import gio.File; |
|---|
| 92 |
private import gio.Icon; |
|---|
| 93 |
private import gio.IconIF; |
|---|
| 94 |
private import gio.MountOperation; |
|---|
| 95 |
private import gio.Volume; |
|---|
| 96 |
private import gio.VolumeIF; |
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
/** |
|---|
| 102 |
* Description |
|---|
| 103 |
* The GMount interface represents user-visible mounts. Note, when |
|---|
| 104 |
* porting from GnomeVFS, GMount is the moral equivalent of GnomeVFSVolume. |
|---|
| 105 |
* GMount is a "mounted" filesystem that you can access. Mounted is in |
|---|
| 106 |
* quotes because it's not the same as a unix mount, it might be a gvfs |
|---|
| 107 |
* mount, but you can still access the files on it if you use GIO. Might or |
|---|
| 108 |
* might not be related to a volume object. |
|---|
| 109 |
* Unmounting a GMount instance is an asynchronous operation. For |
|---|
| 110 |
* more information about asynchronous operations, see GAsyncReady |
|---|
| 111 |
* and GSimpleAsyncReady. To unmount a GMount instance, first call |
|---|
| 112 |
* g_mount_unmount_with_operation() with (at least) the GMount instance and a |
|---|
| 113 |
* GAsyncReadyCallback. The callback will be fired when the |
|---|
| 114 |
* operation has resolved (either with success or failure), and a |
|---|
| 115 |
* GAsyncReady structure will be passed to the callback. That |
|---|
| 116 |
* callback should then call g_mount_unmount_with_operation_finish() with the GMount |
|---|
| 117 |
* and the GAsyncReady data to see if the operation was completed |
|---|
| 118 |
* successfully. If an error is present when g_mount_unmount_with_operation_finish() |
|---|
| 119 |
* is called, then it will be filled with any error information. |
|---|
| 120 |
*/ |
|---|
| 121 |
public interface MountIF |
|---|
| 122 |
{ |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
public GMount* getMountTStruct(); |
|---|
| 126 |
|
|---|
| 127 |
/** the main Gtk struct as a void* */ |
|---|
| 128 |
protected void* getStruct(); |
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
/** |
|---|
| 132 |
*/ |
|---|
| 133 |
|
|---|
| 134 |
void delegate(MountIF)[] onChangedListeners(); |
|---|
| 135 |
/** |
|---|
| 136 |
* Emitted when the mount has been changed. |
|---|
| 137 |
*/ |
|---|
| 138 |
void addOnChanged(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); |
|---|
| 139 |
void delegate(MountIF)[] onPreUnmountListeners(); |
|---|
| 140 |
/** |
|---|
| 141 |
* This signal is emitted when the GMount is about to be |
|---|
| 142 |
* unmounted. |
|---|
| 143 |
* Since 2.22 |
|---|
| 144 |
*/ |
|---|
| 145 |
void addOnPreUnmount(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); |
|---|
| 146 |
void delegate(MountIF)[] onUnmountedListeners(); |
|---|
| 147 |
/** |
|---|
| 148 |
* This signal is emitted when the GMount have been |
|---|
| 149 |
* unmounted. If the recipient is holding references to the |
|---|
| 150 |
* object they should release them so the object can be |
|---|
| 151 |
* finalized. |
|---|
| 152 |
* See Also |
|---|
| 153 |
* GVolume, GUnixMount |
|---|
| 154 |
*/ |
|---|
| 155 |
void addOnUnmounted(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); |
|---|
| 156 |
|
|---|
| 157 |
/** |
|---|
| 158 |
* Gets the name of mount. |
|---|
| 159 |
* Returns: the name for the given mount. The returned string should be freed with g_free() when no longer needed. |
|---|
| 160 |
*/ |
|---|
| 161 |
public string getName(); |
|---|
| 162 |
|
|---|
| 163 |
/** |
|---|
| 164 |
* Gets the UUID for the mount. The reference is typically based on |
|---|
| 165 |
* the file system UUID for the mount in question and should be |
|---|
| 166 |
* considered an opaque string. Returns NULL if there is no UUID |
|---|
| 167 |
* available. |
|---|
| 168 |
* Returns: the UUID for mount or NULL if no UUID can be computed. The returned string should be freed with g_free() when no longer needed. |
|---|
| 169 |
*/ |
|---|
| 170 |
public string getUuid(); |
|---|
| 171 |
|
|---|
| 172 |
/** |
|---|
| 173 |
* Gets the icon for mount. |
|---|
| 174 |
* Returns: a GIcon. The returned object should be unreffed with g_object_unref() when no longer needed. [transfer full] |
|---|
| 175 |
*/ |
|---|
| 176 |
public IconIF getIcon(); |
|---|
| 177 |
|
|---|
| 178 |
/** |
|---|
| 179 |
* Gets the drive for the mount. |
|---|
| 180 |
* This is a convenience method for getting the GVolume and then |
|---|
| 181 |
* using that object to get the GDrive. |
|---|
| 182 |
* Returns: a GDrive or NULL if mount is not associated with a volume or a drive. The returned object should be unreffed with g_object_unref() when no longer needed. [transfer full] |
|---|
| 183 |
*/ |
|---|
| 184 |
public DriveIF getDrive(); |
|---|
| 185 |
|
|---|
| 186 |
/** |
|---|
| 187 |
* Gets the root directory on mount. |
|---|
| 188 |
* Returns: a GFile. The returned object should be unreffed with g_object_unref() when no longer needed. [transfer full] |
|---|
| 189 |
*/ |
|---|
| 190 |
public File getRoot(); |
|---|
| 191 |
|
|---|
| 192 |
/** |
|---|
| 193 |
* Gets the volume for the mount. |
|---|
| 194 |
* Returns: a GVolume or NULL if mount is not associated with a volume. The returned object should be unreffed with g_object_unref() when no longer needed. [transfer full] |
|---|
| 195 |
*/ |
|---|
| 196 |
public VolumeIF getVolume(); |
|---|
| 197 |
|
|---|
| 198 |
/** |
|---|
| 199 |
* Gets the default location of mount. The default location of the given |
|---|
| 200 |
* mount is a path that reflects the main entry point for the user (e.g. |
|---|
| 201 |
* the home directory, or the root of the volume). |
|---|
| 202 |
* Returns: a GFile. The returned object should be unreffed with g_object_unref() when no longer needed. [transfer full] |
|---|
| 203 |
*/ |
|---|
| 204 |
public File getDefaultLocation(); |
|---|
| 205 |
|
|---|
| 206 |
/** |
|---|
| 207 |
* Checks if mount can be mounted. |
|---|
| 208 |
* Params: |
|---|
| 209 |
* mount = a GMount. |
|---|
| 210 |
* Returns: TRUE if the mount can be unmounted. |
|---|
| 211 |
*/ |
|---|
| 212 |
public int canUnmount(); |
|---|
| 213 |
|
|---|
| 214 |
/** |
|---|
| 215 |
* Warning |
|---|
| 216 |
* g_mount_unmount has been deprecated since version 2.22 and should not be used in newly-written code. Use g_mount_unmount_with_operation() instead. |
|---|
| 217 |
* Unmounts a mount. This is an asynchronous operation, and is |
|---|
| 218 |
* finished by calling g_mount_unmount_finish() with the mount |
|---|
| 219 |
* and GAsyncResult data returned in the callback. |
|---|
| 220 |
* Params: |
|---|
| 221 |
* mount = a GMount. |
|---|
| 222 |
* flags = flags affecting the operation |
|---|
| 223 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 224 |
* callback = a GAsyncReadyCallback, or NULL. [allow-none] |
|---|
| 225 |
* userData = user data passed to callback. |
|---|
| 226 |
*/ |
|---|
| 227 |
public void unmount(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 228 |
|
|---|
| 229 |
/** |
|---|
| 230 |
* Warning |
|---|
| 231 |
* g_mount_unmount_finish has been deprecated since version 2.22 and should not be used in newly-written code. Use g_mount_unmount_with_operation_finish() instead. |
|---|
| 232 |
* Finishes unmounting a mount. If any errors occurred during the operation, |
|---|
| 233 |
* error will be set to contain the errors and FALSE will be returned. |
|---|
| 234 |
* Params: |
|---|
| 235 |
* mount = a GMount. |
|---|
| 236 |
* result = a GAsyncResult. |
|---|
| 237 |
* Returns: TRUE if the mount was successfully unmounted. FALSE otherwise. |
|---|
| 238 |
* Throws: GException on failure. |
|---|
| 239 |
*/ |
|---|
| 240 |
public int unmountFinish(AsyncResultIF result); |
|---|
| 241 |
|
|---|
| 242 |
/** |
|---|
| 243 |
* Unmounts a mount. This is an asynchronous operation, and is |
|---|
| 244 |
* finished by calling g_mount_unmount_with_operation_finish() with the mount |
|---|
| 245 |
* and GAsyncResult data returned in the callback. |
|---|
| 246 |
* Since 2.22 |
|---|
| 247 |
* Params: |
|---|
| 248 |
* mount = a GMount. |
|---|
| 249 |
* flags = flags affecting the operation |
|---|
| 250 |
* mountOperation = a GMountOperation or NULL to avoid |
|---|
| 251 |
* user interaction. [allow-none] |
|---|
| 252 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 253 |
* callback = a GAsyncReadyCallback, or NULL. [allow-none] |
|---|
| 254 |
* userData = user data passed to callback. |
|---|
| 255 |
*/ |
|---|
| 256 |
public void unmountWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 257 |
|
|---|
| 258 |
/** |
|---|
| 259 |
* Finishes unmounting a mount. If any errors occurred during the operation, |
|---|
| 260 |
* error will be set to contain the errors and FALSE will be returned. |
|---|
| 261 |
* Since 2.22 |
|---|
| 262 |
* Params: |
|---|
| 263 |
* mount = a GMount. |
|---|
| 264 |
* result = a GAsyncResult. |
|---|
| 265 |
* Returns: TRUE if the mount was successfully unmounted. FALSE otherwise. |
|---|
| 266 |
* Throws: GException on failure. |
|---|
| 267 |
*/ |
|---|
| 268 |
public int unmountWithOperationFinish(AsyncResultIF result); |
|---|
| 269 |
|
|---|
| 270 |
/** |
|---|
| 271 |
* Remounts a mount. This is an asynchronous operation, and is |
|---|
| 272 |
* finished by calling g_mount_remount_finish() with the mount |
|---|
| 273 |
* and GAsyncResults data returned in the callback. |
|---|
| 274 |
* Remounting is useful when some setting affecting the operation |
|---|
| 275 |
* of the volume has been changed, as these may need a remount to |
|---|
| 276 |
* take affect. While this is semantically equivalent with unmounting |
|---|
| 277 |
* and then remounting not all backends might need to actually be |
|---|
| 278 |
* unmounted. |
|---|
| 279 |
* Params: |
|---|
| 280 |
* mount = a GMount. |
|---|
| 281 |
* flags = flags affecting the operation |
|---|
| 282 |
* mountOperation = a GMountOperation or NULL to avoid |
|---|
| 283 |
* user interaction. [allow-none] |
|---|
| 284 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 285 |
* callback = a GAsyncReadyCallback, or NULL. [allow-none] |
|---|
| 286 |
* userData = user data passed to callback. |
|---|
| 287 |
*/ |
|---|
| 288 |
public void remount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 289 |
|
|---|
| 290 |
/** |
|---|
| 291 |
* Finishes remounting a mount. If any errors occurred during the operation, |
|---|
| 292 |
* error will be set to contain the errors and FALSE will be returned. |
|---|
| 293 |
* Params: |
|---|
| 294 |
* mount = a GMount. |
|---|
| 295 |
* result = a GAsyncResult. |
|---|
| 296 |
* Returns: TRUE if the mount was successfully remounted. FALSE otherwise. |
|---|
| 297 |
* Throws: GException on failure. |
|---|
| 298 |
*/ |
|---|
| 299 |
public int remountFinish(AsyncResultIF result); |
|---|
| 300 |
|
|---|
| 301 |
/** |
|---|
| 302 |
* Checks if mount can be eject. |
|---|
| 303 |
* Returns: TRUE if the mount can be ejected. |
|---|
| 304 |
*/ |
|---|
| 305 |
public int canEject(); |
|---|
| 306 |
|
|---|
| 307 |
/** |
|---|
| 308 |
* Warning |
|---|
| 309 |
* g_mount_eject has been deprecated since version 2.22 and should not be used in newly-written code. Use g_mount_eject_with_operation() instead. |
|---|
| 310 |
* Ejects a mount. This is an asynchronous operation, and is |
|---|
| 311 |
* finished by calling g_mount_eject_finish() with the mount |
|---|
| 312 |
* and GAsyncResult data returned in the callback. |
|---|
| 313 |
* Params: |
|---|
| 314 |
* mount = a GMount. |
|---|
| 315 |
* flags = flags affecting the unmount if required for eject |
|---|
| 316 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 317 |
* callback = a GAsyncReadyCallback, or NULL. [allow-none] |
|---|
| 318 |
* userData = user data passed to callback. |
|---|
| 319 |
*/ |
|---|
| 320 |
public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 321 |
|
|---|
| 322 |
/** |
|---|
| 323 |
* Warning |
|---|
| 324 |
* g_mount_eject_finish has been deprecated since version 2.22 and should not be used in newly-written code. Use g_mount_eject_with_operation_finish() instead. |
|---|
| 325 |
* Finishes ejecting a mount. If any errors occurred during the operation, |
|---|
| 326 |
* error will be set to contain the errors and FALSE will be returned. |
|---|
| 327 |
* Params: |
|---|
| 328 |
* result = a GAsyncResult. |
|---|
| 329 |
* Returns: TRUE if the mount was successfully ejected. FALSE otherwise. |
|---|
| 330 |
* Throws: GException on failure. |
|---|
| 331 |
*/ |
|---|
| 332 |
public int ejectFinish(AsyncResultIF result); |
|---|
| 333 |
|
|---|
| 334 |
/** |
|---|
| 335 |
* Ejects a mount. This is an asynchronous operation, and is |
|---|
| 336 |
* finished by calling g_mount_eject_with_operation_finish() with the mount |
|---|
| 337 |
* and GAsyncResult data returned in the callback. |
|---|
| 338 |
* Since 2.22 |
|---|
| 339 |
* Params: |
|---|
| 340 |
* mount = a GMount. |
|---|
| 341 |
* flags = flags affecting the unmount if required for eject |
|---|
| 342 |
* mountOperation = a GMountOperation or NULL to avoid |
|---|
| 343 |
* user interaction. [allow-none] |
|---|
| 344 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 345 |
* callback = a GAsyncReadyCallback, or NULL. [allow-none] |
|---|
| 346 |
* userData = user data passed to callback. |
|---|
| 347 |
*/ |
|---|
| 348 |
public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 349 |
|
|---|
| 350 |
/** |
|---|
| 351 |
* Finishes ejecting a mount. If any errors occurred during the operation, |
|---|
| 352 |
* error will be set to contain the errors and FALSE will be returned. |
|---|
| 353 |
* Since 2.22 |
|---|
| 354 |
* Params: |
|---|
| 355 |
* result = a GAsyncResult. |
|---|
| 356 |
* Returns: TRUE if the mount was successfully ejected. FALSE otherwise. |
|---|
| 357 |
* Throws: GException on failure. |
|---|
| 358 |
*/ |
|---|
| 359 |
public int ejectWithOperationFinish(AsyncResultIF result); |
|---|
| 360 |
|
|---|
| 361 |
/** |
|---|
| 362 |
* Tries to guess the type of content stored on mount. Returns one or |
|---|
| 363 |
* more textual identifiers of well-known content types (typically |
|---|
| 364 |
* prefixed with "x-content/"), e.g. x-content/image-dcf for camera |
|---|
| 365 |
* memory cards. See the shared-mime-info |
|---|
| 366 |
* specification for more on x-content types. |
|---|
| 367 |
* This is an asynchronous operation (see |
|---|
| 368 |
* g_mount_guess_content_type_sync() for the synchronous version), and |
|---|
| 369 |
* is finished by calling g_mount_guess_content_type_finish() with the |
|---|
| 370 |
* mount and GAsyncResult data returned in the callback. |
|---|
| 371 |
* Since 2.18 |
|---|
| 372 |
* Params: |
|---|
| 373 |
* forceRescan = Whether to force a rescan of the content. |
|---|
| 374 |
* Otherwise a cached result will be used if available |
|---|
| 375 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 376 |
* callback = a GAsyncReadyCallback |
|---|
| 377 |
* userData = user data passed to callback |
|---|
| 378 |
*/ |
|---|
| 379 |
public void guessContentType(int forceRescan, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); |
|---|
| 380 |
|
|---|
| 381 |
/** |
|---|
| 382 |
* Finishes guessing content types of mount. If any errors occured |
|---|
| 383 |
* during the operation, error will be set to contain the errors and |
|---|
| 384 |
* FALSE will be returned. In particular, you may get an |
|---|
| 385 |
* G_IO_ERROR_NOT_SUPPORTED if the mount does not support content |
|---|
| 386 |
* guessing. |
|---|
| 387 |
* Since 2.18 |
|---|
| 388 |
* Params: |
|---|
| 389 |
* result = a GAsyncResult |
|---|
| 390 |
* Returns: a NULL-terminated array of content types or NULL on error. Caller should free this array with g_strfreev() when done with it. [transfer full][element-type utf8] |
|---|
| 391 |
* Throws: GException on failure. |
|---|
| 392 |
*/ |
|---|
| 393 |
public string[] guessContentTypeFinish(AsyncResultIF result); |
|---|
| 394 |
|
|---|
| 395 |
/** |
|---|
| 396 |
* Tries to guess the type of content stored on mount. Returns one or |
|---|
| 397 |
* more textual identifiers of well-known content types (typically |
|---|
| 398 |
* prefixed with "x-content/"), e.g. x-content/image-dcf for camera |
|---|
| 399 |
* memory cards. See the shared-mime-info |
|---|
| 400 |
* specification for more on x-content types. |
|---|
| 401 |
* This is an synchronous operation and as such may block doing IO; |
|---|
| 402 |
* see g_mount_guess_content_type() for the asynchronous version. |
|---|
| 403 |
* Since 2.18 |
|---|
| 404 |
* Params: |
|---|
| 405 |
* forceRescan = Whether to force a rescan of the content. |
|---|
| 406 |
* Otherwise a cached result will be used if available |
|---|
| 407 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 408 |
* Returns: a NULL-terminated array of content types or NULL on error. Caller should free this array with g_strfreev() when done with it. [transfer full][element-type utf8] |
|---|
| 409 |
* Throws: GException on failure. |
|---|
| 410 |
*/ |
|---|
| 411 |
public string[] guessContentTypeSync(int forceRescan, Cancellable cancellable); |
|---|
| 412 |
|
|---|
| 413 |
/** |
|---|
| 414 |
* Determines if mount is shadowed. Applications or libraries should |
|---|
| 415 |
* avoid displaying mount in the user interface if it is shadowed. |
|---|
| 416 |
* A mount is said to be shadowed if there exists one or more user |
|---|
| 417 |
* visible objects (currently GMount objects) with a root that is |
|---|
| 418 |
* inside the root of mount. |
|---|
| 419 |
* One application of shadow mounts is when exposing a single file |
|---|
| 420 |
* system that is used to address several logical volumes. In this |
|---|
| 421 |
* situation, a GVolumeMonitor implementation would create two |
|---|
| 422 |
* GVolume objects (for example, one for the camera functionality of |
|---|
| 423 |
* the device and one for a SD card reader on the device) with |
|---|
| 424 |
* activation URIs gphoto2://[usb:001,002]/store1/ |
|---|
| 425 |
* and gphoto2://[usb:001,002]/store2/. When the |
|---|
| 426 |
* underlying mount (with root |
|---|
| 427 |
* gphoto2://[usb:001,002]/) is mounted, said |
|---|
| 428 |
* GVolumeMonitor implementation would create two GMount objects |
|---|
| 429 |
* (each with their root matching the corresponding volume activation |
|---|
| 430 |
* root) that would shadow the original mount. |
|---|
| 431 |
* The proxy monitor in GVfs 2.26 and later, automatically creates and |
|---|
| 432 |
* manage shadow mounts (and shadows the underlying mount) if the |
|---|
| 433 |
* activation root on a GVolume is set. |
|---|
| 434 |
* Since 2.20 |
|---|
| 435 |
* Returns: TRUE if mount is shadowed. |
|---|
| 436 |
*/ |
|---|
| 437 |
public int isShadowed(); |
|---|
| 438 |
|
|---|
| 439 |
/** |
|---|
| 440 |
* Increments the shadow count on mount. Usually used by |
|---|
| 441 |
* GVolumeMonitor implementations when creating a shadow mount for |
|---|
| 442 |
* mount, see g_mount_is_shadowed() for more information. The caller |
|---|
| 443 |
* will need to emit the "changed" signal on mount manually. |
|---|
| 444 |
* Since 2.20 |
|---|
| 445 |
*/ |
|---|
| 446 |
public void shadow(); |
|---|
| 447 |
|
|---|
| 448 |
/** |
|---|
| 449 |
* Decrements the shadow count on mount. Usually used by |
|---|
| 450 |
* GVolumeMonitor implementations when destroying a shadow mount for |
|---|
| 451 |
* mount, see g_mount_is_shadowed() for more information. The caller |
|---|
| 452 |
* will need to emit the "changed" signal on mount manually. |
|---|
| 453 |
* Since 2.20 |
|---|
| 454 |
* Signal Details |
|---|
| 455 |
* The "changed" signal |
|---|
| 456 |
* void user_function (GMount *mount, |
|---|
| 457 |
* gpointer user_data) : Run Last |
|---|
| 458 |
* Emitted when the mount has been changed. |
|---|
| 459 |
*/ |
|---|
| 460 |
public void unshadow(); |
|---|
| 461 |
} |
|---|