source: mainline/uspace/srv/locsrv/locsrv.h

Last change on this file was 4122410, checked in by Jakub Jermar <jakub@…>, 7 years ago

Improve Doxygen documentaion

This is stil WiP. A number of libraries, drivers and services were
converted to using a more hierarchical and decentralized scheme when it
comes to specifying to which doxygen group they belong.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*
2 * Copyright (c) 2011 Jiri Svoboda
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup locsrv
30 * @{
31 */
32/** @file HelenOS location service.
33 */
34
35#ifndef LOCSRV_H_
36#define LOCSRV_H_
37
38#include <ipc/loc.h>
39#include <async.h>
40#include <fibril_synch.h>
41#include <stddef.h>
42
43/** Representation of server (supplier).
44 *
45 * Each server supplies a set of services.
46 *
47 */
48typedef struct {
49 /** Link to servers_list */
50 link_t servers;
51
52 /** List of services supplied by this server */
53 list_t services;
54
55 /** Session asociated with this server */
56 async_sess_t *sess;
57
58 /** Server name */
59 char *name;
60
61 /** Fibril mutex for list of services owned by this server */
62 fibril_mutex_t services_mutex;
63} loc_server_t;
64
65/** Info about registered namespaces
66 *
67 */
68typedef struct {
69 /** Link to namespaces_list */
70 link_t namespaces;
71
72 /** Unique namespace identifier */
73 service_id_t id;
74
75 /** Namespace name */
76 char *name;
77
78 /** Reference count */
79 size_t refcnt;
80} loc_namespace_t;
81
82/** Info about registered service
83 *
84 */
85typedef struct {
86 /** Link to global list of services (services_list) */
87 link_t services;
88
89 /** Link to server list of services (loc_server_t.services) */
90 link_t server_services;
91
92 /** Link to list of services in category (category_t.services) */
93 link_t cat_services;
94
95 /** List of category memberships (svc_categ_t) */
96 list_t cat_memb;
97
98 /** Unique service identifier */
99 service_id_t id;
100
101 /** Service namespace */
102 loc_namespace_t *namespace;
103
104 /** Service name */
105 char *name;
106
107 /** Supplier of this service */
108 loc_server_t *server;
109} loc_service_t;
110
111extern fibril_mutex_t services_list_mutex;
112
113extern service_id_t loc_create_id(void);
114extern void loc_category_change_event(void);
115
116#endif
117
118/** @}
119 */
Note: See TracBrowser for help on using the repository browser.