[5821] | 1 | //service-about.c: |
---|
| 2 | |
---|
| 3 | /* |
---|
[5961] | 4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2013-2014 |
---|
[5821] | 5 | * |
---|
| 6 | * This file is part of roard a part of RoarAudio, |
---|
| 7 | * a cross-platform sound system for both, home and professional use. |
---|
| 8 | * See README for details. |
---|
| 9 | * |
---|
| 10 | * This file is free software; you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License version 3 |
---|
| 12 | * as published by the Free Software Foundation. |
---|
| 13 | * |
---|
| 14 | * RoarAudio is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this software; see the file COPYING. If not, write to |
---|
| 21 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
| 22 | * Boston, MA 02110-1301, USA. |
---|
| 23 | * |
---|
| 24 | */ |
---|
| 25 | |
---|
| 26 | #include <roaraudio.h> |
---|
| 27 | |
---|
[5822] | 28 | static int __show(const struct roar_dl_libraryname * libname) { |
---|
[5821] | 29 | struct roar_vio_calls * vio = roar_stdout; |
---|
| 30 | |
---|
| 31 | roar_vio_printf(vio, "---[ About %s ]---\n", libname->name); |
---|
| 32 | #define _var(x,y) \ |
---|
| 33 | if ( libname->x != NULL ) \ |
---|
| 34 | roar_vio_printf(vio, " %-16s: %s\n", y, libname->x); |
---|
| 35 | _var(libname, "Full Name"); |
---|
| 36 | _var(libversion, "Full Version"); |
---|
| 37 | _var(abiversion, "ABI Version"); |
---|
| 38 | _var(description, "Description"); |
---|
| 39 | _var(contact, "Contact"); |
---|
| 40 | _var(authors, "Other Authors"); |
---|
| 41 | _var(license, "License"); |
---|
| 42 | roar_vio_printf(vio, "---[ End of About ]---\n"); |
---|
| 43 | return 0; |
---|
| 44 | } |
---|
| 45 | |
---|
[5822] | 46 | static struct roar_service_about api = {.show = __show}; |
---|
[5821] | 47 | |
---|
| 48 | ROAR_DL_PLUGIN_REG_SERVICES_GET_API(get_api, api) |
---|
| 49 | |
---|
| 50 | static const struct roar_dl_service service[1] = { |
---|
| 51 | { |
---|
| 52 | .appname = NULL, |
---|
| 53 | .appabi = NULL, |
---|
| 54 | .servicename = ROAR_SERVICE_ABOUT_NAME, |
---|
| 55 | .serviceabi = ROAR_SERVICE_ABOUT_ABI, |
---|
| 56 | .description = "About dialog display API", |
---|
| 57 | .flags = ROAR_DL_SERVICE_FLAGS_NONE, |
---|
| 58 | .userdata = NULL, |
---|
| 59 | .get_api = get_api |
---|
| 60 | } |
---|
| 61 | }; |
---|
| 62 | |
---|
| 63 | ROAR_DL_PLUGIN_REG_SERVICES(service); |
---|
| 64 | |
---|
| 65 | ROAR_DL_PLUGIN_START(service_about) { |
---|
| 66 | ROAR_DL_PLUGIN_META_PRODUCT_NIV("service-about", ROAR_VID_ROARAUDIO, ROAR_VNAME_ROARAUDIO); |
---|
| 67 | ROAR_DL_PLUGIN_META_VERSION(ROAR_VERSION_STRING); |
---|
| 68 | ROAR_DL_PLUGIN_META_LICENSE_TAG(GPLv3_0); |
---|
| 69 | ROAR_DL_PLUGIN_META_CONTACT_FLNE("Philipp", "Schafft", "ph3-der-loewe", "lion@lion.leolix.org"); |
---|
| 70 | ROAR_DL_PLUGIN_META_DESC("This plugin provides a simple interface to about dialog display functions."); |
---|
| 71 | ROAR_DL_PLUGIN_REG_FNFUNC(ROAR_DL_FN_SERVICE); |
---|
| 72 | } ROAR_DL_PLUGIN_END |
---|
| 73 | |
---|
| 74 | //ll |
---|