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