class Resource

Defined at line 24 of file ../../src/devices/bin/driver_manager/resource.h

Represents a resource provided by a Node.

Public Methods

void Resource (ResourceId id, std::weak_ptr<Node> owner, std::string name, std::vector<fuchsia_driver_framework::NodeProperty2> properties, std::vector<NodeOffer> node_offers, std::optional<fuchsia_driver_framework::BusInfo> bus_info, async_dispatcher_t * dispatcher)

Defined at line 15 of file ../../src/devices/bin/driver_manager/resource.cc

void Bind (fidl::ServerEnd<fuchsia_driver_framework::ResourceController> server_end)

Defined at line 28 of file ../../src/devices/bin/driver_manager/resource.cc

void ~Resource ()

Defined at line 32 of file ../../src/devices/bin/driver_manager/resource.h

void set_is_self_resource (bool is_self_resource)

Defined at line 34 of file ../../src/devices/bin/driver_manager/resource.h

void Remove ()

Removes this resource by notifying all dependent nodes that this resource

is gone and unregistering this resource from its owning node if it's a provided node.

Defined at line 39 of file ../../src/devices/bin/driver_manager/resource.cc

void AddDependent (std::weak_ptr<Node> dependent)

Defined at line 42 of file ../../src/devices/bin/driver_manager/resource.h

std::weak_ptr<Node> owner ()

Defined at line 45 of file ../../src/devices/bin/driver_manager/resource.h

const std::optional<fuchsia_driver_framework::BusInfo> & bus_info ()

Defined at line 46 of file ../../src/devices/bin/driver_manager/resource.h

const std::vector<NodeOffer> & offers ()

Defined at line 47 of file ../../src/devices/bin/driver_manager/resource.h

const std::vector<fuchsia_driver_framework::NodeProperty2> & properties ()

Defined at line 48 of file ../../src/devices/bin/driver_manager/resource.h

ResourceId id ()

Defined at line 51 of file ../../src/devices/bin/driver_manager/resource.h

bool is_self_resource ()

Defined at line 52 of file ../../src/devices/bin/driver_manager/resource.h

const std::vector<std::weak_ptr<Node>> & dependents ()

Defined at line 53 of file ../../src/devices/bin/driver_manager/resource.h

const std::string & name ()

Exposed for testing.

Defined at line 56 of file ../../src/devices/bin/driver_manager/resource.h

void RemoveDependent (const std::shared_ptr<Node> & dependent)

Defined at line 61 of file ../../src/devices/bin/driver_manager/resource.cc