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 public import gstreamer.Toc;
64 
65 
66 
67 /**
68  * Element interface that allows setting of the TOC.
69  *
70  * Elements that support some kind of chapters or editions (or tracks like in
71  * the FLAC cue sheet) will implement this interface.
72  *
73  * If you just want to retrieve the TOC in your application then all you
74  * need to do is watch for TOC messages on your pipeline's bus (or you can
75  * perform TOC query). This interface is only for setting TOC data, not for
76  * extracting it. To set TOC from the application, find proper tocsetter element
77  * and set TOC using gst_toc_setter_set_toc().
78  *
79  * Elements implementing the GstTocSetter interface can extend existing TOC
80  * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it)
81  * with any TOC entries received from downstream.
82  */
83 public template TocSetterT(TStruct)
84 {
85 	
86 	/** the main Gtk struct */
87 	protected GstTocSetter* gstTocSetter;
88 	
89 	
90 	/** Get the main Gtk struct */
91 	public GstTocSetter* getTocSetterTStruct()
92 	{
93 		return cast(GstTocSetter*)getStruct();
94 	}
95 	
96 	
97 	/**
98 	 */
99 	
100 	/**
101 	 * Set the given TOC on the setter. Previously setted TOC will be
102 	 * unrefed before setting a new one.
103 	 * Params:
104 	 * toc = a GstToc to set. [allow-none]
105 	 */
106 	public void setToc(Toc toc)
107 	{
108 		// void gst_toc_setter_set_toc (GstTocSetter *setter,  GstToc *toc);
109 		gst_toc_setter_set_toc(getTocSetterTStruct(), (toc is null) ? null : toc.getTocStruct());
110 	}
111 	
112 	/**
113 	 * Return current TOC the setter uses. The TOC should not be
114 	 * modified without making it writable first.
115 	 * Returns: TOC set, or NULL. Unref with gst_toc_unref() when no longer needed. [transfer full]
116 	 */
117 	public Toc getToc()
118 	{
119 		// GstToc * gst_toc_setter_get_toc (GstTocSetter *setter);
120 		auto p = gst_toc_setter_get_toc(getTocSetterTStruct());
121 		
122 		if(p is null)
123 		{
124 			return null;
125 		}
126 		
127 		return ObjectG.getDObject!(Toc)(cast(GstToc*) p);
128 	}
129 	
130 	/**
131 	 * Reset the internal TOC. Elements should call this from within the
132 	 * state-change handler.
133 	 */
134 	public void reset()
135 	{
136 		// void gst_toc_setter_reset (GstTocSetter *setter);
137 		gst_toc_setter_reset(getTocSetterTStruct());
138 	}
139 }