diff options
author | Markus Armbruster | 2017-04-26 09:36:39 +0200 |
---|---|---|
committer | Markus Armbruster | 2017-05-09 09:14:40 +0200 |
commit | dfd100f242370886bb6732f70f1f7cbd8eb9fedc (patch) | |
tree | 3ad4f17ad74b5b420f556ccea55b391a39d5a2c5 /include/io | |
parent | qapi: New QAPI_CLONE_MEMBERS() (diff) | |
download | qemu-dfd100f242370886bb6732f70f1f7cbd8eb9fedc.tar.gz qemu-dfd100f242370886bb6732f70f1f7cbd8eb9fedc.tar.xz qemu-dfd100f242370886bb6732f70f1f7cbd8eb9fedc.zip |
sockets: Rename SocketAddress to SocketAddressLegacy
The next commit will rename SocketAddressFlat to SocketAddress, and
the commit after that will replace most uses of SocketAddressLegacy by
SocketAddress, replacing most of this commit's renames right back.
Note that checkpatch emits a few "line over 80 characters" warnings.
The long lines are all temporary; the SocketAddressLegacy replacement
will shorten them again.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1493192202-3184-5-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/io')
-rw-r--r-- | include/io/channel-socket.h | 24 | ||||
-rw-r--r-- | include/io/dns-resolver.h | 22 | ||||
-rw-r--r-- | include/io/task.h | 10 |
3 files changed, 28 insertions, 28 deletions
diff --git a/include/io/channel-socket.h b/include/io/channel-socket.h index 711f8bf7ce..c1aaa72a5d 100644 --- a/include/io/channel-socket.h +++ b/include/io/channel-socket.h @@ -91,7 +91,7 @@ qio_channel_socket_new_fd(int fd, * an error occurs. */ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc, - SocketAddress *addr, + SocketAddressLegacy *addr, Error **errp); /** @@ -110,7 +110,7 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc, * as this function returns without waiting for completion. */ void qio_channel_socket_connect_async(QIOChannelSocket *ioc, - SocketAddress *addr, + SocketAddressLegacy *addr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy); @@ -128,7 +128,7 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc, * an error occurs. */ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, - SocketAddress *addr, + SocketAddressLegacy *addr, Error **errp); /** @@ -147,7 +147,7 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, * as this function returns without waiting for completion. */ void qio_channel_socket_listen_async(QIOChannelSocket *ioc, - SocketAddress *addr, + SocketAddressLegacy *addr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy); @@ -167,8 +167,8 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc, * is established or an error occurs. */ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, - SocketAddress *localAddr, - SocketAddress *remoteAddr, + SocketAddressLegacy *localAddr, + SocketAddressLegacy *remoteAddr, Error **errp); /** @@ -190,8 +190,8 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, * waiting for completion. */ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc, - SocketAddress *localAddr, - SocketAddress *remoteAddr, + SocketAddressLegacy *localAddr, + SocketAddressLegacy *remoteAddr, QIOTaskFunc callback, gpointer opaque, GDestroyNotify destroy); @@ -205,12 +205,12 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc, * Get the string representation of the local socket * address. A pointer to the allocated address information * struct will be returned, which the caller is required to - * release with a call qapi_free_SocketAddress when no + * release with a call qapi_free_SocketAddressLegacy() when no * longer required. * * Returns: 0 on success, -1 on error */ -SocketAddress * +SocketAddressLegacy * qio_channel_socket_get_local_address(QIOChannelSocket *ioc, Error **errp); @@ -222,12 +222,12 @@ qio_channel_socket_get_local_address(QIOChannelSocket *ioc, * Get the string representation of the local socket * address. A pointer to the allocated address information * struct will be returned, which the caller is required to - * release with a call qapi_free_SocketAddress when no + * release with a call qapi_free_SocketAddressLegacy() when no * longer required. * * Returns: the socket address struct, or NULL on error */ -SocketAddress * +SocketAddressLegacy * qio_channel_socket_get_remote_address(QIOChannelSocket *ioc, Error **errp); diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h index 2f69c08c13..aac46cadea 100644 --- a/include/io/dns-resolver.h +++ b/include/io/dns-resolver.h @@ -40,15 +40,15 @@ typedef struct QIODNSResolverClass QIODNSResolverClass; * QIODNSResolver: * * The QIODNSResolver class provides a framework for doing - * DNS resolution on SocketAddress objects, independently + * DNS resolution on SocketAddressLegacy objects, independently * of socket creation. * * <example> * <title>Resolving addresses synchronously</title> * <programlisting> - * int mylisten(SocketAddress *addr, Error **errp) { + * int mylisten(SocketAddressLegacy *addr, Error **errp) { * QIODNSResolver *resolver = qio_dns_resolver_get_instance(); - * SocketAddress **rawaddrs = NULL; + * SocketAddressLegacy **rawaddrs = NULL; * size_t nrawaddrs = 0; * Error *err = NULL; * QIOChannel **socks = NULL; @@ -69,7 +69,7 @@ typedef struct QIODNSResolverClass QIODNSResolverClass; * socks = g_renew(QIOChannelSocket *, socks, nsocks + 1); * socks[nsocks++] = sock; * } - * qapi_free_SocketAddress(rawaddrs[i]); + * qapi_free_SocketAddressLegacy(rawaddrs[i]); * } * g_free(rawaddrs); * @@ -95,7 +95,7 @@ typedef struct QIODNSResolverClass QIODNSResolverClass; * MyListenData *data = opaque; * QIODNSResolver *resolver = * QIO_DNS_RESOLVER(qio_task_get_source(task); - * SocketAddress **rawaddrs = NULL; + * SocketAddressLegacy **rawaddrs = NULL; * size_t nrawaddrs = 0; * Error *err = NULL; * @@ -116,7 +116,7 @@ typedef struct QIODNSResolverClass QIODNSResolverClass; * socks = g_renew(QIOChannelSocket *, socks, nsocks + 1); * socks[nsocks++] = sock; * } - * qapi_free_SocketAddress(rawaddrs[i]); + * qapi_free_SocketAddressLegacy(rawaddrs[i]); * } * g_free(rawaddrs); * @@ -127,7 +127,7 @@ typedef struct QIODNSResolverClass QIODNSResolverClass; * } * } * - * void mylisten(SocketAddress *addr, MyListenData *data) { + * void mylisten(SocketAddressLegacy *addr, MyListenData *data) { * QIODNSResolver *resolver = qio_dns_resolver_get_instance(); * qio_dns_resolver_lookup_async(dns, addr, * mylistenresult, data, NULL); @@ -177,9 +177,9 @@ QIODNSResolver *qio_dns_resolver_get_instance(void); * Returns: 0 if resolution was successful, -1 on error */ int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver, - SocketAddress *addr, + SocketAddressLegacy *addr, size_t *naddrs, - SocketAddress ***addrs, + SocketAddressLegacy ***addrs, Error **errp); /** @@ -201,7 +201,7 @@ int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver, * of the caller will not be blocked. */ void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, - SocketAddress *addr, + SocketAddressLegacy *addr, QIOTaskFunc func, gpointer opaque, GDestroyNotify notify); @@ -223,6 +223,6 @@ void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, void qio_dns_resolver_lookup_result(QIODNSResolver *resolver, QIOTask *task, size_t *naddrs, - SocketAddress ***addrs); + SocketAddressLegacy ***addrs); #endif /* QIO_DNS_RESOLVER_H */ diff --git a/include/io/task.h b/include/io/task.h index 6021f51336..f65ec7aca3 100644 --- a/include/io/task.h +++ b/include/io/task.h @@ -166,7 +166,7 @@ typedef void (*QIOTaskWorker)(QIOTask *task, * gpointer opaque) * { * QMyObject obj = QMY_OBJECT(qio_task_get_source(task)); - * SocketAddress *addr = opaque; + * SocketAddressLegacy *addr = opaque; * Error *err = NULL; * * obj->fd = socket_listen(addr, &err); @@ -175,20 +175,20 @@ typedef void (*QIOTaskWorker)(QIOTask *task, * } * * void myobject_listen_async(QMyObject *obj, - * SocketAddress *addr, + * SocketAddressLegacy *addr, * QIOTaskFunc *func, * gpointer opaque, * GDestroyNotify notify) * { * QIOTask *task; - * SocketAddress *addrCopy; + * SocketAddressLegacy *addrCopy; * - * addrCopy = QAPI_CLONE(SocketAddress, addr); + * addrCopy = QAPI_CLONE(SocketAddressLegacy, addr); * task = qio_task_new(OBJECT(obj), func, opaque, notify); * * qio_task_run_in_thread(task, myobject_listen_worker, * addrCopy, - * qapi_free_SocketAddress); + * qapi_free_SocketAddressLegacy); * } * </example> * |