Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Run-time support for Information Object Classes. |
| 3 | * Copyright (c) 2017 Lev Walkin <vlm@lionet.info>. All rights reserved. |
Lev Walkin | 086ee9a | 2017-08-08 02:05:55 -0700 | [diff] [blame] | 4 | * Redistribution and modifications are permitted subject to BSD license. |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 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 | */ |
Lev Walkin | 6aae7c6 | 2017-08-10 17:58:48 -0700 | [diff] [blame] | 21 | typedef struct asn_ioc_set_s { |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 22 | size_t rows_count; |
| 23 | size_t columns_count; |
Lev Walkin | 6aae7c6 | 2017-08-10 17:58:48 -0700 | [diff] [blame] | 24 | const struct asn_ioc_cell_s *rows; |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 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; |
Lev Walkin | 6aae7c6 | 2017-08-10 17:58:48 -0700 | [diff] [blame] | 43 | } asn_ioc_cell_t; |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 44 | |
| 45 | |
| 46 | #ifdef __cplusplus |
| 47 | } |
| 48 | #endif |
| 49 | |
| 50 | #endif /* ASN_IOC_H */ |