net: GST_EXPORT -> GST_NET_API
[platform/upstream/gstreamer.git] / libs / gst / net / gstnettimeprovider.h
index c8cde3f..d1f6de3 100644 (file)
@@ -1,6 +1,7 @@
 /* GStreamer
  * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
  *               2006 Joni Valtanen <joni.valtanen@movial.fi>
+ * Copyright (C) 2012 Collabora Ltd. <tim.muller@collabora.co.uk>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 
 #ifndef __GST_NET_TIME_PROVIDER_H__
 #define __GST_NET_TIME_PROVIDER_H__
 
-/* to determinate os */
-#include <glib.h>
-
 #include <gst/gst.h>
+#include <gst/net/net-prelude.h>
 
 G_BEGIN_DECLS
 
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
-#ifdef G_OS_WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#ifndef socklen_t
-#define socklen_t int
-#endif
-#else
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif
-
-#include <fcntl.h>
-
 #define GST_TYPE_NET_TIME_PROVIDER \
   (gst_net_time_provider_get_type())
 #define GST_NET_TIME_PROVIDER(obj) \
@@ -72,20 +52,6 @@ struct _GstNetTimeProvider {
   GstObject parent;
 
   /*< private >*/
-  gchar *address;
-  int port;
-
-  int sock;
-  int control_sock[2];
-
-  GThread *thread;
-
-  GstClock *clock;
-
-  /* has to be a gint, we use atomic ops here */
-  gint active;
-
-  /*< private >*/
   GstNetTimeProviderPrivate *priv;
 
   gpointer _gst_reserved[GST_PADDING];
@@ -97,11 +63,18 @@ struct _GstNetTimeProviderClass {
   gpointer _gst_reserved[GST_PADDING];
 };
 
+GST_NET_API
 GType                   gst_net_time_provider_get_type  (void);
+
+GST_NET_API
 GstNetTimeProvider*     gst_net_time_provider_new       (GstClock *clock,
                                                          const gchar *address,
                                                          gint port);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetTimeProvider, gst_object_unref)
+#endif
+
 G_END_DECLS