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" |
| 21 | #include "hash_table.h" |
| 22 | #include "tree_schema.h" |
| 23 | |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 24 | /** |
| 25 | * @brief Context of the YANG schemas |
| 26 | */ |
| 27 | struct ly_ctx { |
Radek Krejci | 0af5f5d | 2018-09-07 15:00:30 +0200 | [diff] [blame^] | 28 | struct dict_table dict; /**< dictionary to effectively store strings used in the context related structures */ |
| 29 | struct ly_set search_paths; /**< set of directories where to search for schema's imports/includes */ |
| 30 | struct ly_set list; /**< set of YANG schemas */ |
| 31 | uint16_t module_set_id; /**< ID of the current set of schemas */ |
| 32 | uint16_t flags; /**< context settings, see @ref contextoptions. */ |
| 33 | 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] | 34 | }; |
| 35 | |
Radek Krejci | 5aeea3a | 2018-09-05 13:29:36 +0200 | [diff] [blame] | 36 | #endif /* LY_CONTEXT_H_ */ |