Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset db6e419 in mainline for uspace/lib/c/include/ipc/loc.h


Ignore:
Timestamp:
2011-08-16T18:53:00Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
49160c4
Parents:
e0e922d (diff), 45058baa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/loc.h

    re0e922d rdb6e419  
    11/*
    22 * Copyright (c) 2007 Josef Cejka
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    2728 */
    2829
    29 /** @addtogroup devmap
     30/** @addtogroup loc
    3031 * @{
    3132 */
    3233
    33 #ifndef LIBC_IPC_DEVMAP_H_
    34 #define LIBC_IPC_DEVMAP_H_
     34#ifndef LIBC_IPC_LOC_H_
     35#define LIBC_IPC_LOC_H_
    3536
    3637#include <ipc/common.h>
    3738
    38 #define DEVMAP_NAME_MAXLEN  255
     39#define LOC_NAME_MAXLEN  255
    3940
    40 typedef sysarg_t devmap_handle_t;
     41typedef sysarg_t service_id_t;
     42typedef sysarg_t category_id_t;
    4143
    4244typedef enum {
    43         DEV_HANDLE_NONE,
    44         DEV_HANDLE_NAMESPACE,
    45         DEV_HANDLE_DEVICE
    46 } devmap_handle_type_t;
     45        LOC_OBJECT_NONE,
     46        LOC_OBJECT_NAMESPACE,
     47        LOC_OBJECT_SERVICE
     48} loc_object_type_t;
    4749
    4850typedef enum {
    49         DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
    50         DEVMAP_DRIVER_UNREGISTER,
    51         DEVMAP_DEVICE_REGISTER,
    52         DEVMAP_DEVICE_UNREGISTER,
    53         DEVMAP_DEVICE_GET_HANDLE,
    54         DEVMAP_NAMESPACE_GET_HANDLE,
    55         DEVMAP_HANDLE_PROBE,
    56         DEVMAP_NULL_CREATE,
    57         DEVMAP_NULL_DESTROY,
    58         DEVMAP_GET_NAMESPACE_COUNT,
    59         DEVMAP_GET_DEVICE_COUNT,
    60         DEVMAP_GET_NAMESPACES,
    61         DEVMAP_GET_DEVICES
    62 } devmap_request_t;
     51        LOC_SERVER_REGISTER = IPC_FIRST_USER_METHOD,
     52        LOC_SERVER_UNREGISTER,
     53        LOC_SERVICE_ADD_TO_CAT,
     54        LOC_SERVICE_REGISTER,
     55        LOC_SERVICE_UNREGISTER,
     56        LOC_SERVICE_GET_ID,
     57        LOC_SERVICE_GET_NAME,
     58        LOC_NAMESPACE_GET_ID,
     59        LOC_CATEGORY_GET_ID,
     60        LOC_CATEGORY_GET_SVCS,
     61        LOC_ID_PROBE,
     62        LOC_NULL_CREATE,
     63        LOC_NULL_DESTROY,
     64        LOC_GET_NAMESPACE_COUNT,
     65        LOC_GET_SERVICE_COUNT,
     66        LOC_GET_CATEGORIES,
     67        LOC_GET_NAMESPACES,
     68        LOC_GET_SERVICES
     69} loc_request_t;
    6370
    64 /** Interface provided by devmap.
     71/** Ports provided by location service.
    6572 *
    66  * Every process that connects to devmap must ask one of following
    67  * interfaces otherwise connection will be refused.
     73 * Every process that connects to loc must ask one of following
     74 * ports, otherwise connection will be refused.
    6875 *
    6976 */
    7077typedef enum {
    71         /** Connect as device driver */
    72         DEVMAP_DRIVER = 1,
    73         /** Connect as client */
    74         DEVMAP_CLIENT,
     78        /** Service supplier (server) port */
     79        LOC_PORT_SUPPLIER = 1,
     80        /** Service consumer (client) port */
     81        LOC_PORT_CONSUMER,
    7582        /** Create new connection to instance of device that
    7683            is specified by second argument of call. */
    77         DEVMAP_CONNECT_TO_DEVICE
    78 } devmap_interface_t;
     84        LOC_CONNECT_TO_SERVICE
     85} loc_interface_t;
    7986
    8087typedef struct {
    81         devmap_handle_t handle;
    82         char name[DEVMAP_NAME_MAXLEN + 1];
    83 } dev_desc_t;
     88        service_id_t id;
     89        char name[LOC_NAME_MAXLEN + 1];
     90} loc_sdesc_t;
    8491
    8592#endif
Note: See TracChangeset for help on using the changeset viewer.