[Spice-devel] [PATCH 07/18] fix visibility
Gerd Hoffmann
kraxel at redhat.com
Mon Mar 29 08:08:43 PDT 2010
---
server/reds.c | 54 ++++++++++++++++++++++++++++--------------------------
server/spice.h | 2 ++
2 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index 0c3d682..75a24f0 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -4332,14 +4332,14 @@ static void do_spice_init(CoreInterface *core_interface)
atexit(reds_exit);
}
-void __attribute__ ((visibility ("default"))) spice_init(CoreInterface *core_interface)
+__visible__ void spice_init(CoreInterface *core_interface)
{
spice_server_new();
do_spice_init(core_interface);
}
/* new interface */
-SpiceServer *spice_server_new(void)
+__visible__ SpiceServer *spice_server_new(void)
{
/* we can't handle multiple instances (yet) */
ASSERT(reds == NULL);
@@ -4348,7 +4348,7 @@ SpiceServer *spice_server_new(void)
return reds;
}
-int spice_server_init(SpiceServer *s, CoreInterface *core)
+__visible__ int spice_server_init(SpiceServer *s, CoreInterface *core)
{
ASSERT(reds == s);
do_spice_init(core);
@@ -4358,13 +4358,13 @@ int spice_server_init(SpiceServer *s, CoreInterface *core)
return 0;
}
-void spice_server_destroy(SpiceServer *s)
+__visible__ void spice_server_destroy(SpiceServer *s)
{
ASSERT(reds == s);
reds_exit();
}
-int spice_server_set_port(SpiceServer *s, int port)
+__visible__ int spice_server_set_port(SpiceServer *s, int port)
{
ASSERT(reds == s);
if (port < 0 || port > 0xffff) {
@@ -4374,7 +4374,7 @@ int spice_server_set_port(SpiceServer *s, int port)
return 0;
}
-void spice_server_set_addr(SpiceServer *s, const char *addr, int flags)
+__visible__ void spice_server_set_addr(SpiceServer *s, const char *addr, int flags)
{
ASSERT(reds == s);
strncpy(spice_addr, addr, sizeof(spice_addr));
@@ -4386,7 +4386,7 @@ void spice_server_set_addr(SpiceServer *s, const char *addr, int flags)
}
}
-int spice_server_set_noauth(SpiceServer *s)
+__visible__ int spice_server_set_noauth(SpiceServer *s)
{
ASSERT(reds == s);
memset(taTicket.password, 0, sizeof(taTicket.password));
@@ -4394,8 +4394,10 @@ int spice_server_set_noauth(SpiceServer *s)
return 0;
}
-int spice_server_set_ticket(SpiceServer *s, const char *passwd, int lifetime,
- int fail_if_connected, int disconnect_if_connected)
+__visible__ int spice_server_set_ticket(SpiceServer *s,
+ const char *passwd, int lifetime,
+ int fail_if_connected,
+ int disconnect_if_connected)
{
ASSERT(reds == s);
@@ -4425,10 +4427,10 @@ int spice_server_set_ticket(SpiceServer *s, const char *passwd, int lifetime,
return 0;
}
-int spice_server_set_tls(SpiceServer *s, int port,
- const char *ca_cert_file, const char *certs_file,
- const char *private_key_file, const char *key_passwd,
- const char *dh_key_file, const char *ciphersuite)
+__visible__ int spice_server_set_tls(SpiceServer *s, int port,
+ const char *ca_cert_file, const char *certs_file,
+ const char *private_key_file, const char *key_passwd,
+ const char *dh_key_file, const char *ciphersuite)
{
ASSERT(reds == s);
if (port == 0 || ca_cert_file == NULL || certs_file == NULL ||
@@ -4463,36 +4465,36 @@ int spice_server_set_tls(SpiceServer *s, int port,
return 0;
}
-int spice_server_set_image_compression(SpiceServer *s,
- spice_image_compression_t comp)
+__visible__ int spice_server_set_image_compression(SpiceServer *s,
+ spice_image_compression_t comp)
{
ASSERT(reds == s);
set_image_compression(comp);
return 0;
}
-spice_image_compression_t spice_server_get_image_compression(SpiceServer *s)
+__visible__ spice_image_compression_t spice_server_get_image_compression(SpiceServer *s)
{
ASSERT(reds == s);
return image_compression;
}
-int spice_server_set_channel_security(SpiceServer *s,
- int channel, int security)
+__visible__ int spice_server_set_channel_security(SpiceServer *s,
+ int channel, int security)
{
ASSERT(reds == s);
set_one_channel_security(channel, security);
return 0;
}
-int spice_server_set_default_channel_security(SpiceServer *s, int security)
+__visible__ int spice_server_set_default_channel_security(SpiceServer *s, int security)
{
ASSERT(reds == s);
default_channel_security = security;
return 0;
}
-int spice_server_set_mouse_absolute(SpiceServer *s, int absolute)
+__visible__ int spice_server_set_mouse_absolute(SpiceServer *s, int absolute)
{
uint32_t mode = absolute ? SPICE_MOUSE_MODE_CLIENT : SPICE_MOUSE_MODE_SERVER;
@@ -4501,7 +4503,7 @@ int spice_server_set_mouse_absolute(SpiceServer *s, int absolute)
return 0;
}
-int spice_server_get_sock_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen)
+__visible__ int spice_server_get_sock_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen)
{
ASSERT(reds == s);
if (!reds->peer) {
@@ -4513,7 +4515,7 @@ int spice_server_get_sock_info(SpiceServer *s, struct sockaddr *sa, socklen_t *s
return 0;
}
-int spice_server_get_peer_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen)
+__visible__ int spice_server_get_peer_info(SpiceServer *s, struct sockaddr *sa, socklen_t *salen)
{
ASSERT(reds == s);
if (!reds->peer) {
@@ -4525,7 +4527,7 @@ int spice_server_get_peer_info(SpiceServer *s, struct sockaddr *sa, socklen_t *s
return 0;
}
-int spice_server_add_renderer(SpiceServer *s, const char *name)
+__visible__ int spice_server_add_renderer(SpiceServer *s, const char *name)
{
ASSERT(reds == s);
if (!red_dispatcher_add_renderer(name)) {
@@ -4535,21 +4537,21 @@ int spice_server_add_renderer(SpiceServer *s, const char *name)
return 0;
}
-int spice_server_add_interface(SpiceServer *s, VDInterface *interface)
+__visible__ int spice_server_add_interface(SpiceServer *s, VDInterface *interface)
{
ASSERT(reds == s);
interface_change_notifier(NULL, interface, VD_INTERFACE_ADDING);
return 0;
}
-int spice_server_remove_interface(SpiceServer *s, VDInterface *interface)
+__visible__ int spice_server_remove_interface(SpiceServer *s, VDInterface *interface)
{
ASSERT(reds == s);
interface_change_notifier(NULL, interface, VD_INTERFACE_REMOVING);
return 0;
}
-int spice_server_kbd_leds(SpiceServer *s, KeyboardInterface *kbd, int leds)
+__visible__ int spice_server_kbd_leds(SpiceServer *s, KeyboardInterface *kbd, int leds)
{
ASSERT(reds == s);
reds_on_keyboard_leds_change(NULL, leds);
diff --git a/server/spice.h b/server/spice.h
index 9ef9d1a..b61e957 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -21,6 +21,8 @@
#include <sys/socket.h>
#include "vd_interface.h"
+#define __visible__ __attribute__ ((visibility ("default")))
+
/* old interface */
void spice_init(CoreInterface *core);
--
1.6.6.1
More information about the Spice-devel
mailing list