Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file context.h |
| 3 | * @author Radek Krejci <rkrejci@cesnet.cz> |
| 4 | * @brief internal context structures and functions |
| 5 | * |
| 6 | * Copyright (c) 2015 - 2017 CESNET, z.s.p.o. |
| 7 | * |
| 8 | * This source code is licensed under BSD 3-Clause License (the "License"). |
| 9 | * You may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * https://opensource.org/licenses/BSD-3-Clause |
| 13 | */ |
| 14 | |
| 15 | #ifndef LY_CONTEXT_H_ |
| 16 | #define LY_CONTEXT_H_ |
| 17 | |
| 18 | #include <pthread.h> |
| 19 | |
| 20 | #include "common.h" |
Radek Krejci | ad57350 | 2018-09-07 15:26:55 +0200 | [diff] [blame] | 21 | #include "set.h" |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 22 | #include "hash_table.h" |
| 23 | #include "tree_schema.h" |
| 24 | |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 25 | /** |
| 26 | * @brief Context of the YANG schemas |
| 27 | */ |
| 28 | struct ly_ctx { |
Radek Krejci | 0af5f5d | 2018-09-07 15:00:30 +0200 | [diff] [blame] | 29 | struct dict_table dict; /**< dictionary to effectively store strings used in the context related structures */ |
| 30 | struct ly_set search_paths; /**< set of directories where to search for schema's imports/includes */ |
| 31 | struct ly_set list; /**< set of YANG schemas */ |
| 32 | uint16_t module_set_id; /**< ID of the current set of schemas */ |
| 33 | uint16_t flags; /**< context settings, see @ref contextoptions. */ |
| 34 | pthread_key_t errlist_key; /**< key for the thread-specific list of errors related to the context */ |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 35 | }; |
| 36 | |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 37 | #endif /* LY_CONTEXT_H_ */ |