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.SDTService;
26 
27 private import glib.ConstructionException;
28 private import glib.MemorySlice;
29 private import glib.PtrArray;
30 private import gobject.ObjectG;
31 private import gst.mpegts.c.functions;
32 public  import gst.mpegts.c.types;
33 private import gtkd.Loader;
34 
35 
36 /** */
37 public final class SDTService
38 {
39 	/** the main Gtk struct */
40 	protected GstMpegtsSDTService* gstMpegtsSDTService;
41 	protected bool ownedRef;
42 
43 	/** Get the main Gtk struct */
44 	public GstMpegtsSDTService* getSDTServiceStruct(bool transferOwnership = false)
45 	{
46 		if (transferOwnership)
47 			ownedRef = false;
48 		return gstMpegtsSDTService;
49 	}
50 
51 	/** the main Gtk struct as a void* */
52 	protected void* getStruct()
53 	{
54 		return cast(void*)gstMpegtsSDTService;
55 	}
56 
57 	/**
58 	 * Sets our main struct and passes it to the parent class.
59 	 */
60 	public this (GstMpegtsSDTService* gstMpegtsSDTService, bool ownedRef = false)
61 	{
62 		this.gstMpegtsSDTService = gstMpegtsSDTService;
63 		this.ownedRef = ownedRef;
64 	}
65 
66 	~this ()
67 	{
68 		if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef )
69 			sliceFree(gstMpegtsSDTService);
70 	}
71 
72 
73 	/**
74 	 * The program number this table belongs to
75 	 */
76 	public @property ushort serviceId()
77 	{
78 		return gstMpegtsSDTService.serviceId;
79 	}
80 
81 	/** Ditto */
82 	public @property void serviceId(ushort value)
83 	{
84 		gstMpegtsSDTService.serviceId = value;
85 	}
86 
87 	/**
88 	 * EIT schedule information is present in this transport stream
89 	 */
90 	public @property bool EITScheduleFlag()
91 	{
92 		return gstMpegtsSDTService.EITScheduleFlag != 0;
93 	}
94 
95 	/** Ditto */
96 	public @property void EITScheduleFlag(bool value)
97 	{
98 		gstMpegtsSDTService.EITScheduleFlag = value;
99 	}
100 
101 	/**
102 	 * EIT present/following information is present in this transport stream
103 	 */
104 	public @property bool EITPresentFollowingFlag()
105 	{
106 		return gstMpegtsSDTService.EITPresentFollowingFlag != 0;
107 	}
108 
109 	/** Ditto */
110 	public @property void EITPresentFollowingFlag(bool value)
111 	{
112 		gstMpegtsSDTService.EITPresentFollowingFlag = value;
113 	}
114 
115 	/**
116 	 * Status of this service
117 	 */
118 	public @property GstMpegtsRunningStatus runningStatus()
119 	{
120 		return gstMpegtsSDTService.runningStatus;
121 	}
122 
123 	/** Ditto */
124 	public @property void runningStatus(GstMpegtsRunningStatus value)
125 	{
126 		gstMpegtsSDTService.runningStatus = value;
127 	}
128 
129 	/**
130 	 * True if one or more streams is controlled by a CA system
131 	 */
132 	public @property bool freeCAMode()
133 	{
134 		return gstMpegtsSDTService.freeCAMode != 0;
135 	}
136 
137 	/** Ditto */
138 	public @property void freeCAMode(bool value)
139 	{
140 		gstMpegtsSDTService.freeCAMode = value;
141 	}
142 
143 	/**
144 	 * List of descriptors
145 	 */
146 	public @property PtrArray descriptors()
147 	{
148 		return new PtrArray(gstMpegtsSDTService.descriptors, false);
149 	}
150 
151 	/** Ditto */
152 	public @property void descriptors(PtrArray value)
153 	{
154 		gstMpegtsSDTService.descriptors = value.getPtrArrayStruct();
155 	}
156 
157 	/** */
158 	public static GType getType()
159 	{
160 		return gst_mpegts_sdt_service_get_type();
161 	}
162 
163 	/**
164 	 * Allocates and initializes a #GstMpegtsSDTService.
165 	 *
166 	 * Returns: A newly allocated #GstMpegtsSDTService
167 	 *
168 	 * Throws: ConstructionException GTK+ fails to create the object.
169 	 */
170 	public this()
171 	{
172 		auto p = gst_mpegts_sdt_service_new();
173 
174 		if(p is null)
175 		{
176 			throw new ConstructionException("null returned by new");
177 		}
178 
179 		this(cast(GstMpegtsSDTService*) p);
180 	}
181 }