aboutsummaryrefslogtreecommitdiff
path: root/src/proxy/proxy_common.h
blob: 920b0f355d2f893537940ccf8ffffe2718eedb81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: MIT
 */

#ifndef PROXY_COMMON_H
#define PROXY_COMMON_H

#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "util/hash_table.h"
#include "util/list.h"
#include "util/macros.h"
#include "virgl_util.h"
#include "virglrenderer.h"

#include "proxy_renderer.h"
#include "proxy_socket.h"

struct proxy_client;
struct proxy_context;
struct proxy_server;
struct proxy_socket;

struct proxy_renderer {
   const struct proxy_renderer_cbs *cbs;
   uint32_t flags;

   struct proxy_server *server;
   struct proxy_client *client;
};

extern struct proxy_renderer proxy_renderer;

void
proxy_log(const char *fmt, ...);

#endif /* PROXY_COMMON_H */