class Handle
Defined at line 34 of file ../../src/devices/bin/driver_runtime/handle.h
A handle is how a process refers to runtime objects such as fdf_channels.
Public Methods
void Handle (fbl::RefPtr<Object> object, fdf_handle_t value)
This needs to be public for |HandleTableArena|.
Defined at line 41 of file ../../src/devices/bin/driver_runtime/handle.h
void Reset ()
Clears handle state specific to this lifetime.
The handle |value| is preserved, as it is used to generate a new handle value
referring to the same handle object.
Defined at line 47 of file ../../src/devices/bin/driver_runtime/handle.h
bool HandleExists (fdf_handle_t value)
Returns whether the handle exists in the handle table.
Defined at line 50 of file ../../src/devices/bin/driver_runtime/handle.h
template <typename T>
zx_status_t GetObject (fbl::RefPtr<T> * out_object)
Returns the object corresponding to |value_|.
Defined at line 64 of file ../../src/devices/bin/driver_runtime/handle.h
template <typename T>
zx_status_t GetObject (fdf_handle_t handle_value, fbl::RefPtr<T> * out_object)
Returns the object corresponding to |handle_value|.
Defined at line 75 of file ../../src/devices/bin/driver_runtime/handle.h
HandleOwner TakeOwnership ()
Defined at line 83 of file ../../src/devices/bin/driver_runtime/handle.h
fbl::RefPtr<Object> object ()
Returns the object this handle refers to.
Defined at line 86 of file ../../src/devices/bin/driver_runtime/handle.h
bool has_object ()
Defined at line 87 of file ../../src/devices/bin/driver_runtime/handle.h
fdf_handle_t handle_value ()
Returns the handle value which refers to this object.
Defined at line 90 of file ../../src/devices/bin/driver_runtime/handle.h
HandleOwner Create (fbl::RefPtr<Object> object)
Returns a unique reference to a newly created handle.
Takes ownership of |object|.
Defined at line 168 of file ../../src/devices/bin/driver_runtime/handle.cc
Handle * MapValueToHandle (fdf_handle_t value)
Maps |value| to the runtime's Handle object.
The Handle must have previously been created with |Create|.
This does not provide ownership to the Handle. To destroy the Handle,
the caller should use |TakeOwnership|.
Defined at line 179 of file ../../src/devices/bin/driver_runtime/handle.cc
bool IsFdfHandle (zx_handle_t handle_value)
Returns whether |handle_value| is of type fdf_handle_t.
Does not do any validation on whether it is a valid fdf handle.
Defined at line 195 of file ../../src/devices/bin/driver_runtime/handle.cc