[ea5f46d] | 1 | interface devmap_driver {
|
---|
[07fdf203] | 2 | /* Establish connection (iface is DEVMAP_DRIVER) */
|
---|
| 3 | ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface);
|
---|
| 4 |
|
---|
| 5 | /* Register as a new driver */
|
---|
[1993f9a] | 6 | ipcarg_t driver_register(in_copy string name);
|
---|
[07fdf203] | 7 |
|
---|
| 8 | /* Unregister all devices and the driver itself */
|
---|
| 9 | ipcarg_t driver_unregister(void);
|
---|
| 10 |
|
---|
| 11 | /* Register new device and return handle */
|
---|
[1993f9a] | 12 | ipcarg_t device_register(in_copy string name, out ipcarg_t handle);
|
---|
[07fdf203] | 13 |
|
---|
| 14 | /* Unregister device */
|
---|
| 15 | ipcarg_t device_unregister(in ipcarg_t handle);
|
---|
| 16 |
|
---|
| 17 | /* Resolve device name to handle */
|
---|
[1993f9a] | 18 | ipcarg_t device_get_handle(in ipcarg_t flags, in_copy string name);
|
---|
[07fdf203] | 19 |
|
---|
| 20 | /* Get device name for a given handle */
|
---|
| 21 | ipcarg_t device_get_name(in ipcarg_t handle);
|
---|
| 22 |
|
---|
| 23 | /* Close connection */
|
---|
| 24 | ipcarg_t ipc_m_phone_hungup(void);
|
---|
| 25 | protocol:
|
---|
[ea5f46d] | 26 | [devmap_driver.bp]
|
---|
[07fdf203] | 27 | };
|
---|
| 28 |
|
---|
[ea5f46d] | 29 | interface devmap_client {
|
---|
[07fdf203] | 30 | /* Establish connection (iface is DEVMAP_CLIENT) or forward to device (iface is DEVMAP_CONNECT_TO_DEVICE) */
|
---|
| 31 | ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface, in ipcarg_t handle);
|
---|
| 32 |
|
---|
| 33 | /* Resolve device name to handle */
|
---|
[1993f9a] | 34 | ipcarg_t device_get_handle(in ipcarg_t flags, in_copy string name);
|
---|
[07fdf203] | 35 |
|
---|
| 36 | /* Get device name for a given handle */
|
---|
| 37 | ipcarg_t device_get_name(in ipcarg_t handle);
|
---|
| 38 |
|
---|
| 39 | /* Clone NULL device */
|
---|
| 40 | ipcarg_t device_null_create(out ipcarg_t index);
|
---|
| 41 |
|
---|
| 42 | /* Destroy NULL device */
|
---|
| 43 | ipcarg_t device_null_destroy(in ipcarg_t index);
|
---|
| 44 |
|
---|
| 45 | /* Get number of devices */
|
---|
| 46 | ipcarg_t device_get_count(out ipcarg_t count);
|
---|
| 47 |
|
---|
| 48 | /* Get an array of (device_name, handle) pairs */
|
---|
[ee5b35a] | 49 | ipcarg_t device_get_devices(out_copy stream data);
|
---|
[07fdf203] | 50 |
|
---|
| 51 | /* Close connection */
|
---|
| 52 | ipcarg_t ipc_m_phone_hungup(void);
|
---|
| 53 | protocol:
|
---|
[ea5f46d] | 54 | [devmap_client.bp]
|
---|
[07fdf203] | 55 |
|
---|
| 56 | };
|
---|
| 57 |
|
---|
| 58 | frame devmap {
|
---|
| 59 | provides:
|
---|
[ea5f46d] | 60 | devmap_driver devmap_driver;
|
---|
| 61 | devmap_client devmap_client;
|
---|
[07fdf203] | 62 | requires:
|
---|
[2a70672] | 63 | [/uspace/lib/libc/requires]
|
---|
[810860a] | 64 | ns ns;
|
---|
[07fdf203] | 65 | protocol:
|
---|
[810860a] | 66 | [/uspace/lib/libc/protocol] |
|
---|
[ea5f46d] | 67 | [devmap_server.bp]
|
---|
[07fdf203] | 68 | };
|
---|