Fix hamlib_port_t_deprecated backwards compatiblity

https://github.com/Hamlib/Hamlib/issues/894
pull/948/head
Mike Black W9MDB 2022-01-27 06:42:05 -06:00
rodzic fab7f4d54c
commit 78b9ad122e
1 zmienionych plików z 6 dodań i 11 usunięć

Wyświetl plik

@ -2166,6 +2166,10 @@ typedef struct hamlib_async_pipe hamlib_async_pipe_t;
* Of course, looks like OO painstakingly programmed in C, sigh.
*/
//! @cond Doxygen_Suppress
// DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0
// Right now it is static inside rig structure
// 5.0 will change it to a pointer which can then be added to
// At that point only add to the end of the stucture
typedef struct hamlib_port {
union {
rig_port_t rig; /*!< Communication port type */
@ -2238,6 +2242,8 @@ typedef struct hamlib_port {
} hamlib_port_t;
// DO NOT CHANGE THIS STRUCTURE AT ALL
// Will be removed in 5.0
typedef struct hamlib_port_deprecated {
union {
rig_port_t rig; /*!< Communication port type */
@ -2297,17 +2303,6 @@ typedef struct hamlib_port_deprecated {
} parm; /*!< Port parameter union */
int client_port; /*!< client socket port for tcp connection */
RIG *rig; /*!< our parent RIG device */
int asyncio; /*!< enable asynchronous data handling if true -- async collides with python keyword so _async is used */
#if defined(_WIN32)
hamlib_async_pipe_t *sync_data_pipe; /*!< pipe data structure for synchronous data */
hamlib_async_pipe_t *sync_data_error_pipe; /*!< pipe data structure for synchronous data error codes */
#else
int fd_sync_write; /*!< file descriptor for writing synchronous data */
int fd_sync_read; /*!< file descriptor for reading synchronous data */
int fd_sync_error_write; /*!< file descriptor for writing synchronous data error codes */
int fd_sync_error_read; /*!< file descriptor for reading synchronous data error codes */
#endif
} hamlib_port_t_deprecated;
//! @endcond