aboutsummaryrefslogtreecommitdiffstats
path: root/android/console.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-01-26 11:19:19 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-01-28 09:14:01 -0800
commit777eb68eb60cac18f4b62e2e1b14a906875cbe7a (patch)
tree5850f03e01bb348ad7fc4e92dd08695416650c48 /android/console.c
parent316669d58104cb260e2ffa1848f24547b71af49c (diff)
downloadexternal_qemu-777eb68eb60cac18f4b62e2e1b14a906875cbe7a.zip
external_qemu-777eb68eb60cac18f4b62e2e1b14a906875cbe7a.tar.gz
external_qemu-777eb68eb60cac18f4b62e2e1b14a906875cbe7a.tar.bz2
Refactored ui-core-control and core-ui-control protocols
Also cleaned the code up from obsolete ui-core-protocol.* and core-ui-protocol.* Change-Id: I194bec669d25b68a10c32b2be50bc9da50c52ebb
Diffstat (limited to 'android/console.c')
-rw-r--r--android/console.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/android/console.c b/android/console.c
index 81c2efe..42c3eb6 100644
--- a/android/console.c
+++ b/android/console.c
@@ -50,11 +50,12 @@
#include "user-events.h"
#include "android/keycode-array.h"
#include "android/charmap.h"
-#include "android/core-ui-protocol.h"
#include "android/display-core.h"
#include "android/framebuffer-core.h"
#include "android/user-events-core.h"
-#include "android/ui-ctl-core.h"
+#include "android/protocol/ui-commands-api.h"
+#include "android/protocol/core-commands-impl.h"
+#include "android/protocol/ui-commands-proxy.h"
#if defined(CONFIG_SLIRP)
#include "libslirp.h"
@@ -263,12 +264,12 @@ control_client_destroy( ControlClient client )
}
if (client == ui_core_ctl_client) {
- uicorectl_destroy();
+ coreCmdImpl_destroy();
ui_core_ctl_client = NULL;
}
if (client == core_ui_ctl_client) {
- coreuictl_destroy();
+ uiCmdProxy_destroy();
core_ui_ctl_client = NULL;
}
#endif // CONFIG_STANDALONE_CORE
@@ -2443,7 +2444,7 @@ do_window_scale( ControlClient client, char* args )
}
}
- android_ui_set_window_scale( scale, is_dpi );
+ uicmd_set_window_scale( scale, is_dpi );
return 0;
}
@@ -2624,7 +2625,7 @@ do_create_ui_core_ctl_service( ControlClient client, char* args )
return -1;
}
- if (!uicorectl_create(client->sock)) {
+ if (!coreCmdImpl_create(client->sock)) {
char reply_buf[4096];
ui_core_ctl_client = client;
snprintf(reply_buf, sizeof(reply_buf), "OK\r\n");
@@ -2646,6 +2647,14 @@ destroy_ui_core_ctl_client(void)
}
}
+void
+destroy_corecmd_client(void)
+{
+ if (ui_core_ctl_client != NULL) {
+ control_client_destroy(ui_core_ctl_client);
+ }
+}
+
static int
do_create_core_ui_ctl_service( ControlClient client, char* args )
{
@@ -2656,7 +2665,7 @@ do_create_core_ui_ctl_service( ControlClient client, char* args )
return -1;
}
- if (!coreuictl_create(client->sock)) {
+ if (!uiCmdProxy_create(client->sock)) {
char reply_buf[4096];
core_ui_ctl_client = client;
snprintf(reply_buf, sizeof(reply_buf), "OK\r\n");
@@ -2677,6 +2686,15 @@ destroy_core_ui_ctl_client(void)
control_client_destroy(core_ui_ctl_client);
}
}
+
+void
+destroy_uicmd_client(void)
+{
+ if (core_ui_ctl_client != NULL) {
+ control_client_destroy(core_ui_ctl_client);
+ }
+}
+
#endif // CONFIG_STANDALONE_CORE
static const CommandDefRec qemu_commands[] =