Line data Source code
1 : /* 2 : * Copyright (C) 2004-2026 Savoir-faire Linux Inc. 3 : * 4 : * This program is free software: you can redistribute it and/or modify 5 : * it under the terms of the GNU General Public License as published by 6 : * the Free Software Foundation, either version 3 of the License, or 7 : * (at your option) any later version. 8 : * 9 : * This program is distributed in the hope that it will be useful, 10 : * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 : * GNU General Public License for more details. 13 : * 14 : * You should have received a copy of the GNU General Public License 15 : * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 : */ 17 : 18 : #ifdef HAVE_CONFIG_H 19 : #include "config.h" 20 : #endif 21 : 22 : #include "jami.h" 23 : #include "string_utils.h" 24 : #include <string> 25 : 26 : #ifndef JAMI_REVISION 27 : #define JAMI_REVISION "" 28 : #endif 29 : 30 : #ifndef JAMI_DIRTY_REPO 31 : #define JAMI_DIRTY_REPO "" 32 : #endif 33 : 34 : #ifndef PACKAGE_VERSION 35 : #define PACKAGE_VERSION "unknown" 36 : #endif 37 : 38 : namespace libjami { 39 : 40 : const char* 41 39 : version() noexcept 42 : { 43 0 : return JAMI_REVISION[0] and JAMI_DIRTY_REPO[0] 44 78 : ? PACKAGE_VERSION "-" JAMI_REVISION "-" JAMI_DIRTY_REPO 45 78 : : (JAMI_REVISION[0] ? PACKAGE_VERSION "-" JAMI_REVISION : PACKAGE_VERSION); 46 : } 47 : 48 : std::string_view 49 0 : platform() noexcept 50 : { 51 0 : return jami::platform(); 52 : } 53 : 54 : std::string_view 55 0 : arch() noexcept 56 : { 57 0 : return jami::arch(); 58 : } 59 : 60 : } // namespace libjami