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  * Description
79  * Routines for managing mounted UNIX mount points and paths.
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 	 * Checks if a unix mount point is read only.
167 	 * Returns: TRUE if a mount point is read only.
168 	 */
169 	public int isReadonly()
170 	{
171 		// gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
172 		return g_unix_mount_point_is_readonly(gUnixMountPoint);
173 	}
174 	
175 	/**
176 	 * Checks if a unix mount point is mountable by the user.
177 	 * Returns: TRUE if the mount point is user mountable.
178 	 */
179 	public int isUserMountable()
180 	{
181 		// gboolean g_unix_mount_point_is_user_mountable  (GUnixMountPoint *mount_point);
182 		return g_unix_mount_point_is_user_mountable(gUnixMountPoint);
183 	}
184 	
185 	/**
186 	 * Checks if a unix mount point is a loopback device.
187 	 * Returns: TRUE if the mount point is a loopback. FALSE otherwise.
188 	 */
189 	public int isLoopback()
190 	{
191 		// gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
192 		return g_unix_mount_point_is_loopback(gUnixMountPoint);
193 	}
194 	
195 	/**
196 	 * Guesses the icon of a Unix mount point.
197 	 * Returns: a GIcon. [transfer full]
198 	 */
199 	public IconIF guessIcon()
200 	{
201 		// GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
202 		auto p = g_unix_mount_point_guess_icon(gUnixMountPoint);
203 		
204 		if(p is null)
205 		{
206 			return null;
207 		}
208 		
209 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
210 	}
211 	
212 	/**
213 	 * Guesses the name of a Unix mount point.
214 	 * The result is a translated string.
215 	 * Returns: A newly allocated string that must be freed with g_free()
216 	 */
217 	public string guessName()
218 	{
219 		// char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
220 		return Str.toString(g_unix_mount_point_guess_name(gUnixMountPoint));
221 	}
222 	
223 	/**
224 	 * Guesses whether a Unix mount point can be ejected.
225 	 * Returns: TRUE if mount_point is deemed to be ejectable.
226 	 */
227 	public int guessCanEject()
228 	{
229 		// gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
230 		return g_unix_mount_point_guess_can_eject(gUnixMountPoint);
231 	}
232 }