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 private import gobject.ObjectG;
66 
67 private import gobject.Signals;
68 public  import gtkc.gdktypes;
69 
70 private import glib.Str;
71 private import gio.Icon;
72 private import gio.IconIF;
73 
74 
75 
76 
77 /**
78  * Routines for managing mounted UNIX mount points and paths.
79  *
80  * Note that <gio/gunixmounts.h> belongs to the
81  * UNIX-specific GIO interfaces, thus you have to use the
82  * gio-unix-2.0.pc pkg-config file when using it.
83  */
84 public class UnixMountPoint
85 {
86 	
87 	/** the main Gtk struct */
88 	protected GUnixMountPoint* gUnixMountPoint;
89 	
90 	
91 	public GUnixMountPoint* getUnixMountPointStruct()
92 	{
93 		return gUnixMountPoint;
94 	}
95 	
96 	
97 	/** the main Gtk struct as a void* */
98 	protected void* getStruct()
99 	{
100 		return cast(void*)gUnixMountPoint;
101 	}
102 	
103 	/**
104 	 * Sets our main struct and passes it to the parent class
105 	 */
106 	public this (GUnixMountPoint* gUnixMountPoint)
107 	{
108 		this.gUnixMountPoint = gUnixMountPoint;
109 	}
110 	
111 	/**
112 	 */
113 	
114 	/**
115 	 * Frees a unix mount point.
116 	 */
117 	public void free()
118 	{
119 		// void g_unix_mount_point_free (GUnixMountPoint *mount_point);
120 		g_unix_mount_point_free(gUnixMountPoint);
121 	}
122 	
123 	/**
124 	 * Compares two unix mount points.
125 	 * Params:
126 	 * mount2 = a GUnixMount.
127 	 * Returns: 1, 0 or -1 if mount1 is greater than, equal to, or less than mount2, respectively.
128 	 */
129 	public int compare(UnixMountPoint mount2)
130 	{
131 		// gint g_unix_mount_point_compare (GUnixMountPoint *mount1,  GUnixMountPoint *mount2);
132 		return g_unix_mount_point_compare(gUnixMountPoint, (mount2 is null) ? null : mount2.getUnixMountPointStruct());
133 	}
134 	
135 	/**
136 	 * Gets the mount path for a unix mount point.
137 	 * Returns: a string containing the mount path.
138 	 */
139 	public string getMountPath()
140 	{
141 		// const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
142 		return Str.toString(g_unix_mount_point_get_mount_path(gUnixMountPoint));
143 	}
144 	
145 	/**
146 	 * Gets the device path for a unix mount point.
147 	 * Returns: a string containing the device path.
148 	 */
149 	public string getDevicePath()
150 	{
151 		// const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
152 		return Str.toString(g_unix_mount_point_get_device_path(gUnixMountPoint));
153 	}
154 	
155 	/**
156 	 * Gets the file system type for the mount point.
157 	 * Returns: a string containing the file system type.
158 	 */
159 	public string getFsType()
160 	{
161 		// const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
162 		return Str.toString(g_unix_mount_point_get_fs_type(gUnixMountPoint));
163 	}
164 	
165 	/**
166 	 * Gets the options for the mount point.
167 	 * Since 2.32
168 	 * Returns: a string containing the options.
169 	 */
170 	public string getOptions()
171 	{
172 		// const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point);
173 		return Str.toString(g_unix_mount_point_get_options(gUnixMountPoint));
174 	}
175 	
176 	/**
177 	 * Checks if a unix mount point is read only.
178 	 * Returns: TRUE if a mount point is read only.
179 	 */
180 	public int isReadonly()
181 	{
182 		// gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
183 		return g_unix_mount_point_is_readonly(gUnixMountPoint);
184 	}
185 	
186 	/**
187 	 * Checks if a unix mount point is mountable by the user.
188 	 * Returns: TRUE if the mount point is user mountable.
189 	 */
190 	public int isUserMountable()
191 	{
192 		// gboolean g_unix_mount_point_is_user_mountable  (GUnixMountPoint *mount_point);
193 		return g_unix_mount_point_is_user_mountable(gUnixMountPoint);
194 	}
195 	
196 	/**
197 	 * Checks if a unix mount point is a loopback device.
198 	 * Returns: TRUE if the mount point is a loopback. FALSE otherwise.
199 	 */
200 	public int isLoopback()
201 	{
202 		// gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
203 		return g_unix_mount_point_is_loopback(gUnixMountPoint);
204 	}
205 	
206 	/**
207 	 * Guesses the icon of a Unix mount point.
208 	 * Returns: a GIcon. [transfer full]
209 	 */
210 	public IconIF guessIcon()
211 	{
212 		// GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
213 		auto p = g_unix_mount_point_guess_icon(gUnixMountPoint);
214 		
215 		if(p is null)
216 		{
217 			return null;
218 		}
219 		
220 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
221 	}
222 	
223 	/**
224 	 * Guesses the symbolic icon of a Unix mount point.
225 	 * Since 2.34
226 	 * Returns: a GIcon. [transfer full]
227 	 */
228 	public IconIF guessSymbolicIcon()
229 	{
230 		// GIcon * g_unix_mount_point_guess_symbolic_icon  (GUnixMountPoint *mount_point);
231 		auto p = g_unix_mount_point_guess_symbolic_icon(gUnixMountPoint);
232 		
233 		if(p is null)
234 		{
235 			return null;
236 		}
237 		
238 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
239 	}
240 	
241 	/**
242 	 * Guesses the name of a Unix mount point.
243 	 * The result is a translated string.
244 	 * Returns: A newly allocated string that must be freed with g_free()
245 	 */
246 	public string guessName()
247 	{
248 		// char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
249 		return Str.toString(g_unix_mount_point_guess_name(gUnixMountPoint));
250 	}
251 	
252 	/**
253 	 * Guesses whether a Unix mount point can be ejected.
254 	 * Returns: TRUE if mount_point is deemed to be ejectable.
255 	 */
256 	public int guessCanEject()
257 	{
258 		// gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
259 		return g_unix_mount_point_guess_can_eject(gUnixMountPoint);
260 	}
261 }