xref: /aosp_15_r20/external/virglrenderer/src/proxy/proxy_client.h (revision bbecb9d118dfdb95f99bd754f8fa9be01f189df3)
1*bbecb9d1SAndroid Build Coastguard Worker /*
2*bbecb9d1SAndroid Build Coastguard Worker  * Copyright 2021 Google LLC
3*bbecb9d1SAndroid Build Coastguard Worker  * SPDX-License-Identifier: MIT
4*bbecb9d1SAndroid Build Coastguard Worker  */
5*bbecb9d1SAndroid Build Coastguard Worker 
6*bbecb9d1SAndroid Build Coastguard Worker #ifndef PROXY_CLIENT_H
7*bbecb9d1SAndroid Build Coastguard Worker #define PROXY_CLIENT_H
8*bbecb9d1SAndroid Build Coastguard Worker 
9*bbecb9d1SAndroid Build Coastguard Worker #include "proxy_common.h"
10*bbecb9d1SAndroid Build Coastguard Worker 
11*bbecb9d1SAndroid Build Coastguard Worker struct proxy_client {
12*bbecb9d1SAndroid Build Coastguard Worker    struct proxy_socket socket;
13*bbecb9d1SAndroid Build Coastguard Worker };
14*bbecb9d1SAndroid Build Coastguard Worker 
15*bbecb9d1SAndroid Build Coastguard Worker struct proxy_client *
16*bbecb9d1SAndroid Build Coastguard Worker proxy_client_create(struct proxy_server *srv, uint32_t flags);
17*bbecb9d1SAndroid Build Coastguard Worker 
18*bbecb9d1SAndroid Build Coastguard Worker void
19*bbecb9d1SAndroid Build Coastguard Worker proxy_client_destroy(struct proxy_client *client);
20*bbecb9d1SAndroid Build Coastguard Worker 
21*bbecb9d1SAndroid Build Coastguard Worker bool
22*bbecb9d1SAndroid Build Coastguard Worker proxy_client_reset(struct proxy_client *client);
23*bbecb9d1SAndroid Build Coastguard Worker 
24*bbecb9d1SAndroid Build Coastguard Worker bool
25*bbecb9d1SAndroid Build Coastguard Worker proxy_client_create_context(struct proxy_client *client,
26*bbecb9d1SAndroid Build Coastguard Worker                             uint32_t ctx_id,
27*bbecb9d1SAndroid Build Coastguard Worker                             size_t ctx_name_len,
28*bbecb9d1SAndroid Build Coastguard Worker                             const char *ctx_name,
29*bbecb9d1SAndroid Build Coastguard Worker                             int *out_ctx_fd);
30*bbecb9d1SAndroid Build Coastguard Worker 
31*bbecb9d1SAndroid Build Coastguard Worker bool
32*bbecb9d1SAndroid Build Coastguard Worker proxy_client_destroy_context(struct proxy_client *client, uint32_t ctx_id);
33*bbecb9d1SAndroid Build Coastguard Worker 
34*bbecb9d1SAndroid Build Coastguard Worker #endif /* PROXY_CLIENT_H */
35