16b1566cbSPaolo Bonzini /* 26b1566cbSPaolo Bonzini * Firmware patch provider class and helpers definitions. 36b1566cbSPaolo Bonzini * 46b1566cbSPaolo Bonzini * This program is free software; you can redistribute it and/or modify 56b1566cbSPaolo Bonzini * it under the terms of the GNU General Public License as published by 620c50a95SAlexey Kardashevskiy * the Free Software Foundation; either version 2 of the License, 720c50a95SAlexey Kardashevskiy * or (at your option) any later version. 86b1566cbSPaolo Bonzini * 96b1566cbSPaolo Bonzini * This program is distributed in the hope that it will be useful, 106b1566cbSPaolo Bonzini * but WITHOUT ANY WARRANTY; without even the implied warranty of 116b1566cbSPaolo Bonzini * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 126b1566cbSPaolo Bonzini * GNU General Public License for more details. 136b1566cbSPaolo Bonzini * 146b1566cbSPaolo Bonzini * You should have received a copy of the GNU General Public License 156b1566cbSPaolo Bonzini * along with this program; if not, see <http://www.gnu.org/licenses/>. 166b1566cbSPaolo Bonzini */ 176b1566cbSPaolo Bonzini 186b1566cbSPaolo Bonzini #ifndef FW_PATH_PROVIDER_H 19175de524SMarkus Armbruster #define FW_PATH_PROVIDER_H 206b1566cbSPaolo Bonzini 216b1566cbSPaolo Bonzini #include "qom/object.h" 226b1566cbSPaolo Bonzini 236b1566cbSPaolo Bonzini #define TYPE_FW_PATH_PROVIDER "fw-path-provider" 246b1566cbSPaolo Bonzini 25db1015e9SEduardo Habkost typedef struct FWPathProviderClass FWPathProviderClass; 26*8110fa1dSEduardo Habkost DECLARE_CLASS_CHECKERS(FWPathProviderClass, FW_PATH_PROVIDER, 27*8110fa1dSEduardo Habkost TYPE_FW_PATH_PROVIDER) 286b1566cbSPaolo Bonzini #define FW_PATH_PROVIDER(obj) \ 296b1566cbSPaolo Bonzini INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER) 306b1566cbSPaolo Bonzini 31aa1b35b9SMarc-André Lureau typedef struct FWPathProvider FWPathProvider; 326b1566cbSPaolo Bonzini 33db1015e9SEduardo Habkost struct FWPathProviderClass { 346b1566cbSPaolo Bonzini InterfaceClass parent_class; 356b1566cbSPaolo Bonzini 366b1566cbSPaolo Bonzini char *(*get_dev_path)(FWPathProvider *p, BusState *bus, DeviceState *dev); 37db1015e9SEduardo Habkost }; 386b1566cbSPaolo Bonzini 396b1566cbSPaolo Bonzini char *fw_path_provider_get_dev_path(FWPathProvider *p, BusState *bus, 406b1566cbSPaolo Bonzini DeviceState *dev); 416b1566cbSPaolo Bonzini char *fw_path_provider_try_get_dev_path(Object *o, BusState *bus, 426b1566cbSPaolo Bonzini DeviceState *dev); 436b1566cbSPaolo Bonzini 446b1566cbSPaolo Bonzini #endif /* FW_PATH_PROVIDER_H */ 45