2
0

fw-path-provider.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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
  6. * the Free Software Foundation; either version 2 of the License,
  7. * or (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 <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef FW_PATH_PROVIDER_H
  18. #define FW_PATH_PROVIDER_H
  19. #include "qom/object.h"
  20. #define TYPE_FW_PATH_PROVIDER "fw-path-provider"
  21. typedef struct FWPathProviderClass FWPathProviderClass;
  22. DECLARE_CLASS_CHECKERS(FWPathProviderClass, FW_PATH_PROVIDER,
  23. TYPE_FW_PATH_PROVIDER)
  24. #define FW_PATH_PROVIDER(obj) \
  25. INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
  26. typedef struct FWPathProvider FWPathProvider;
  27. struct FWPathProviderClass {
  28. InterfaceClass parent_class;
  29. char *(*get_dev_path)(FWPathProvider *p, BusState *bus, DeviceState *dev);
  30. };
  31. char *fw_path_provider_get_dev_path(FWPathProvider *p, BusState *bus,
  32. DeviceState *dev);
  33. char *fw_path_provider_try_get_dev_path(Object *o, BusState *bus,
  34. DeviceState *dev);
  35. #endif /* FW_PATH_PROVIDER_H */