Changeset 4c6fd56 in mainline for uspace/lib/c/include/loc.h


Ignore:
Timestamp:
2023-09-16T19:58:18Z (9 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7d7f5e3
Parents:
6a0b2cc
git-author:
Jiri Svoboda <jiri@…> (2023-09-16 19:48:07)
git-committer:
Jiri Svoboda <jiri@…> (2023-09-16 19:58:18)
Message:

loc_server_register() should be callable more than once (API only)

Now loc_server_register() returns a pointer to a loc_srv_t object,
that is then passed to loc_service_register() and
loc_service_add_to_cat().

Added loc_server_unregister() that unregisters the server
and frees the loc_srv_t object.

Updated all callers. The implementation, however, is a stub.
It is not actually possible to call loc_server_register() more
than once, yet.

File:
1 edited

Legend:

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

    r6a0b2cc r4c6fd56  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3939#include <async.h>
    4040#include <stdbool.h>
     41#include <types/loc.h>
    4142
    4243typedef void (*loc_cat_change_cb_t)(void *);
     
    4647extern void loc_exchange_end(async_exch_t *);
    4748
    48 extern errno_t loc_server_register(const char *);
    49 extern errno_t loc_service_register(const char *, service_id_t *);
    50 extern errno_t loc_service_unregister(service_id_t);
    51 extern errno_t loc_service_add_to_cat(service_id_t, category_id_t);
     49extern errno_t loc_server_register(const char *, loc_srv_t **);
     50extern void loc_server_unregister(loc_srv_t *);
     51extern errno_t loc_service_register(loc_srv_t *, const char *, service_id_t *);
     52extern errno_t loc_service_unregister(loc_srv_t *, service_id_t);
     53extern errno_t loc_service_add_to_cat(loc_srv_t *, service_id_t, category_id_t);
    5254
    5355extern errno_t loc_service_get_id(const char *, service_id_t *,
Note: See TracChangeset for help on using the changeset viewer.