mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Move QOM typedefs and add missing includes
Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') which will split "typdef struct { ... } TypedefName" declarations. Followed by: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will: - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-10-ehabkost@redhat.com> Message-Id: <20200831210740.126168-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
1c8eef0227
commit
db1015e92e
796 changed files with 3378 additions and 1823 deletions
|
@ -22,12 +22,13 @@
|
|||
#define QIO_CHANNEL_BUFFER_H
|
||||
|
||||
#include "io/channel.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_BUFFER "qio-channel-buffer"
|
||||
typedef struct QIOChannelBuffer QIOChannelBuffer;
|
||||
#define QIO_CHANNEL_BUFFER(obj) \
|
||||
OBJECT_CHECK(QIOChannelBuffer, (obj), TYPE_QIO_CHANNEL_BUFFER)
|
||||
|
||||
typedef struct QIOChannelBuffer QIOChannelBuffer;
|
||||
|
||||
/**
|
||||
* QIOChannelBuffer:
|
||||
|
|
|
@ -22,12 +22,13 @@
|
|||
#define QIO_CHANNEL_COMMAND_H
|
||||
|
||||
#include "io/channel.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_COMMAND "qio-channel-command"
|
||||
typedef struct QIOChannelCommand QIOChannelCommand;
|
||||
#define QIO_CHANNEL_COMMAND(obj) \
|
||||
OBJECT_CHECK(QIOChannelCommand, (obj), TYPE_QIO_CHANNEL_COMMAND)
|
||||
|
||||
typedef struct QIOChannelCommand QIOChannelCommand;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,12 +22,13 @@
|
|||
#define QIO_CHANNEL_FILE_H
|
||||
|
||||
#include "io/channel.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_FILE "qio-channel-file"
|
||||
typedef struct QIOChannelFile QIOChannelFile;
|
||||
#define QIO_CHANNEL_FILE(obj) \
|
||||
OBJECT_CHECK(QIOChannelFile, (obj), TYPE_QIO_CHANNEL_FILE)
|
||||
|
||||
typedef struct QIOChannelFile QIOChannelFile;
|
||||
|
||||
/**
|
||||
* QIOChannelFile:
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
#include "io/channel.h"
|
||||
#include "io/task.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_SOCKET "qio-channel-socket"
|
||||
typedef struct QIOChannelSocket QIOChannelSocket;
|
||||
#define QIO_CHANNEL_SOCKET(obj) \
|
||||
OBJECT_CHECK(QIOChannelSocket, (obj), TYPE_QIO_CHANNEL_SOCKET)
|
||||
|
||||
typedef struct QIOChannelSocket QIOChannelSocket;
|
||||
|
||||
/**
|
||||
* QIOChannelSocket:
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
#include "io/channel.h"
|
||||
#include "io/task.h"
|
||||
#include "crypto/tlssession.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_TLS "qio-channel-tls"
|
||||
typedef struct QIOChannelTLS QIOChannelTLS;
|
||||
#define QIO_CHANNEL_TLS(obj) \
|
||||
OBJECT_CHECK(QIOChannelTLS, (obj), TYPE_QIO_CHANNEL_TLS)
|
||||
|
||||
typedef struct QIOChannelTLS QIOChannelTLS;
|
||||
|
||||
/**
|
||||
* QIOChannelTLS
|
||||
|
|
|
@ -24,12 +24,13 @@
|
|||
#include "io/channel.h"
|
||||
#include "qemu/buffer.h"
|
||||
#include "io/task.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL_WEBSOCK "qio-channel-websock"
|
||||
typedef struct QIOChannelWebsock QIOChannelWebsock;
|
||||
#define QIO_CHANNEL_WEBSOCK(obj) \
|
||||
OBJECT_CHECK(QIOChannelWebsock, (obj), TYPE_QIO_CHANNEL_WEBSOCK)
|
||||
|
||||
typedef struct QIOChannelWebsock QIOChannelWebsock;
|
||||
typedef union QIOChannelWebsockMask QIOChannelWebsockMask;
|
||||
|
||||
union QIOChannelWebsockMask {
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "block/aio.h"
|
||||
|
||||
#define TYPE_QIO_CHANNEL "qio-channel"
|
||||
typedef struct QIOChannel QIOChannel;
|
||||
typedef struct QIOChannelClass QIOChannelClass;
|
||||
#define QIO_CHANNEL(obj) \
|
||||
OBJECT_CHECK(QIOChannel, (obj), TYPE_QIO_CHANNEL)
|
||||
#define QIO_CHANNEL_CLASS(klass) \
|
||||
|
@ -33,8 +35,6 @@
|
|||
#define QIO_CHANNEL_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(QIOChannelClass, obj, TYPE_QIO_CHANNEL)
|
||||
|
||||
typedef struct QIOChannel QIOChannel;
|
||||
typedef struct QIOChannelClass QIOChannelClass;
|
||||
|
||||
#define QIO_CHANNEL_ERR_BLOCK -2
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "io/task.h"
|
||||
|
||||
#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"
|
||||
typedef struct QIODNSResolver QIODNSResolver;
|
||||
typedef struct QIODNSResolverClass QIODNSResolverClass;
|
||||
#define QIO_DNS_RESOLVER(obj) \
|
||||
OBJECT_CHECK(QIODNSResolver, (obj), TYPE_QIO_DNS_RESOLVER)
|
||||
#define QIO_DNS_RESOLVER_CLASS(klass) \
|
||||
|
@ -33,8 +35,6 @@
|
|||
#define QIO_DNS_RESOLVER_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(QIODNSResolverClass, obj, TYPE_QIO_DNS_RESOLVER)
|
||||
|
||||
typedef struct QIODNSResolver QIODNSResolver;
|
||||
typedef struct QIODNSResolverClass QIODNSResolverClass;
|
||||
|
||||
/**
|
||||
* QIODNSResolver:
|
||||
|
|
|
@ -22,8 +22,11 @@
|
|||
#define QIO_NET_LISTENER_H
|
||||
|
||||
#include "io/channel-socket.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_QIO_NET_LISTENER "qio-net-listener"
|
||||
typedef struct QIONetListener QIONetListener;
|
||||
typedef struct QIONetListenerClass QIONetListenerClass;
|
||||
#define QIO_NET_LISTENER(obj) \
|
||||
OBJECT_CHECK(QIONetListener, (obj), TYPE_QIO_NET_LISTENER)
|
||||
#define QIO_NET_LISTENER_CLASS(klass) \
|
||||
|
@ -31,8 +34,6 @@
|
|||
#define QIO_NET_LISTENER_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(QIONetListenerClass, obj, TYPE_QIO_NET_LISTENER)
|
||||
|
||||
typedef struct QIONetListener QIONetListener;
|
||||
typedef struct QIONetListenerClass QIONetListenerClass;
|
||||
|
||||
typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,
|
||||
QIOChannelSocket *sioc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue