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.PatProgram; 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 * A program entry from a Program Association Table (ITU H.222.0, ISO/IEC 13818-1). 38 */ 39 public final class PatProgram 40 { 41 /** the main Gtk struct */ 42 protected GstMpegtsPatProgram* gstMpegtsPatProgram; 43 protected bool ownedRef; 44 45 /** Get the main Gtk struct */ 46 public GstMpegtsPatProgram* getPatProgramStruct(bool transferOwnership = false) 47 { 48 if (transferOwnership) 49 ownedRef = false; 50 return gstMpegtsPatProgram; 51 } 52 53 /** the main Gtk struct as a void* */ 54 protected void* getStruct() 55 { 56 return cast(void*)gstMpegtsPatProgram; 57 } 58 59 /** 60 * Sets our main struct and passes it to the parent class. 61 */ 62 public this (GstMpegtsPatProgram* gstMpegtsPatProgram, bool ownedRef = false) 63 { 64 this.gstMpegtsPatProgram = gstMpegtsPatProgram; 65 this.ownedRef = ownedRef; 66 } 67 68 ~this () 69 { 70 if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) 71 sliceFree(gstMpegtsPatProgram); 72 } 73 74 75 /** 76 * the program number 77 */ 78 public @property ushort programNumber() 79 { 80 return gstMpegtsPatProgram.programNumber; 81 } 82 83 /** Ditto */ 84 public @property void programNumber(ushort value) 85 { 86 gstMpegtsPatProgram.programNumber = value; 87 } 88 89 /** 90 * the network of program map PID 91 */ 92 public @property ushort networkOrProgramMapPID() 93 { 94 return gstMpegtsPatProgram.networkOrProgramMapPID; 95 } 96 97 /** Ditto */ 98 public @property void networkOrProgramMapPID(ushort value) 99 { 100 gstMpegtsPatProgram.networkOrProgramMapPID = value; 101 } 102 103 /** */ 104 public static GType getType() 105 { 106 return gst_mpegts_pat_program_get_type(); 107 } 108 109 /** 110 * Allocates a new #GstMpegtsPatProgram. 111 * 112 * Returns: A newly allocated #GstMpegtsPatProgram 113 * 114 * Throws: ConstructionException GTK+ fails to create the object. 115 */ 116 public this() 117 { 118 auto p = gst_mpegts_pat_program_new(); 119 120 if(p is null) 121 { 122 throw new ConstructionException("null returned by new"); 123 } 124 125 this(cast(GstMpegtsPatProgram*) p); 126 } 127 128 /** 129 * Allocates a new #GPtrArray for #GstMpegtsPatProgram 130 * 131 * Returns: A newly allocated #GPtrArray 132 */ 133 public static PtrArray patNew() 134 { 135 auto p = gst_mpegts_pat_new(); 136 137 if(p is null) 138 { 139 return null; 140 } 141 142 return new PtrArray(cast(GPtrArray*) p, true); 143 } 144 }