1 module webkit2.ITPThirdParty; 2 3 private import glib.ListG; 4 private import glib.Str; 5 private import gobject.ObjectG; 6 private import webkit2.c.functions; 7 public import webkit2.c.types; 8 9 10 /** */ 11 public class ITPThirdParty 12 { 13 /** the main Gtk struct */ 14 protected WebKitITPThirdParty* webKitITPThirdParty; 15 protected bool ownedRef; 16 17 /** Get the main Gtk struct */ 18 public WebKitITPThirdParty* getITPThirdPartyStruct(bool transferOwnership = false) 19 { 20 if (transferOwnership) 21 ownedRef = false; 22 return webKitITPThirdParty; 23 } 24 25 /** the main Gtk struct as a void* */ 26 protected void* getStruct() 27 { 28 return cast(void*)webKitITPThirdParty; 29 } 30 31 /** 32 * Sets our main struct and passes it to the parent class. 33 */ 34 public this (WebKitITPThirdParty* webKitITPThirdParty, bool ownedRef = false) 35 { 36 this.webKitITPThirdParty = webKitITPThirdParty; 37 this.ownedRef = ownedRef; 38 } 39 40 ~this () 41 { 42 if ( ownedRef ) 43 webkit_itp_third_party_unref(webKitITPThirdParty); 44 } 45 46 47 /** */ 48 public static GType getType() 49 { 50 return webkit_itp_third_party_get_type(); 51 } 52 53 /** 54 * Get the domain name of @itp_third_party 55 * 56 * Returns: the domain name 57 * 58 * Since: 2.30 59 */ 60 public string getDomain() 61 { 62 return Str.toString(webkit_itp_third_party_get_domain(webKitITPThirdParty)); 63 } 64 65 /** 66 * Get the list of #WebKitITPFirstParty under which @itp_third_party has been seen. 67 * 68 * Returns: a #GList of #WebKitITPFirstParty 69 * 70 * Since: 2.30 71 */ 72 public ListG getFirstParties() 73 { 74 auto __p = webkit_itp_third_party_get_first_parties(webKitITPThirdParty); 75 76 if(__p is null) 77 { 78 return null; 79 } 80 81 return new ListG(cast(GList*) __p); 82 } 83 84 alias doref = ref_; 85 /** 86 * Atomically increments the reference count of @itp_third_party by one. 87 * This function is MT-safe and may be called from any thread. 88 * 89 * Returns: The passed #WebKitITPThirdParty 90 * 91 * Since: 2.30 92 */ 93 public ITPThirdParty ref_() 94 { 95 auto __p = webkit_itp_third_party_ref(webKitITPThirdParty); 96 97 if(__p is null) 98 { 99 return null; 100 } 101 102 return ObjectG.getDObject!(ITPThirdParty)(cast(WebKitITPThirdParty*) __p, true); 103 } 104 105 /** 106 * Atomically decrements the reference count of @itp_third_party by one. 107 * If the reference count drops to 0, all memory allocated by 108 * #WebKitITPThirdParty is released. This function is MT-safe and may be 109 * called from any thread. 110 * 111 * Since: 2.30 112 */ 113 public void unref() 114 { 115 webkit_itp_third_party_unref(webKitITPThirdParty); 116 } 117 }