stardis-ssconnect-prog.h (1996B)
1 /* Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SDIS_SS_CONNECT_PROG_H 17 #define SDIS_SS_CONNECT_PROG_H 18 19 #include <rsys/rsys.h> 20 #include <rsys/str.h> 21 22 #include "stardis-prog-properties.h" 23 24 struct stardis; 25 struct mem_allocator; 26 struct program; 27 28 /******************************************************************************* 29 * Solid-Solid prog data 30 ******************************************************************************/ 31 struct solid_solid_connect_prog { 32 void* prog_data; /* result of the create() call */ 33 struct str name; 34 struct str prog_name; 35 size_t argc; 36 char** argv; 37 /* lib handle and function ptrs */ 38 struct program* program; 39 void* (*create) 40 (const struct stardis_description_create_context*, void*, size_t, char**); 41 void (*release)(void*); 42 double (*tcr)(const struct stardis_interface_fragment*, void*); 43 unsigned connection_id; 44 }; 45 46 res_T 47 create_solver_ss_connect_prog 48 (struct stardis* stardis, 49 const struct solid_solid_connect_prog* connect); 50 51 res_T 52 init_ss_connect_prog 53 (struct mem_allocator* allocator, 54 struct solid_solid_connect_prog** dst); 55 56 void 57 release_ss_connect_prog 58 (struct solid_solid_connect_prog* connect, 59 struct mem_allocator* allocator); 60 61 res_T 62 str_print_ss_connect_prog 63 (struct str* str, 64 const struct solid_solid_connect_prog* connect); 65 66 #endif 67