Add more grpc - Asyncstuff
[src/agl-compositor.git] / clients / main-grpc.h
1 #pragma once
2
3 #include <cstdio>
4 #include <algorithm>
5 #include <queue>
6 #include <mutex>
7 #include <condition_variable>
8 #include <wayland-client.h>
9
10 #include "agl_shell.grpc.pb.h"
11
12 // forward declaration created in grpc-async-cb
13 class Lister;
14
15 struct shell_data {
16         struct wl_display *wl_display;
17         struct agl_shell *shell;
18         struct agl_shell_ext *shell_ext;
19
20         bool wait_for_bound;
21         bool wait_for_doas;
22
23         bool bound_ok;
24         bool doas_ok;
25
26         uint32_t version;
27         struct wl_list output_list;     /** window_output::link */
28
29         ::agl_shell_ipc::AppState current_app_state;
30         std::list<std::pair<grpc::CallbackServerContext*, Lister *> > server_context_list;
31 };
32
33 struct window_output {
34         struct shell_data *shell_data;
35         struct wl_output *output;
36         char *name;
37         struct wl_list link;    /** display::output_list */
38 };