2 * Copyright (C) 2011-2012 Reto Guadagnini
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup resolver_manager resolver_manager
18 * @{ @ingroup resolver
21 #ifndef RESOLVER_MANAGER_H_
22 #define RESOLVER_MANAGER_H_
24 typedef struct resolver_manager_t resolver_manager_t
;
26 #include <resolver/resolver.h>
29 * The resolver_manager manages the resolver implementations and
30 * creates instances of them.
32 * A resolver plugin is registered by providing its constructor function
33 * to the manager. The manager creates instances of the resolver plugin
34 * using the registered constructor function.
36 struct resolver_manager_t
{
39 * Register a resolver implementation.
41 * @param constructor resolver constructor function
43 void (*add_resolver
)(resolver_manager_t
*this,
44 resolver_constructor_t constructor
);
47 * Unregister a previously registered resolver implementation.
49 * @param constructor resolver constructor function to unregister
51 void (*remove_resolver
)(resolver_manager_t
*this,
52 resolver_constructor_t constructor
);
55 * Get a new resolver instance.
57 * @return resolver instance.
59 resolver_t
* (*create
)(resolver_manager_t
*this);
62 * Destroy a resolver_manager instance.
64 void (*destroy
)(resolver_manager_t
*this);
68 * Create a resolver_manager instance.
70 resolver_manager_t
*resolver_manager_create();
72 #endif /** RESOLVER_MANAGER_H_ @}*/