1 module webkit2webextension.DOMFile;
2 
3 private import glib.Str;
4 private import webkit2webextension.DOMBlob;
5 private import webkit2webextension.c.functions;
6 public  import webkit2webextension.c.types;
7 
8 
9 /** */
10 public class DOMFile : DOMBlob
11 {
12 	/** the main Gtk struct */
13 	protected WebKitDOMFile* webKitDOMFile;
14 
15 	/** Get the main Gtk struct */
16 	public WebKitDOMFile* getDOMFileStruct(bool transferOwnership = false)
17 	{
18 		if (transferOwnership)
19 			ownedRef = false;
20 		return webKitDOMFile;
21 	}
22 
23 	/** the main Gtk struct as a void* */
24 	protected override void* getStruct()
25 	{
26 		return cast(void*)webKitDOMFile;
27 	}
28 
29 	/**
30 	 * Sets our main struct and passes it to the parent class.
31 	 */
32 	public this (WebKitDOMFile* webKitDOMFile, bool ownedRef = false)
33 	{
34 		this.webKitDOMFile = webKitDOMFile;
35 		super(cast(WebKitDOMBlob*)webKitDOMFile, ownedRef);
36 	}
37 
38 
39 	/** */
40 	public static GType getType()
41 	{
42 		return webkit_dom_file_get_type();
43 	}
44 
45 	/**
46 	 *
47 	 *
48 	 * Deprecated: Use JavaScriptCore API instead
49 	 *
50 	 * Returns: A #gchar
51 	 */
52 	public string getName()
53 	{
54 		auto retStr = webkit_dom_file_get_name(webKitDOMFile);
55 
56 		scope(exit) Str.freeString(retStr);
57 		return Str.toString(retStr);
58 	}
59 }