Line data Source code
1 : /* 2 : * Copyright (C) 2004-2024 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 : #include <ciso646> // fix windows compiler bug 27 : 28 : #ifndef JAMI_REVISION 29 : #define JAMI_REVISION "" 30 : #endif 31 : 32 : #ifndef JAMI_DIRTY_REPO 33 : #define JAMI_DIRTY_REPO "" 34 : #endif 35 : 36 : #ifndef PACKAGE_VERSION 37 : #define PACKAGE_VERSION "unknown" 38 : #endif 39 : 40 : namespace libjami { 41 : 42 : const char* 43 44 : version() noexcept 44 : { 45 44 : return JAMI_REVISION[0] and JAMI_DIRTY_REPO[0] 46 88 : ? PACKAGE_VERSION "-" JAMI_REVISION "-" JAMI_DIRTY_REPO 47 88 : : (JAMI_REVISION[0] ? PACKAGE_VERSION "-" JAMI_REVISION : PACKAGE_VERSION); 48 : } 49 : 50 : std::string_view 51 0 : platform() noexcept 52 : { 53 0 : return jami::platform(); 54 : } 55 : 56 : std::string_view 57 0 : arch() noexcept 58 : { 59 0 : return jami::arch(); 60 : } 61 : 62 : } // namespace libjami