3.2. Handles

The handle presented to the application for using libraw1394 is the raw1394handle_t, an opaque data structure (which means you don't need to know its internals). The handle (and with it a connection to the kernel side of raw1394) is obtained using raw1394_new_handle(). Insufficient permissions to access the kernel driver will result in failure of this function, among other possibilities of failure.

While initializing the handle, a certain order of function calls have to be obeyed or undefined results will occur. This order reflects the various states of initialization to be done:

  1. raw1394_new_handle()

  2. raw1394_get_port_info()

  3. raw1394_set_port()