mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-25 22:18:58 +00:00
Remove useless typedefs
Just use forward declaration if needed. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
parent
55897eba0f
commit
d17e7878cb
@ -24,12 +24,12 @@
|
||||
#include <common/canvas_base.h>
|
||||
#include <common/ring.h>
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
#include "push-visibility.h"
|
||||
|
||||
/* FIXME: move back to display-channel.h (once structs are private) */
|
||||
typedef struct Drawable Drawable;
|
||||
struct Drawable;
|
||||
|
||||
typedef struct ImageCacheItem {
|
||||
struct ImageCacheItem {
|
||||
RingItem lru_link;
|
||||
uint64_t id;
|
||||
#ifdef IMAGE_CACHE_AGE
|
||||
@ -37,11 +37,11 @@ typedef struct ImageCacheItem {
|
||||
#endif
|
||||
struct ImageCacheItem *next;
|
||||
pixman_image_t *image;
|
||||
} ImageCacheItem;
|
||||
};
|
||||
|
||||
#define IMAGE_CACHE_HASH_SIZE 1024
|
||||
|
||||
typedef struct ImageCache {
|
||||
struct ImageCache {
|
||||
SpiceImageCache base;
|
||||
ImageCacheItem *hash_table[IMAGE_CACHE_HASH_SIZE];
|
||||
Ring lru;
|
||||
@ -50,7 +50,7 @@ typedef struct ImageCache {
|
||||
#else
|
||||
uint32_t num_items;
|
||||
#endif
|
||||
} ImageCache;
|
||||
};
|
||||
|
||||
void image_cache_init (ImageCache *cache);
|
||||
void image_cache_reset (ImageCache *cache);
|
||||
@ -62,6 +62,6 @@ void image_cache_localize_brush (ImageCache *cache, SpiceBrush *brush
|
||||
void image_cache_localize_mask (ImageCache *cache, SpiceQMask *mask,
|
||||
SpiceImage *image_store);
|
||||
|
||||
SPICE_END_DECLS
|
||||
#include "pop-visibility.h"
|
||||
|
||||
#endif /* IMAGE_CACHE_H_ */
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
#include "red-channel.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
#include "push-visibility.h"
|
||||
|
||||
#define MAX_CACHE_CLIENTS 4
|
||||
|
||||
@ -32,9 +32,6 @@ SPICE_BEGIN_DECLS
|
||||
#define BITS_CACHE_HASH_MASK (BITS_CACHE_HASH_SIZE - 1)
|
||||
#define BITS_CACHE_HASH_KEY(id) ((id) & BITS_CACHE_HASH_MASK)
|
||||
|
||||
typedef struct PixmapCache PixmapCache;
|
||||
typedef struct NewCacheItem NewCacheItem;
|
||||
|
||||
struct NewCacheItem {
|
||||
RingItem lru_link;
|
||||
NewCacheItem *next;
|
||||
@ -74,6 +71,6 @@ void pixmap_cache_clear(PixmapCache *cache);
|
||||
int pixmap_cache_unlocked_set_lossy(PixmapCache *cache, uint64_t id, int lossy);
|
||||
bool pixmap_cache_freeze(PixmapCache *cache);
|
||||
|
||||
SPICE_END_DECLS
|
||||
#include "pop-visibility.h"
|
||||
|
||||
#endif /* PIXMAP_CACHE_H_ */
|
||||
|
||||
@ -82,13 +82,13 @@ struct RedMessage final: public RedQXLResource<RedMessage> {
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
typedef struct RedSurfaceCreate {
|
||||
struct RedSurfaceCreate {
|
||||
uint32_t format;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
int32_t stride;
|
||||
uint8_t *data;
|
||||
} RedSurfaceCreate;
|
||||
};
|
||||
|
||||
struct RedSurfaceCmd final: public RedQXLResource<RedSurfaceCmd> {
|
||||
~RedSurfaceCmd();
|
||||
|
||||
@ -62,11 +62,11 @@ static void hexdump_qxl(RedMemSlotInfo *slots, int group_id,
|
||||
/* TODO: make this thread safe (required for two qxl devices) */
|
||||
|
||||
#if WITH_ZLIB
|
||||
typedef struct RecordEncoderData {
|
||||
struct RecordEncoderData {
|
||||
ZlibEncoderUsrContext base;
|
||||
uint8_t *buf;
|
||||
int size;
|
||||
} RecordEncoderData;
|
||||
};
|
||||
|
||||
static int record_zlib_more_space(ZlibEncoderUsrContext *usr, uint8_t **io_ptr)
|
||||
{
|
||||
|
||||
@ -32,46 +32,46 @@
|
||||
#define MIGRATE_TIMEOUT (MSEC_PER_SEC * 10)
|
||||
#define MM_TIME_DELTA 400 /*ms*/
|
||||
|
||||
typedef struct TicketAuthentication {
|
||||
struct TicketAuthentication {
|
||||
char password[SPICE_MAX_PASSWORD_LENGTH];
|
||||
time_t expiration_time;
|
||||
} TicketAuthentication;
|
||||
};
|
||||
|
||||
typedef struct TicketInfo {
|
||||
struct TicketInfo {
|
||||
RSA *rsa;
|
||||
int rsa_size;
|
||||
BIGNUM *bn;
|
||||
SpiceLinkEncryptedTicket encrypted_ticket;
|
||||
} TicketInfo;
|
||||
};
|
||||
|
||||
typedef struct MonitorMode {
|
||||
struct MonitorMode {
|
||||
uint32_t x_res;
|
||||
uint32_t y_res;
|
||||
} MonitorMode;
|
||||
};
|
||||
|
||||
typedef struct RedsMigPendingLink {
|
||||
struct RedsMigPendingLink {
|
||||
SpiceLinkMess *link_msg;
|
||||
RedStream *stream;
|
||||
} RedsMigPendingLink;
|
||||
};
|
||||
|
||||
typedef struct RedsMigTargetClient {
|
||||
struct RedsMigTargetClient {
|
||||
RedClient *client;
|
||||
GList *pending_links;
|
||||
} RedsMigTargetClient;
|
||||
};
|
||||
|
||||
typedef struct ChannelSecurityOptions ChannelSecurityOptions;
|
||||
struct ChannelSecurityOptions;
|
||||
|
||||
typedef struct RedSSLParameters {
|
||||
struct RedSSLParameters {
|
||||
char keyfile_password[256];
|
||||
char certs_file[256];
|
||||
char private_key_file[256];
|
||||
char ca_certificate_file[256];
|
||||
char dh_key_file[256];
|
||||
char ciphersuite[256];
|
||||
} RedSSLParameters;
|
||||
};
|
||||
|
||||
typedef struct RedCharDeviceVDIPort RedCharDeviceVDIPort;
|
||||
typedef struct RedServerConfig RedServerConfig;
|
||||
struct RedCharDeviceVDIPort;
|
||||
struct RedServerConfig;
|
||||
|
||||
struct RedsState {
|
||||
SPICE_CXX_GLIB_ALLOCATOR
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "spice-bitmap-utils.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
#include "push-visibility.h"
|
||||
|
||||
enum {
|
||||
TREE_ITEM_TYPE_NONE,
|
||||
@ -36,10 +36,7 @@ enum {
|
||||
TREE_ITEM_TYPE_LAST,
|
||||
};
|
||||
|
||||
typedef struct TreeItem TreeItem;
|
||||
typedef struct Shadow Shadow;
|
||||
typedef struct Container Container;
|
||||
typedef struct DrawItem DrawItem;
|
||||
struct Container;
|
||||
|
||||
/* TODO consider GNode instead */
|
||||
struct TreeItem {
|
||||
@ -99,6 +96,6 @@ Container* container_new (DrawItem *item);
|
||||
void container_free (Container *container);
|
||||
void container_cleanup (Container *container);
|
||||
|
||||
SPICE_END_DECLS
|
||||
#include "pop-visibility.h"
|
||||
|
||||
#endif /* TREE_H_ */
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
#include "red-channel.h"
|
||||
#include "dcc.h"
|
||||
|
||||
SPICE_BEGIN_DECLS
|
||||
#include "push-visibility.h"
|
||||
|
||||
#define RED_STREAM_DETECTION_MAX_DELTA (NSEC_PER_SEC / 5)
|
||||
#define RED_STREAM_CONTINUOUS_MAX_DELTA NSEC_PER_SEC
|
||||
@ -45,10 +45,10 @@ SPICE_BEGIN_DECLS
|
||||
#define RED_STREAM_DEFAULT_LOW_START_BIT_RATE (2.5 * 1024 * 1024) // 2.5Mbps
|
||||
#define MAX_FPS 30
|
||||
|
||||
typedef struct VideoStream VideoStream;
|
||||
struct VideoStream;
|
||||
|
||||
#ifdef STREAM_STATS
|
||||
typedef struct StreamStats {
|
||||
struct StreamStats {
|
||||
uint64_t num_drops_pipe;
|
||||
uint64_t num_drops_fps;
|
||||
uint64_t num_frames_sent;
|
||||
@ -57,10 +57,10 @@ typedef struct StreamStats {
|
||||
|
||||
uint64_t start;
|
||||
uint64_t end;
|
||||
} StreamStats;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct VideoStreamAgent {
|
||||
struct VideoStreamAgent {
|
||||
QRegion vis_region; /* the part of the surface area that is currently occupied by video
|
||||
fragments */
|
||||
QRegion clip; /* the current video clipping. It can be different from vis_region:
|
||||
@ -79,7 +79,7 @@ typedef struct VideoStreamAgent {
|
||||
#ifdef STREAM_STATS
|
||||
StreamStats stats;
|
||||
#endif
|
||||
} VideoStreamAgent;
|
||||
};
|
||||
|
||||
struct VideoStreamClipItem: public RedPipeItem {
|
||||
VideoStreamClipItem(VideoStreamAgent *agent);
|
||||
@ -96,7 +96,7 @@ struct StreamCreateDestroyItem: public RedPipeItem {
|
||||
VideoStreamAgent *agent;
|
||||
};
|
||||
|
||||
typedef struct ItemTrace {
|
||||
struct ItemTrace {
|
||||
red_time_t time;
|
||||
red_time_t first_frame_time;
|
||||
int frames_count;
|
||||
@ -105,7 +105,7 @@ typedef struct ItemTrace {
|
||||
int width;
|
||||
int height;
|
||||
SpiceRect dest_area;
|
||||
} ItemTrace;
|
||||
};
|
||||
|
||||
struct VideoStream {
|
||||
uint8_t refs;
|
||||
@ -139,6 +139,6 @@ void video_stream_agent_stop(VideoStreamAgent *agent);
|
||||
|
||||
void video_stream_detach_drawable(VideoStream *stream);
|
||||
|
||||
SPICE_END_DECLS
|
||||
#include "pop-visibility.h"
|
||||
|
||||
#endif /* VIDEO_STREAM_H_ */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user