Changeset 903bac0a in mainline for uspace/lib/c/include/ipc/loc.h
- Timestamp:
- 2011-08-19T09:00:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2ab36f1
- Parents:
- d894fbd (diff), 42a619b (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. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/loc.h
rd894fbd r903bac0a 1 1 /* 2 2 * Copyright (c) 2007 Josef Cejka 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 29 /** @addtogroup devmap30 /** @addtogroup loc 30 31 * @{ 31 32 */ 32 33 33 #ifndef LIBC_IPC_ DEVMAP_H_34 #define LIBC_IPC_ DEVMAP_H_34 #ifndef LIBC_IPC_LOC_H_ 35 #define LIBC_IPC_LOC_H_ 35 36 36 37 #include <ipc/common.h> 37 38 38 #define DEVMAP_NAME_MAXLEN 25539 #define LOC_NAME_MAXLEN 255 39 40 40 typedef sysarg_t devmap_handle_t; 41 typedef sysarg_t service_id_t; 42 typedef sysarg_t category_id_t; 41 43 42 44 typedef enum { 43 DEV_HANDLE_NONE,44 DEV_HANDLE_NAMESPACE,45 DEV_HANDLE_DEVICE46 } devmap_handle_type_t;45 LOC_OBJECT_NONE, 46 LOC_OBJECT_NAMESPACE, 47 LOC_OBJECT_SERVICE 48 } loc_object_type_t; 47 49 48 50 typedef 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_CALLBACK_CREATE, 60 LOC_CATEGORY_GET_ID, 61 LOC_CATEGORY_GET_NAME, 62 LOC_CATEGORY_GET_SVCS, 63 LOC_ID_PROBE, 64 LOC_NULL_CREATE, 65 LOC_NULL_DESTROY, 66 LOC_GET_NAMESPACE_COUNT, 67 LOC_GET_SERVICE_COUNT, 68 LOC_GET_CATEGORIES, 69 LOC_GET_NAMESPACES, 70 LOC_GET_SERVICES 71 } loc_request_t; 63 72 64 /** Interface provided by devmap. 73 typedef enum { 74 LOC_EVENT_CAT_CHANGE = IPC_FIRST_USER_METHOD 75 } loc_event_t; 76 77 /** Ports provided by location service. 65 78 * 66 * Every process that connects to devmapmust ask one of following67 * interfacesotherwise connection will be refused.79 * Every process that connects to loc must ask one of following 80 * ports, otherwise connection will be refused. 68 81 * 69 82 */ 70 83 typedef enum { 71 /** Connect as device driver*/72 DEVMAP_DRIVER = 1,73 /** Connect as client */74 DEVMAP_CLIENT,84 /** Service supplier (server) port */ 85 LOC_PORT_SUPPLIER = 1, 86 /** Service consumer (client) port */ 87 LOC_PORT_CONSUMER, 75 88 /** Create new connection to instance of device that 76 89 is specified by second argument of call. */ 77 DEVMAP_CONNECT_TO_DEVICE78 } devmap_interface_t;90 LOC_CONNECT_TO_SERVICE 91 } loc_interface_t; 79 92 80 93 typedef struct { 81 devmap_handle_t handle;82 char name[ DEVMAP_NAME_MAXLEN + 1];83 } dev_desc_t;94 service_id_t id; 95 char name[LOC_NAME_MAXLEN + 1]; 96 } loc_sdesc_t; 84 97 85 98 #endif
Note:
See TracChangeset
for help on using the changeset viewer.