[vlc-devel] [PATCH 11/19] network: move documentation to vlc_network.h
Kartik Ohri
kartikohri13 at gmail.com
Thu Jul 23 15:18:26 CEST 2020
From: rustyc <amcap1712 at gmail.com>
Move documentation for VLC API methods vlc_getaddrinfo from
src/network/getaddrinfo.c and vlc_getProxyUrl from os
specific implementations (except Android which provides
extra information) to include/vlc_network.h.
---
include/vlc_network.h | 17 +++++++++++++++++
src/darwin/netconf.m | 5 -----
src/network/getaddrinfo.c | 11 -----------
src/os2/netconf.c | 5 -----
src/posix/netconf.c | 5 -----
5 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/include/vlc_network.h b/include/vlc_network.h
index 9e1ccd24cc..e5262d1390 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -287,6 +287,18 @@ static inline int vlc_setsockopt(int s, int level, int name,
#endif
VLC_API int vlc_getnameinfo( const struct sockaddr *, int, char *, int, int *, int );
+
+/**
+ * Resolves a host name to a list of socket addresses (like getaddrinfo()).
+ *
+ * @param node host name to resolve (encoded as UTF-8), or NULL
+ * @param i_port port number for the socket addresses
+ * @param p_hints parameters (see getaddrinfo() manual page)
+ * @param res pointer set to the resulting chained list.
+ * @return 0 on success, a getaddrinfo() error otherwise.
+ * On failure, *res is undefined. On success, it must be freed with
+ * freeaddrinfo().
+ */
VLC_API int vlc_getaddrinfo (const char *, unsigned,
const struct addrinfo *, struct addrinfo **);
VLC_API int vlc_getaddrinfo_i11e(const char *, unsigned,
@@ -344,6 +356,11 @@ static inline int net_GetPeerAddress( int fd, char *address, int *port )
? VLC_EGENERIC : 0;
}
+/**
+ * Determines the network proxy server to use (if any).
+ * @param url absolute URL for which to get the proxy server
+ * @return proxy URL, NULL if no proxy or error
+ */
VLC_API char *vlc_getProxyUrl(const char *);
# ifdef __cplusplus
diff --git a/src/darwin/netconf.m b/src/darwin/netconf.m
index cee0116fb2..56b0faadaa 100644
--- a/src/darwin/netconf.m
+++ b/src/darwin/netconf.m
@@ -36,11 +36,6 @@
#include <CoreServices/CoreServices.h>
#endif
-/**
- * Determines the network proxy server to use (if any).
- * @param url absolute URL for which to get the proxy server
- * @return proxy URL, NULL if no proxy or error
- */
char *vlc_getProxyUrl(const char *url)
{
if (url == NULL) {
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index 14496d5b09..3a4e7c69bd 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -63,17 +63,6 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
}
-/**
- * Resolves a host name to a list of socket addresses (like getaddrinfo()).
- *
- * @param node host name to resolve (encoded as UTF-8), or NULL
- * @param i_port port number for the socket addresses
- * @param p_hints parameters (see getaddrinfo() manual page)
- * @param res pointer set to the resulting chained list.
- * @return 0 on success, a getaddrinfo() error otherwise.
- * On failure, *res is undefined. On success, it must be freed with
- * freeaddrinfo().
- */
int vlc_getaddrinfo (const char *node, unsigned port,
const struct addrinfo *hints, struct addrinfo **res)
{
diff --git a/src/os2/netconf.c b/src/os2/netconf.c
index aa97f3519f..99befe4bfe 100644
--- a/src/os2/netconf.c
+++ b/src/os2/netconf.c
@@ -25,11 +25,6 @@
#include <vlc_common.h>
#include <vlc_network.h>
-/**
- * Determines the network proxy server to use (if any).
- * @param url absolute URL for which to get the proxy server
- * @return proxy URL, NULL if no proxy or error
- */
char *vlc_getProxyUrl(const char *url)
{
VLC_UNUSED(url);
diff --git a/src/posix/netconf.c b/src/posix/netconf.c
index e2db67b386..d5fc7c2a9f 100644
--- a/src/posix/netconf.c
+++ b/src/posix/netconf.c
@@ -38,11 +38,6 @@ extern char **environ;
#include <vlc_fs.h>
#include <vlc_network.h>
-/**
- * Determines the network proxy server to use (if any).
- * @param url absolute URL for which to get the proxy server
- * @return proxy URL, NULL if no proxy or error
- */
char *vlc_getProxyUrl(const char *url)
{
/* libproxy helper */
--
2.25.1
More information about the vlc-devel
mailing list