]> git.sesse.net Git - vlc/blobdiff - include/vlc_network.h
Made vout_ShowText* private to the core.
[vlc] / include / vlc_network.h
index 29078adead998869a949ab207bf84294604210cc..77b38290b24c05a9a0cbc8b0be19eb7ac65c8321 100644 (file)
@@ -77,13 +77,17 @@ struct msghdr
 #   define net_errno errno
 #endif
 
+int vlc_socket (int, int, int, bool nonblock) LIBVLC_USED;
+
+struct sockaddr;
+VLC_EXPORT( int, vlc_accept, ( int, struct sockaddr *, socklen_t *, bool ) LIBVLC_USED );
+
 # ifdef __cplusplus
 extern "C" {
 # endif
 
 /* Portable networking layer communication */
 int net_Socket (vlc_object_t *obj, int family, int socktype, int proto);
-int net_SetupSocket (int fd);
 
 VLC_EXPORT( int, net_Connect, (vlc_object_t *p_this, const char *psz_host, int i_port, int socktype, int protocol) );
 #define net_Connect(a, b, c, d, e) net_Connect(VLC_OBJECT(a), b, c, d, e)
@@ -146,6 +150,7 @@ VLC_EXPORT( char *, net_Gets, ( vlc_object_t *p_this, int fd, const v_socket_t *
 
 
 VLC_EXPORT( ssize_t, net_Printf, ( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, ... ) LIBVLC_FORMAT( 4, 5 ) );
+#define net_Printf(o,fd,vs,...) net_Printf(VLC_OBJECT(o),fd,vs, __VA_ARGS__)
 VLC_EXPORT( ssize_t, net_vaPrintf, ( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args ) );
 #define net_vaPrintf(a,b,c,d,e) net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
 
@@ -216,39 +221,12 @@ VLC_EXPORT (int, vlc_poll, (struct pollfd *fds, unsigned nfds, int timeout));
 # endif
 # define NI_MAXNUMERICHOST 64
 
-# ifndef NI_NUMERICHOST
-#  define NI_NUMERICHOST 0x01
-#  define NI_NUMERICSERV 0x02
-#  define NI_NOFQDN      0x04
-#  define NI_NAMEREQD    0x08
-#  define NI_DGRAM       0x10
-# endif
-
-# ifndef HAVE_STRUCT_ADDRINFO
-struct addrinfo
-{
-    int ai_flags;
-    int ai_family;
-    int ai_socktype;
-    int ai_protocol;
-    size_t ai_addrlen;
-    struct sockaddr *ai_addr;
-    char *ai_canonname;
-    struct addrinfo *ai_next;
-};
-#  define AI_PASSIVE     1
-#  define AI_CANONNAME   2
-#  define AI_NUMERICHOST 4
-# endif /* if !HAVE_STRUCT_ADDRINFO */
-
 #ifndef AI_NUMERICSERV
 # define AI_NUMERICSERV 0
 #endif
 
-VLC_EXPORT( const char *, vlc_gai_strerror, ( int ) );
 VLC_EXPORT( int, vlc_getnameinfo, ( const struct sockaddr *, int, char *, int, int *, int ) );
 VLC_EXPORT( int, vlc_getaddrinfo, ( vlc_object_t *, const char *, int, const struct addrinfo *, struct addrinfo ** ) );
-VLC_EXPORT( void, vlc_freeaddrinfo, ( struct addrinfo * ) );
 
 
 static inline bool