12.1 Overview

Plugins that have the capability flag HWPLUG_CAPS_FILEADAPTER set can hook into Hollywood's file handler. Whenever Hollywood has to open a file, it will first ask all the plugins that have hooked themselves into Hollywood's file handler if one of them wants to open it instead. If one of the plugins chooses to handle this file type, all file IO will be done through the file adapter functions implemented in the plugin. Otherwise, Hollywood will do all file IO through its default file handler.

Please note that file adapters are not automatically initialized when Hollywood loads the plugin. Instead, you have to manually call hw_AddLoaderAdapter() in your RequirePlugin() function to activate the file adapter. The file adapter will then only be activated if the user calls @REQUIRE on your plugin. See Auto and manual plugin initialization for details. If you do not call hw_AddLoaderAdapter() on your file adapter plugin, it will only be available if the user addresses it directly through the Adapter tag.

See hw_AddLoaderAdapter for information on how to add your file adapter.

All functions of this plugin type have to be implemented in a thread-safe manner.

This plugin type is supported since Hollywood 6.0.


Show TOC