]>
Commit | Line | Data |
---|---|---|
6b1566cb PB |
1 | /* |
2 | * Firmware patch provider class and helpers definitions. | |
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 | |
20c50a95 AK |
6 | * the Free Software Foundation; either version 2 of the License, |
7 | * or (at your option) any later version. | |
6b1566cb PB |
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 <http://www.gnu.org/licenses/>. | |
16 | */ | |
17 | ||
18 | #ifndef FW_PATH_PROVIDER_H | |
19 | #define FW_PATH_PROVIDER_H 1 | |
20 | ||
21 | #include "qemu-common.h" | |
22 | #include "qom/object.h" | |
23 | ||
24 | #define TYPE_FW_PATH_PROVIDER "fw-path-provider" | |
25 | ||
26 | #define FW_PATH_PROVIDER_CLASS(klass) \ | |
27 | OBJECT_CLASS_CHECK(FWPathProviderClass, (klass), TYPE_FW_PATH_PROVIDER) | |
28 | #define FW_PATH_PROVIDER_GET_CLASS(obj) \ | |
29 | OBJECT_GET_CLASS(FWPathProviderClass, (obj), TYPE_FW_PATH_PROVIDER) | |
30 | #define FW_PATH_PROVIDER(obj) \ | |
31 | INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER) | |
32 | ||
33 | typedef struct FWPathProvider { | |
34 | Object parent_obj; | |
35 | } FWPathProvider; | |
36 | ||
37 | typedef struct FWPathProviderClass { | |
38 | InterfaceClass parent_class; | |
39 | ||
40 | char *(*get_dev_path)(FWPathProvider *p, BusState *bus, DeviceState *dev); | |
41 | } FWPathProviderClass; | |
42 | ||
43 | char *fw_path_provider_get_dev_path(FWPathProvider *p, BusState *bus, | |
44 | DeviceState *dev); | |
45 | char *fw_path_provider_try_get_dev_path(Object *o, BusState *bus, | |
46 | DeviceState *dev); | |
47 | ||
48 | #endif /* FW_PATH_PROVIDER_H */ |