File: client-protocol.h

package info (click to toggle)
foot 1.25.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,108 kB
  • sloc: ansic: 41,260; python: 474; sh: 181; xml: 57; makefile: 18
file content (45 lines) | stat: -rw-r--r-- 955 bytes parent folder | download
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
#pragma once

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

struct client_string {
    uint16_t len;
    /* char str[static len]; */
};

struct client_data {
    bool hold:1;
    bool no_wait:1;
    bool xdga_token:1;
    uint8_t reserved:5;

    uint8_t token_len;
    uint16_t cwd_len;
    uint16_t override_count;
    uint16_t argc;
    uint16_t env_count;

    /* char cwd[static cwd_len]; */
    /* char token[static token_len]; */
    /* struct client_string overrides[static override_count]; */
    /* struct client_string argv[static argc]; */
    /* struct client_string envp[static env_count]; */
} __attribute__((packed));

_Static_assert(sizeof(struct client_data) == 10, "protocol struct size error");

enum client_ipc_code {
    FOOT_IPC_SIGUSR,
};

struct client_ipc_hdr {
    enum client_ipc_code ipc_code;
    uint8_t size;
} __attribute__((packed));


struct client_ipc_sigusr {
    int signo;
} __attribute__((packed));