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  = gstreamer-GstTocSetter.html
27  * outPack = gstreamer
28  * outFile = TocSetterT
29  * strct   = GstTocSetter
30  * realStrct=
31  * ctorStrct=
32  * clss    = TocSetterT
33  * interf  = TocSetterIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * 	- TStruct
38  * extend  = 
39  * implements:
40  * prefixes:
41  * 	- gst_toc_setter_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- gstreamer.Toc
48  * structWrap:
49  * 	- GstToc* -> Toc
50  * module aliases:
51  * local aliases:
52  * overrides:
53  */
54 
55 module gstreamer.TocSetterT;
56 
57 public  import gstreamerc.gstreamertypes;
58 
59 public import gstreamerc.gstreamer;
60 public import glib.ConstructionException;
61 public import gobject.ObjectG;
62 
63 
64 public import gstreamer.Toc;
65 
66 
67 
68 
69 /**
70  * Element interface that allows setting of the TOC.
71  *
72  * Elements that support some kind of chapters or editions (or tracks like in
73  * the FLAC cue sheet) will implement this interface.
74  *
75  * If you just want to retrieve the TOC in your application then all you
76  * need to do is watch for TOC messages on your pipeline's bus (or you can
77  * perform TOC query). This interface is only for setting TOC data, not for
78  * extracting it. To set TOC from the application, find proper tocsetter element
79  * and set TOC using gst_toc_setter_set_toc().
80  *
81  * Elements implementing the GstTocSetter interface can extend existing TOC
82  * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it)
83  * with any TOC entries received from downstream.
84  */
85 public template TocSetterT(TStruct)
86 {
87 	
88 	/** the main Gtk struct */
89 	protected GstTocSetter* gstTocSetter;
90 	
91 	
92 	public GstTocSetter* getTocSetterTStruct()
93 	{
94 		return cast(GstTocSetter*)getStruct();
95 	}
96 	
97 	
98 	/**
99 	 */
100 	
101 	/**
102 	 * Set the given TOC on the setter. Previously setted TOC will be
103 	 * unrefed before setting a new one.
104 	 * Params:
105 	 * toc = a GstToc to set. [allow-none]
106 	 */
107 	public void setToc(Toc toc)
108 	{
109 		// void gst_toc_setter_set_toc (GstTocSetter *setter,  GstToc *toc);
110 		gst_toc_setter_set_toc(getTocSetterTStruct(), (toc is null) ? null : toc.getTocStruct());
111 	}
112 	
113 	/**
114 	 * Return current TOC the setter uses. The TOC should not be
115 	 * modified without making it writable first.
116 	 * Returns: TOC set, or NULL. Unref with gst_toc_unref() when no longer needed. [transfer full]
117 	 */
118 	public Toc getToc()
119 	{
120 		// GstToc * gst_toc_setter_get_toc (GstTocSetter *setter);
121 		auto p = gst_toc_setter_get_toc(getTocSetterTStruct());
122 		
123 		if(p is null)
124 		{
125 			return null;
126 		}
127 		
128 		return ObjectG.getDObject!(Toc)(cast(GstToc*) p);
129 	}
130 	
131 	/**
132 	 * Reset the internal TOC. Elements should call this from within the
133 	 * state-change handler.
134 	 */
135 	public void reset()
136 	{
137 		// void gst_toc_setter_reset (GstTocSetter *setter);
138 		gst_toc_setter_reset(getTocSetterTStruct());
139 	}
140 }