1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class NetTimeProvider : Gst.Object, GLib.IInitable {
14 public NetTimeProvider (IntPtr raw) : base(raw) {}
16 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
17 static extern IntPtr gst_net_time_provider_new(IntPtr clock, IntPtr address, int port);
19 public NetTimeProvider (Gst.Clock clock, string address, int port) : base (IntPtr.Zero)
21 if (GetType () != typeof (NetTimeProvider)) {
22 var vals = new List<GLib.Value> ();
23 var names = new List<string> ();
26 vals.Add (new GLib.Value (clock));
28 names.Add ("address");
29 vals.Add (new GLib.Value (address));
31 vals.Add (new GLib.Value (port));
32 CreateNativeObject (names.ToArray (), vals.ToArray ());
35 IntPtr native_address = GLib.Marshaller.StringToPtrGStrdup (address);
36 Raw = gst_net_time_provider_new(clock == null ? IntPtr.Zero : clock.Handle, native_address, port);
37 GLib.Marshaller.Free (native_address);
40 [GLib.Property ("active")]
43 GLib.Value val = GetProperty ("active");
44 bool ret = (bool) val;
49 GLib.Value val = new GLib.Value(value);
50 SetProperty("active", val);
55 [GLib.Property ("address")]
56 public string Address {
58 GLib.Value val = GetProperty ("address");
59 string ret = (string) val;
65 [GLib.Property ("clock")]
66 public Gst.Clock Clock {
68 GLib.Value val = GetProperty ("clock");
69 Gst.Clock ret = (Gst.Clock) val;
75 [GLib.Property ("port")]
78 GLib.Value val = GetProperty ("port");
85 [GLib.Property ("qos-dscp")]
88 GLib.Value val = GetProperty ("qos-dscp");
94 GLib.Value val = new GLib.Value(value);
95 SetProperty("qos-dscp", val);
101 // Internal representation of the wrapped structure ABI.
102 static GLib.AbiStruct _class_abi = null;
103 static public new GLib.AbiStruct class_abi {
105 if (_class_abi == null)
106 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
107 new GLib.AbiField("_gst_reserved"
108 , Gst.Object.class_abi.Fields
109 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
112 , (uint) Marshal.SizeOf(typeof(IntPtr))
122 // End of the ABI representation.
124 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
125 static extern IntPtr gst_net_time_provider_get_type();
127 public static new GLib.GType GType {
129 IntPtr raw_ret = gst_net_time_provider_get_type();
130 GLib.GType ret = new GLib.GType(raw_ret);
135 [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136 static extern bool g_initable_init(IntPtr raw, IntPtr cancellable, out IntPtr error);
138 public bool Init(GLib.Cancellable cancellable) {
139 IntPtr error = IntPtr.Zero;
140 bool raw_ret = g_initable_init(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
142 if (error != IntPtr.Zero) throw new GLib.GException (error);
147 static NetTimeProvider ()
149 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
152 // Internal representation of the wrapped structure ABI.
153 static GLib.AbiStruct _abi_info = null;
154 static public new GLib.AbiStruct abi_info {
156 if (_abi_info == null)
157 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
158 new GLib.AbiField("priv"
159 , Gst.Object.abi_info.Fields
160 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
163 , (uint) Marshal.SizeOf(typeof(IntPtr))
166 new GLib.AbiField("_gst_reserved"
168 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
171 , (uint) Marshal.SizeOf(typeof(IntPtr))
181 // End of the ABI representation.