diff --git a/include/wsrep/gtid.hpp b/include/wsrep/gtid.hpp index 9d5c295..0d49c58 100644 --- a/include/wsrep/gtid.hpp +++ b/include/wsrep/gtid.hpp @@ -80,14 +80,41 @@ namespace wsrep ssize_t scan_from_c_str(const char* buf, size_t buf_len, wsrep::gtid& gtid); + /* + * Deprecated version of the above for backwards compatibility. + * Will be removed when all the superprojects have been updated. + */ + static inline ssize_t gtid_scan_from_c_str(const char* buf, size_t buf_len, + wsrep::gtid& gtid) + { + return scan_from_c_str(buf, buf_len, gtid); + } + /** * Print a GTID into character buffer. + * + * @param gtid GTID to be printed. * @param buf Pointer to the beginning of the buffer * @param buf_len Buffer length * * @return Number of characters printed or negative value for error */ - ssize_t print_to_c_str(const wsrep::gtid&, char* buf, size_t buf_len); + ssize_t print_to_c_str(const wsrep::gtid& gtid, char* buf, size_t buf_len); + + /* + * Deprecated version of the above for backwards compatibility. + * Will be removed when all the superprojects have been updated. + */ + static inline ssize_t gtid_print_to_c_str(const wsrep::gtid& gtid, + char* buf, size_t buf_len) + { + return print_to_c_str(gtid, buf, buf_len); + } + + /** + * Return minimum number of chars required to store any GTID. + */ + static inline size_t gtid_c_str_len() { return WSREP_LIB_GTID_C_STR_LEN; } /** * Overload for ostream operator<<. diff --git a/wsrep-API/CMakeLists.txt b/wsrep-API/CMakeLists.txt index 20ab27d..51bf81a 100644 --- a/wsrep-API/CMakeLists.txt +++ b/wsrep-API/CMakeLists.txt @@ -1,4 +1,6 @@ add_library(wsrep_api_v26 v26/wsrep_dummy.c + v26/wsrep_gtid.c v26/wsrep_loader.c + v26/wsrep_uuid.c )