aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/private/connection.h
blob: 34c2fbeaacb39bf6574961d1f7638c446931895e (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
/*
 * Created by yuuta on 7/19/22.
 */

#ifndef LIBAC_CONNECTION_H
#define LIBAC_CONNECTION_H

#include "win32.h"
#include "wic.h"
#include "libac.h"
#include <stdbool.h>

/**
 * Used to transfer deserialization result from receive handler to ac_receive().
 */
struct ac_result {
    bool blocked;
    bool has_result;
    int res;
    ac_obj_t *obj;
};

/**
 * Internal representation of void *connection.
 */
struct ac_connection {
    ac_connection_parameters_t parameters;
    struct wic_inst inst;
    char *url;
    /* Result from message handler.
     * Message handling will happen at the same thread as ac_receive (lib wic). */
    struct ac_result result;
};

#endif /* LIBAC_CONNECTION_H */