hw/xtensa/xtfpga:fix leak of fdevice tree blob
[qemu/ar7.git] / include / hw / fw-path-provider.h
blob10d1bd4959482e567194f697ad46d6c0a8d2f80d
1 /*
2 * Firmware patch provider class and helpers definitions.
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 2 of the License,
7 * or (at your option) any later version.
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.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef FW_PATH_PROVIDER_H
19 #define FW_PATH_PROVIDER_H
21 #include "qom/object.h"
23 #define TYPE_FW_PATH_PROVIDER "fw-path-provider"
25 #define FW_PATH_PROVIDER_CLASS(klass) \
26 OBJECT_CLASS_CHECK(FWPathProviderClass, (klass), TYPE_FW_PATH_PROVIDER)
27 #define FW_PATH_PROVIDER_GET_CLASS(obj) \
28 OBJECT_GET_CLASS(FWPathProviderClass, (obj), TYPE_FW_PATH_PROVIDER)
29 #define FW_PATH_PROVIDER(obj) \
30 INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
32 typedef struct FWPathProvider FWPathProvider;
34 typedef struct FWPathProviderClass {
35 InterfaceClass parent_class;
37 char *(*get_dev_path)(FWPathProvider *p, BusState *bus, DeviceState *dev);
38 } FWPathProviderClass;
40 char *fw_path_provider_get_dev_path(FWPathProvider *p, BusState *bus,
41 DeviceState *dev);
42 char *fw_path_provider_try_get_dev_path(Object *o, BusState *bus,
43 DeviceState *dev);
45 #endif /* FW_PATH_PROVIDER_H */