]> git.stg.codes - stg.git/blob - libs/smux/include/stg/asn_ioc.h
Merge remote-tracking branch 'github/master'
[stg.git] / libs / smux / include / stg / asn_ioc.h
1 /*
2  * Run-time support for Information Object Classes.
3  * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
4  * Redistribution and modifications are permitted subject to BSD license.
5  */
6 #ifndef ASN_IOC_H
7 #define ASN_IOC_H
8
9 #include <asn_system.h>         /* Platform-specific types */
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 struct asn_TYPE_descriptor_s;
16 struct asn_ioc_cell_s;
17
18 /*
19  * X.681, #13
20  */
21 typedef struct asn_ioc_set_s {
22     size_t rows_count;
23     size_t columns_count;
24     const struct asn_ioc_cell_s *rows;
25 } asn_ioc_set_t;
26
27
28 typedef struct asn_ioc_cell_s {
29     const char *field_name; /* Is equal to corresponding column_name */
30     enum {
31         aioc__value,
32         aioc__type,
33         aioc__open_type,
34     } cell_kind;
35     struct asn_TYPE_descriptor_s *type_descriptor;
36     const void *value_sptr;
37     struct {
38         size_t types_count;
39         struct {
40             unsigned choice_position;
41         } *types;
42     } open_type;
43 } asn_ioc_cell_t;
44
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif  /* ASN_IOC_H */