Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/arch/uspace/srv/devmap/devmap.adl

    r07fdf203 rafe34be  
    1 interface device_mapper_driver {
     1interface devmap_driver {
    22                /* Establish connection (iface is DEVMAP_DRIVER) */
    33                ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface);
    44               
    55                /* Register as a new driver */
    6                 ipcarg_t driver_register(void);
     6                ipcarg_t driver_register(in_copy string name);
    77               
    88                /* Unregister all devices and the driver itself */
     
    1010               
    1111                /* Register new device and return handle */
    12                 ipcarg_t device_register(out ipcarg_t handle);
     12                ipcarg_t device_register(in_copy string name, out ipcarg_t handle);
    1313               
    1414                /* Unregister device */
     
    1616               
    1717                /* Resolve device name to handle */
    18                 ipcarg_t device_get_handle(in ipcarg_t flags);
     18                ipcarg_t device_get_handle(in ipcarg_t flags, in_copy string name);
    1919               
    2020                /* Get device name for a given handle */
    2121                ipcarg_t device_get_name(in ipcarg_t handle);
    2222               
    23                 /* Transfer driver or device name */
    24                 ipcarg_t ipc_m_data_write(in ipcarg_t src_addr, in ipcarg_t src_size, out ipcarg_t dst_addr, out ipcarg_t dst_size);
    25                
    2623                /* Close connection */
    2724                ipcarg_t ipc_m_phone_hungup(void);
    2825        protocol:
    29                 [device_mapper_driver.bp]
     26                [devmap_driver.bp]
    3027};
    3128
    32 interface device_mapper_client {
     29interface devmap_client {
    3330                /* Establish connection (iface is DEVMAP_CLIENT) or forward to device (iface is DEVMAP_CONNECT_TO_DEVICE) */
    3431                ipcarg_t ipc_m_connect_me_to(in ipcarg_t iface, in ipcarg_t handle);
    3532               
    3633                /* Resolve device name to handle */
    37                 ipcarg_t device_get_handle(in ipcarg_t flags);
     34                ipcarg_t device_get_handle(in ipcarg_t flags, in_copy string name);
    3835               
    3936                /* Get device name for a given handle */
     
    5047               
    5148                /* Get an array of (device_name, handle) pairs */
    52                 ipcarg_t device_get_devices(void)
    53                
    54                 /* Transfer device name from client */
    55                 ipcarg_t ipc_m_data_write(in ipcarg_t src_addr, in ipcarg_t src_size, out ipcarg_t dst_addr, out ipcarg_t dst_size);
    56                
    57                 /* Transfer (device_name, handle) pairs to client */
    58                 ipcarg_t ipc_m_data_read(in ipcarg_t src_addr, in ipcarg_t src_size, out ipcarg_t dst_addr, out ipcarg_t dst_size);
     49                ipcarg_t device_get_devices(out_copy stream data);
    5950               
    6051                /* Close connection */
    6152                ipcarg_t ipc_m_phone_hungup(void);
    6253        protocol:
    63                 [device_mapper_client.bp]
     54                [devmap_client.bp]
    6455       
    6556};
     
    6758frame devmap {
    6859        provides:
    69                 device_mapper_driver dm_driver;
    70                 device_mapper_client dm_client;
     60                devmap_driver devmap_driver;
     61                devmap_client devmap_client;
    7162        requires:
    72                 [/lib/libc/iface.requires]
     63                [/uspace/lib/libc/requires]
     64                ns ns;
     65                rd rd;
     66                console console;
     67        initialization:
     68                !ns.ipc_m_connect_to_me /* devmap */
    7369        protocol:
    74                 [devmap.bp]
     70                [/uspace/lib/libc/protocol]
    7571};
Note: See TracChangeset for help on using the changeset viewer.