]> git.proxmox.com Git - spiceterm.git/blame - test_display_no_ssl.c
Initial import
[spiceterm.git] / test_display_no_ssl.c
CommitLineData
cc04455b
DM
1/**
2 * Test ground for developing specific tests.
3 *
4 * Any specific test can start of from here and set the server to the
5 * specific required state, and create specific operations or reuse
6 * existing ones in the test_display_base supplied queue.
7 */
8
9#include <stdlib.h>
10#include "test_display_base.h"
11
12SpiceCoreInterface *core;
13SpiceTimer *ping_timer;
14
15void show_channels(SpiceServer *server);
16
17int ping_ms = 100;
18
19void pinger(void *opaque)
20{
21 // show_channels is not thread safe - fails if disconnections / connections occur
22 //show_channels(server);
23
24 core->timer_start(ping_timer, ping_ms);
25}
26
27int simple_commands[] = {
28 //SIMPLE_CREATE_SURFACE,
29 //SIMPLE_DRAW,
30 //SIMPLE_DESTROY_SURFACE,
31 //PATH_PROGRESS,
32 SIMPLE_DRAW,
33 //SIMPLE_COPY_BITS,
34 SIMPLE_UPDATE,
35};
36
37int main(void)
38{
39 Test *test;
40
41 core = basic_event_loop_init();
42 test = test_new(core);
43 //spice_server_set_image_compression(server, SPICE_IMAGE_COMPRESS_OFF);
44 test_add_display_interface(test);
45 test_add_agent_interface(test->server);
46 test_set_simple_command_list(test, simple_commands, COUNT(simple_commands));
47
48 ping_timer = core->timer_add(pinger, NULL);
49 core->timer_start(ping_timer, ping_ms);
50
51 basic_event_loop_mainloop();
52
53 return 0;
54}