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 module gst.mpegts.DVBLinkageDescriptor;
26 
27 private import glib.PtrArray;
28 private import gobject.ObjectG;
29 private import gst.mpegts.DVBLinkageEvent;
30 private import gst.mpegts.DVBLinkageMobileHandOver;
31 private import gst.mpegts.c.functions;
32 public  import gst.mpegts.c.types;
33 private import gtkd.Loader;
34 
35 
36 /** */
37 public class DVBLinkageDescriptor
38 {
39 	/** the main Gtk struct */
40 	protected GstMpegtsDVBLinkageDescriptor* gstMpegtsDVBLinkageDescriptor;
41 	protected bool ownedRef;
42 
43 	/** Get the main Gtk struct */
44 	public GstMpegtsDVBLinkageDescriptor* getDVBLinkageDescriptorStruct(bool transferOwnership = false)
45 	{
46 		if (transferOwnership)
47 			ownedRef = false;
48 		return gstMpegtsDVBLinkageDescriptor;
49 	}
50 
51 	/** the main Gtk struct as a void* */
52 	protected void* getStruct()
53 	{
54 		return cast(void*)gstMpegtsDVBLinkageDescriptor;
55 	}
56 
57 	/**
58 	 * Sets our main struct and passes it to the parent class.
59 	 */
60 	public this (GstMpegtsDVBLinkageDescriptor* gstMpegtsDVBLinkageDescriptor, bool ownedRef = false)
61 	{
62 		this.gstMpegtsDVBLinkageDescriptor = gstMpegtsDVBLinkageDescriptor;
63 		this.ownedRef = ownedRef;
64 	}
65 
66 	~this ()
67 	{
68 		if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef )
69 			gst_mpegts_dvb_linkage_descriptor_free(gstMpegtsDVBLinkageDescriptor);
70 	}
71 
72 
73 	/** */
74 	public static GType getType()
75 	{
76 		return gst_mpegts_dvb_linkage_descriptor_get_type();
77 	}
78 
79 	/** */
80 	public void free()
81 	{
82 		gst_mpegts_dvb_linkage_descriptor_free(gstMpegtsDVBLinkageDescriptor);
83 		ownedRef = false;
84 	}
85 
86 	/**
87 	 * Returns: The #GstMpegtsDVBLinkageEvent or %NULL if an error happened
88 	 */
89 	public DVBLinkageEvent getEvent()
90 	{
91 		auto p = gst_mpegts_dvb_linkage_descriptor_get_event(gstMpegtsDVBLinkageDescriptor);
92 
93 		if(p is null)
94 		{
95 			return null;
96 		}
97 
98 		return ObjectG.getDObject!(DVBLinkageEvent)(cast(GstMpegtsDVBLinkageEvent*) p);
99 	}
100 
101 	/**
102 	 * Returns: an #GstMpegtsDVBLinkageExtendedEvent array or %NULL if an error happened
103 	 */
104 	public PtrArray getExtendedEvent()
105 	{
106 		auto p = gst_mpegts_dvb_linkage_descriptor_get_extended_event(gstMpegtsDVBLinkageDescriptor);
107 
108 		if(p is null)
109 		{
110 			return null;
111 		}
112 
113 		return new PtrArray(cast(GPtrArray*) p);
114 	}
115 
116 	/**
117 	 * Returns: The #GstMpegtsDVBLinkageMobileHandOver or %NULL if an error happened
118 	 */
119 	public DVBLinkageMobileHandOver getMobileHandOver()
120 	{
121 		auto p = gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over(gstMpegtsDVBLinkageDescriptor);
122 
123 		if(p is null)
124 		{
125 			return null;
126 		}
127 
128 		return ObjectG.getDObject!(DVBLinkageMobileHandOver)(cast(GstMpegtsDVBLinkageMobileHandOver*) p);
129 	}
130 }