root/trunk/src/gio/UnixMountPoint.d

Revision 938, 5.9 kB (checked in by Mike Wey, 3 months ago)

Update Gio to 2.28.

Line 
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  =
27  * outPack = gio
28  * outFile = UnixMountPoint
29  * strct   = GUnixMountPoint
30  * realStrct=
31  * ctorStrct=
32  * clss    = UnixMountPoint
33  * interf  =
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  =
38  * implements:
39  * prefixes:
40  *  - g_unix_mount_point_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  *  - mountpoints-changed
46  *  - mounts-changed
47  * imports:
48  *  - glib.Str
49  *  - gio.Icon
50  *  - gio.IconIF
51  * structWrap:
52  *  - GIcon* -> IconIF
53  *  - GUnixMountPoint* -> UnixMountPoint
54  * module aliases:
55  * local aliases:
56  * overrides:
57  */
58
59 module gio.UnixMountPoint;
60
61 public  import gtkc.giotypes;
62
63 private import gtkc.gio;
64 private import glib.ConstructionException;
65
66 private import gobject.Signals;
67 public  import gtkc.gdktypes;
68
69 private import glib.Str;
70 private import gio.Icon;
71 private import gio.IconIF;
72
73
74
75
76 /**
77  * Description
78  * Routines for managing mounted UNIX mount points and paths.
79  * Note that <gio/gunixmounts.h> belongs to the
80  * UNIX-specific GIO interfaces, thus you have to use the
81  * gio-unix-2.0.pc pkg-config file when using it.
82  */
83 public class UnixMountPoint
84 {
85    
86     /** the main Gtk struct */
87     protected GUnixMountPoint* gUnixMountPoint;
88    
89    
90     public GUnixMountPoint* getUnixMountPointStruct()
91     {
92         return gUnixMountPoint;
93     }
94    
95    
96     /** the main Gtk struct as a void* */
97     protected void* getStruct()
98     {
99         return cast(void*)gUnixMountPoint;
100     }
101    
102     /**
103      * Sets our main struct and passes it to the parent class
104      */
105     public this (GUnixMountPoint* gUnixMountPoint)
106     {
107         if(gUnixMountPoint is null)
108         {
109             this = null;
110             return;
111         }
112         this.gUnixMountPoint = gUnixMountPoint;
113     }
114    
115     /**
116      */
117    
118     /**
119      * Frees a unix mount point.
120      */
121     public void free()
122     {
123         // void g_unix_mount_point_free (GUnixMountPoint *mount_point);
124         g_unix_mount_point_free(gUnixMountPoint);
125     }
126    
127     /**
128      * Compares two unix mount points.
129      * Params:
130      * mount2 = a GUnixMount.
131      * Returns: 1, 0 or -1 if mount1 is greater than, equal to, or less than mount2, respectively.
132      */
133     public int compare(UnixMountPoint mount2)
134     {
135         // gint g_unix_mount_point_compare (GUnixMountPoint *mount1,  GUnixMountPoint *mount2);
136         return g_unix_mount_point_compare(gUnixMountPoint, (mount2 is null) ? null : mount2.getUnixMountPointStruct());
137     }
138    
139     /**
140      * Gets the mount path for a unix mount point.
141      * Returns: a string containing the mount path.
142      */
143     public string getMountPath()
144     {
145         // const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
146         return Str.toString(g_unix_mount_point_get_mount_path(gUnixMountPoint));
147     }
148    
149     /**
150      * Gets the device path for a unix mount point.
151      * Returns: a string containing the device path.
152      */
153     public string getDevicePath()
154     {
155         // const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
156         return Str.toString(g_unix_mount_point_get_device_path(gUnixMountPoint));
157     }
158    
159     /**
160      * Gets the file system type for the mount point.
161      * Returns: a string containing the file system type.
162      */
163     public string getFsType()
164     {
165         // const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
166         return Str.toString(g_unix_mount_point_get_fs_type(gUnixMountPoint));
167     }
168    
169     /**
170      * Checks if a unix mount point is read only.
171      * Returns: TRUE if a mount point is read only.
172      */
173     public int isReadonly()
174     {
175         // gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
176         return g_unix_mount_point_is_readonly(gUnixMountPoint);
177     }
178    
179     /**
180      * Checks if a unix mount point is mountable by the user.
181      * Returns: TRUE if the mount point is user mountable.
182      */
183     public int isUserMountable()
184     {
185         // gboolean g_unix_mount_point_is_user_mountable  (GUnixMountPoint *mount_point);
186         return g_unix_mount_point_is_user_mountable(gUnixMountPoint);
187     }
188    
189     /**
190      * Checks if a unix mount point is a loopback device.
191      * Returns: TRUE if the mount point is a loopback. FALSE otherwise.
192      */
193     public int isLoopback()
194     {
195         // gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
196         return g_unix_mount_point_is_loopback(gUnixMountPoint);
197     }
198    
199     /**
200      * Guesses the icon of a Unix mount point.
201      * Returns: a GIcon. [transfer full]
202      */
203     public IconIF guessIcon()
204     {
205         // GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
206         auto p = g_unix_mount_point_guess_icon(gUnixMountPoint);
207         if(p is null)
208         {
209             return null;
210         }
211         return new Icon(cast(GIcon*) p);
212     }
213    
214     /**
215      * Guesses the name of a Unix mount point.
216      * The result is a translated string.
217      * Returns: A newly allocated string that must be freed with g_free()
218      */
219     public string guessName()
220     {
221         // char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
222         return Str.toString(g_unix_mount_point_guess_name(gUnixMountPoint));
223     }
224    
225     /**
226      * Guesses whether a Unix mount point can be ejected.
227      * Returns: TRUE if mount_point is deemed to be ejectable.
228      */
229     public int guessCanEject()
230     {
231         // gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
232         return g_unix_mount_point_guess_can_eject(gUnixMountPoint);
233     }
234 }
Note: See TracBrowser for help on using the browser.