mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 01:49:09 +00:00
Update header style
Avoid typedef useless in C++. Remove useless forward declarations. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
8671f659f4
commit
77af39d6b5
@ -37,8 +37,8 @@ SPICE_BEGIN_DECLS
|
||||
|
||||
/* SpiceCharDeviceState is public API, but internally we use RedCharDevice */
|
||||
typedef struct SpiceCharDeviceState RedCharDevice;
|
||||
typedef struct RedCharDeviceClass RedCharDeviceClass;
|
||||
typedef struct RedCharDevicePrivate RedCharDevicePrivate;
|
||||
struct RedCharDeviceClass;
|
||||
struct RedCharDevicePrivate;
|
||||
|
||||
#ifndef RedCharDeviceClientOpaque
|
||||
#define RedCharDeviceClientOpaque RedClient
|
||||
@ -156,14 +156,14 @@ GType red_char_device_get_type(void) G_GNUC_CONST;
|
||||
* */
|
||||
|
||||
/* buffer that is used for writing to the device */
|
||||
typedef struct RedCharDeviceWriteBufferPrivate RedCharDeviceWriteBufferPrivate;
|
||||
typedef struct RedCharDeviceWriteBuffer {
|
||||
struct RedCharDeviceWriteBufferPrivate;
|
||||
struct RedCharDeviceWriteBuffer {
|
||||
uint32_t buf_size;
|
||||
uint32_t buf_used;
|
||||
|
||||
RedCharDeviceWriteBufferPrivate *priv;
|
||||
uint8_t buf[0];
|
||||
} RedCharDeviceWriteBuffer;
|
||||
};
|
||||
|
||||
void red_char_device_reset_dev_instance(RedCharDevice *dev,
|
||||
SpiceCharDeviceInstance *sin);
|
||||
|
||||
@ -42,9 +42,7 @@ bool common_channel_client_config_socket(RedChannelClient *rcc);
|
||||
#define COMMON_GRAPHICS_CHANNEL_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_COMMON_GRAPHICS_CHANNEL, CommonGraphicsChannelClass))
|
||||
|
||||
typedef struct CommonGraphicsChannel CommonGraphicsChannel;
|
||||
typedef struct CommonGraphicsChannelClass CommonGraphicsChannelClass;
|
||||
typedef struct CommonGraphicsChannelPrivate CommonGraphicsChannelPrivate;
|
||||
struct CommonGraphicsChannelPrivate;
|
||||
|
||||
struct CommonGraphicsChannel: public RedChannel
|
||||
{
|
||||
@ -83,9 +81,7 @@ enum {
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_COMMON_GRAPHICS_CHANNEL_CLIENT, \
|
||||
CommonGraphicsChannelClientClass))
|
||||
|
||||
typedef struct CommonGraphicsChannelClient CommonGraphicsChannelClient;
|
||||
typedef struct CommonGraphicsChannelClientClass CommonGraphicsChannelClientClass;
|
||||
typedef struct CommonGraphicsChannelClientPrivate CommonGraphicsChannelClientPrivate;
|
||||
struct CommonGraphicsChannelClientPrivate;
|
||||
|
||||
struct CommonGraphicsChannelClient: public RedChannelClient
|
||||
{
|
||||
|
||||
@ -42,9 +42,7 @@ G_BEGIN_DECLS
|
||||
#define CURSOR_CHANNEL_CLIENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_CURSOR_CHANNEL_CLIENT, CursorChannelClientClass))
|
||||
|
||||
typedef struct CursorChannelClient CursorChannelClient;
|
||||
typedef struct CursorChannelClientClass CursorChannelClientClass;
|
||||
typedef struct CursorChannelClientPrivate CursorChannelClientPrivate;
|
||||
struct CursorChannelClientPrivate;
|
||||
|
||||
struct CursorChannelClient final: public CommonGraphicsChannelClient
|
||||
{
|
||||
|
||||
@ -30,8 +30,8 @@ G_BEGIN_DECLS
|
||||
* movements.
|
||||
* A pointer to CursorChannel can be converted to a RedChannel.
|
||||
*/
|
||||
typedef struct CursorChannel CursorChannel;
|
||||
typedef struct CursorChannelClass CursorChannelClass;
|
||||
struct CursorChannel;
|
||||
struct CursorChannelClass;
|
||||
|
||||
#define TYPE_CURSOR_CHANNEL cursor_channel_get_type()
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include "video-stream.h"
|
||||
#include "red-channel-client.h"
|
||||
|
||||
typedef struct DisplayChannelClientPrivate DisplayChannelClientPrivate;
|
||||
struct DisplayChannelClientPrivate
|
||||
{
|
||||
uint32_t id;
|
||||
|
||||
10
server/dcc.h
10
server/dcc.h
@ -42,9 +42,7 @@ G_BEGIN_DECLS
|
||||
#define DISPLAY_CHANNEL_CLIENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_DISPLAY_CHANNEL_CLIENT, DisplayChannelClientClass))
|
||||
|
||||
typedef struct DisplayChannelClient DisplayChannelClient;
|
||||
typedef struct DisplayChannelClientClass DisplayChannelClientClass;
|
||||
typedef struct DisplayChannelClientPrivate DisplayChannelClientPrivate;
|
||||
struct DisplayChannelClientPrivate;
|
||||
|
||||
struct DisplayChannelClient final: public CommonGraphicsChannelClient
|
||||
{
|
||||
@ -76,9 +74,9 @@ GType display_channel_client_get_type(void) G_GNUC_CONST;
|
||||
|
||||
#define MAX_PIPE_SIZE 50
|
||||
|
||||
typedef struct DisplayChannel DisplayChannel;
|
||||
typedef struct VideoStream VideoStream;
|
||||
typedef struct VideoStreamAgent VideoStreamAgent;
|
||||
struct DisplayChannel;
|
||||
struct VideoStream;
|
||||
struct VideoStreamAgent;
|
||||
|
||||
typedef struct WaitForChannels {
|
||||
SpiceMsgWaitForChannels header;
|
||||
|
||||
@ -46,9 +46,8 @@ G_BEGIN_DECLS
|
||||
#define DISPLAY_CHANNEL_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_DISPLAY_CHANNEL, DisplayChannelClass))
|
||||
|
||||
typedef struct DisplayChannel DisplayChannel;
|
||||
typedef struct DisplayChannelClass DisplayChannelClass;
|
||||
typedef struct DisplayChannelPrivate DisplayChannelPrivate;
|
||||
struct DisplayChannelClass;
|
||||
struct DisplayChannelPrivate;
|
||||
|
||||
struct DisplayChannel final: public CommonGraphicsChannel
|
||||
{
|
||||
|
||||
@ -29,18 +29,8 @@ G_BEGIN_DECLS
|
||||
|
||||
#define INPUTS_CHANNEL_CLIENT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClient))
|
||||
#define INPUTS_CHANNEL_CLIENT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
|
||||
#define IS_INPUTS_CHANNEL_CLIENT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_INPUTS_CHANNEL_CLIENT))
|
||||
#define IS_INPUTS_CHANNEL_CLIENT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_INPUTS_CHANNEL_CLIENT))
|
||||
#define INPUTS_CHANNEL_CLIENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_INPUTS_CHANNEL_CLIENT, InputsChannelClientClass))
|
||||
|
||||
typedef struct InputsChannelClient InputsChannelClient;
|
||||
typedef struct InputsChannelClientClass InputsChannelClientClass;
|
||||
typedef struct InputsChannelClientPrivate InputsChannelClientPrivate;
|
||||
struct InputsChannelClientPrivate;
|
||||
|
||||
struct InputsChannelClient final: public RedChannelClient
|
||||
{
|
||||
|
||||
@ -39,8 +39,8 @@ G_BEGIN_DECLS
|
||||
#define INPUTS_CHANNEL_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_INPUTS_CHANNEL, InputsChannelClass))
|
||||
|
||||
typedef struct InputsChannel InputsChannel;
|
||||
typedef struct InputsChannelClass InputsChannelClass;
|
||||
struct InputsChannel;
|
||||
struct InputsChannelClass;
|
||||
|
||||
GType inputs_channel_get_type(void) G_GNUC_CONST;
|
||||
|
||||
|
||||
@ -39,9 +39,7 @@ G_BEGIN_DECLS
|
||||
#define MAIN_CHANNEL_CLIENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_MAIN_CHANNEL_CLIENT, MainChannelClientClass))
|
||||
|
||||
typedef struct MainChannelClient MainChannelClient;
|
||||
typedef struct MainChannelClientClass MainChannelClientClass;
|
||||
typedef struct MainChannelClientPrivate MainChannelClientPrivate;
|
||||
struct MainChannelClientPrivate;
|
||||
|
||||
struct MainChannelClient final: public RedChannelClient
|
||||
{
|
||||
|
||||
@ -37,8 +37,8 @@ G_BEGIN_DECLS
|
||||
#define MAIN_CHANNEL_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_MAIN_CHANNEL, MainChannelClass))
|
||||
|
||||
typedef struct MainChannel MainChannel;
|
||||
typedef struct MainChannelClass MainChannelClass;
|
||||
struct MainChannel;
|
||||
struct MainChannelClass;
|
||||
|
||||
GType main_channel_get_type(void) G_GNUC_CONST;
|
||||
|
||||
@ -53,7 +53,6 @@ struct RedsMigSpice {
|
||||
int port;
|
||||
int sport;
|
||||
};
|
||||
typedef struct RedsMigSpice RedsMigSpice;
|
||||
|
||||
MainChannel *main_channel_new(RedsState *reds);
|
||||
RedClient *main_channel_get_client_by_link_id(MainChannel *main_chan, uint32_t link_id);
|
||||
|
||||
@ -40,9 +40,9 @@ G_BEGIN_DECLS
|
||||
SPICE_DECLARE_TYPE(RedChannel, red_channel, CHANNEL);
|
||||
#define RED_TYPE_CHANNEL red_channel_get_type()
|
||||
|
||||
typedef struct RedChannelClient RedChannelClient;
|
||||
typedef struct RedClient RedClient;
|
||||
typedef struct MainChannelClient MainChannelClient;
|
||||
struct RedChannelClient;
|
||||
struct RedClient;
|
||||
struct MainChannelClient;
|
||||
|
||||
typedef bool (*channel_handle_message_proc)(RedChannelClient *rcc, uint16_t type,
|
||||
uint32_t size, void *msg);
|
||||
|
||||
@ -27,8 +27,8 @@ G_BEGIN_DECLS
|
||||
/**
|
||||
* StreamDevice inherits from RedCharDevice.
|
||||
*/
|
||||
typedef struct StreamDevice StreamDevice;
|
||||
typedef struct StreamDeviceClass StreamDeviceClass;
|
||||
struct StreamDevice;
|
||||
struct StreamDeviceClass;
|
||||
|
||||
#define TYPE_STREAM_DEVICE stream_device_get_type()
|
||||
|
||||
|
||||
@ -37,9 +37,7 @@ G_BEGIN_DECLS
|
||||
#define SMARTCARD_CHANNEL_CLIENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
|
||||
|
||||
typedef struct SmartCardChannelClient SmartCardChannelClient;
|
||||
typedef struct SmartCardChannelClientClass SmartCardChannelClientClass;
|
||||
typedef struct SmartCardChannelClientPrivate SmartCardChannelClientPrivate;
|
||||
struct SmartCardChannelClientPrivate;
|
||||
|
||||
struct SmartCardChannelClient final: public RedChannelClient
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@ SPICE_BEGIN_DECLS
|
||||
SPICE_DECLARE_TYPE(RedCharDeviceSmartcard, red_char_device_smartcard, CHAR_DEVICE_SMARTCARD);
|
||||
#define RED_TYPE_CHAR_DEVICE_SMARTCARD red_char_device_smartcard_get_type()
|
||||
|
||||
typedef struct SmartCardChannelClient SmartCardChannelClient;
|
||||
struct SmartCardChannelClient;
|
||||
|
||||
struct RedCharDeviceSmartcard
|
||||
{
|
||||
|
||||
@ -30,8 +30,8 @@ G_BEGIN_DECLS
|
||||
* channel with input only by stream.
|
||||
* A pointer to StreamChannel can be converted to a RedChannel.
|
||||
*/
|
||||
typedef struct StreamChannel StreamChannel;
|
||||
typedef struct StreamChannelClass StreamChannelClass;
|
||||
struct StreamChannel;
|
||||
struct StreamChannelClass;
|
||||
|
||||
#define TYPE_STREAM_CHANNEL stream_channel_get_type()
|
||||
|
||||
@ -69,10 +69,10 @@ typedef void (*stream_channel_start_proc)(void *opaque, struct StreamMsgStartSto
|
||||
void stream_channel_register_start_cb(StreamChannel *channel,
|
||||
stream_channel_start_proc cb, void *opaque);
|
||||
|
||||
typedef struct StreamQueueStat {
|
||||
struct StreamQueueStat {
|
||||
uint32_t num_items;
|
||||
uint32_t size;
|
||||
} StreamQueueStat;
|
||||
};
|
||||
|
||||
typedef void (*stream_channel_queue_stat_proc)(void *opaque, const StreamQueueStat *stats,
|
||||
StreamChannel *channel);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user