Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Net / NetTimeProvider.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.Net {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class NetTimeProvider : Gst.Object, GLib.IInitable {
13
14                 public NetTimeProvider (IntPtr raw) : base(raw) {}
15
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);
18
19                 public NetTimeProvider (Gst.Clock clock, string address, int port) : base (IntPtr.Zero)
20                 {
21                         if (GetType () != typeof (NetTimeProvider)) {
22                                 var vals = new List<GLib.Value> ();
23                                 var names = new List<string> ();
24                                 if (clock != null) {
25                                         names.Add ("clock");
26                                         vals.Add (new GLib.Value (clock));
27                                 }
28                                 names.Add ("address");
29                                 vals.Add (new GLib.Value (address));
30                                 names.Add ("port");
31                                 vals.Add (new GLib.Value (port));
32                                 CreateNativeObject (names.ToArray (), vals.ToArray ());
33                                 return;
34                         }
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);
38                 }
39
40                 [GLib.Property ("active")]
41                 public bool Active {
42                         get {
43                                 GLib.Value val = GetProperty ("active");
44                                 bool ret = (bool) val;
45                                 val.Dispose ();
46                                 return ret;
47                         }
48                         set {
49                                 GLib.Value val = new GLib.Value(value);
50                                 SetProperty("active", val);
51                                 val.Dispose ();
52                         }
53                 }
54
55                 [GLib.Property ("address")]
56                 public string Address {
57                         get {
58                                 GLib.Value val = GetProperty ("address");
59                                 string ret = (string) val;
60                                 val.Dispose ();
61                                 return ret;
62                         }
63                 }
64
65                 [GLib.Property ("clock")]
66                 public Gst.Clock Clock {
67                         get {
68                                 GLib.Value val = GetProperty ("clock");
69                                 Gst.Clock ret = (Gst.Clock) val;
70                                 val.Dispose ();
71                                 return ret;
72                         }
73                 }
74
75                 [GLib.Property ("port")]
76                 public int Port {
77                         get {
78                                 GLib.Value val = GetProperty ("port");
79                                 int ret = (int) val;
80                                 val.Dispose ();
81                                 return ret;
82                         }
83                 }
84
85                 [GLib.Property ("qos-dscp")]
86                 public int QosDscp {
87                         get {
88                                 GLib.Value val = GetProperty ("qos-dscp");
89                                 int ret = (int) val;
90                                 val.Dispose ();
91                                 return ret;
92                         }
93                         set {
94                                 GLib.Value val = new GLib.Value(value);
95                                 SetProperty("qos-dscp", val);
96                                 val.Dispose ();
97                         }
98                 }
99
100
101                 // Internal representation of the wrapped structure ABI.
102                 static GLib.AbiStruct _class_abi = null;
103                 static public new GLib.AbiStruct class_abi {
104                         get {
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
110                                                         , null
111                                                         , null
112                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
113                                                         , 0
114                                                         ),
115                                         });
116
117                                 return _class_abi;
118                         }
119                 }
120
121
122                 // End of the ABI representation.
123
124                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
125                 static extern IntPtr gst_net_time_provider_get_type();
126
127                 public static new GLib.GType GType { 
128                         get {
129                                 IntPtr raw_ret = gst_net_time_provider_get_type();
130                                 GLib.GType ret = new GLib.GType(raw_ret);
131                                 return ret;
132                         }
133                 }
134
135                 [DllImport("gio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136                 static extern bool g_initable_init(IntPtr raw, IntPtr cancellable, out IntPtr error);
137
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);
141                         bool ret = raw_ret;
142                         if (error != IntPtr.Zero) throw new GLib.GException (error);
143                         return ret;
144                 }
145
146
147                 static NetTimeProvider ()
148                 {
149                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
150                 }
151
152                 // Internal representation of the wrapped structure ABI.
153                 static GLib.AbiStruct _abi_info = null;
154                 static public new GLib.AbiStruct abi_info {
155                         get {
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
161                                                         , null
162                                                         , "_gst_reserved"
163                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
164                                                         , 0
165                                                         ),
166                                                 new GLib.AbiField("_gst_reserved"
167                                                         , -1
168                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
169                                                         , "priv"
170                                                         , null
171                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
172                                                         , 0
173                                                         ),
174                                         });
175
176                                 return _abi_info;
177                         }
178                 }
179
180
181                 // End of the ABI representation.
182
183 #endregion
184         }
185 }