![]() |
Max OS 0.3
|
A generic wrapper for a Resource that exists on a userspace server which exposes its operations as Resource operations. More...
#include <resource_bridge.h>
Public Member Functions | |
| BridgeResource (const string &name, size_t flags, resource_type_t type) | |
| void | open (size_t flags) final |
| Opens the resource. | |
| void | close (size_t flags) final |
| Closes the resource. | |
| int | read (void *buffer, size_t size, size_t flags) final |
| Reads data from the resource. | |
| int | write (const void *buffer, size_t size, size_t flags) final |
| write a certain amount of bytes to a resource | |
| void | attach_wrapper (BridgeHandler *wrapper) |
| bool | get_on_bridge () |
| Attempt to get a resource on a bridge endpoint that may not be registered yet. | |
| void | create_on_bridge () |
| Passes the creation of a resource to the bridge. | |
A generic wrapper for a Resource that exists on a userspace server which exposes its operations as Resource operations.
Definition at line 60 of file resource_bridge.h.
| BridgeResource::BridgeResource | ( | const string & | name, |
| size_t | flags, | ||
| resource_type_t | type | ||
| ) |
Definition at line 189 of file resource_bridge.cpp.
| void BridgeResource::attach_wrapper | ( | BridgeHandler * | wrapper | ) |
Definition at line 239 of file resource_bridge.cpp.
|
final |
Closes the resource.
| flags | Optional flags to pass (unused by default but resource type specific) |
Definition at line 210 of file resource_bridge.cpp.
| void BridgeResource::create_on_bridge | ( | ) |
Passes the creation of a resource to the bridge.
Definition at line 262 of file resource_bridge.cpp.
| bool BridgeResource::get_on_bridge | ( | ) |
Attempt to get a resource on a bridge endpoint that may not be registered yet.
Definition at line 251 of file resource_bridge.cpp.
|
final |
Opens the resource.
| flags | Optional flags to pass (unused by default but resource type specific) |
Definition at line 201 of file resource_bridge.cpp.
|
final |
Reads data from the resource.
| buffer | The buffer to read into |
| size | The number of bytes to read |
| flags | The flags to pass to the reading |
Definition at line 223 of file resource_bridge.cpp.
|
final |
write a certain amount of bytes to a resource
| buffer | The buffer to read from |
| size | How many bytes to write |
| flags | Optional flags to pass (unused by default but resource type specific) |
Definition at line 235 of file resource_bridge.cpp.