Function wyrd_open_resource

Function Documentation

wyrd_error_t wyrd_open_resource(struct wyrd_api *api, struct wyrd_handle **handle, char const *identifier, int flags)

Open a vessel resource with the given identifier.

You can set additional resource options via the wyrd_set_resource_option function. In fact, when adding properties to a resource, you should at minimum set an author and a set of resource algorithms.

Note

The identifier currently specifies a file name for a vessel resource; in future, the resource identifier will be used.

Parameters
  • api[in] An initialized API instance.

  • handle[out] Return a handle to the opened resource on success.

  • identifier[in] The name of the resource to open.

  • flags[in] Open flags; see wyrd_open_flags.

Return values
  • WYRD_ERR_SUCCESS – On success.

  • WYRD_ERR_INVALID_VALUE – If any of the inpurt values are invalid, such as NULL pointers where there should not be any, etc.

  • WYRD_ERR_UNEXPECTED – If unspecific system errors occurred.

  • WYRD_ERR_NOT_IMPLEMENTED – If the function is not implemented on the current platform.

  • Other – If the passed handle was already opened, needed to be closed, and closing the handle did not return successfully.