1
2/*
3 * $Id: cnid_init.c,v 1.3 2009-10-13 22:55:37 didg Exp $
4 *
5 * Copyright (c) 2003 the Netatalk Team
6 * Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
7 *
8 * This program is free software; you can redistribute and/or modify
9 * it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation version 2 of the License or later
11 * version if explicitly stated by any of above copyright holders.
12 *
13 */
14
15/*
16 * This file contains initialization stuff for CNID backends.
17 * Currently it only employs static bindings.
18 * No plans for dynamically loaded CNID backends here (temporary).
19 * Maybe somewhere in the future.
20 */
21
22#ifdef HAVE_CONFIG_H
23#include "config.h"
24#endif /* HAVE_CONFIG_H */
25
26#include <atalk/cnid.h>
27#include <atalk/list.h>
28#include <atalk/logger.h>
29#include <stdlib.h>
30
31
32#ifdef CNID_BACKEND_DB3
33extern struct _cnid_module cnid_db3_module;
34#endif
35
36#ifdef CNID_BACKEND_HASH
37extern struct _cnid_module cnid_hash_module;
38#endif
39
40#ifdef CNID_BACKEND_LAST
41extern struct _cnid_module cnid_last_module;
42#endif
43
44#ifdef CNID_BACKEND_MTAB
45extern struct _cnid_module cnid_mtab_module;
46#endif
47
48#ifdef CNID_BACKEND_CDB
49extern struct _cnid_module cnid_cdb_module;
50#endif
51
52#ifdef CNID_BACKEND_DBD
53extern struct _cnid_module cnid_dbd_module;
54#endif
55
56#ifdef CNID_BACKEND_TDB
57extern struct _cnid_module cnid_tdb_module;
58#endif
59
60void cnid_init(void)
61{
62#ifdef CNID_BACKEND_DB3
63    cnid_register(&cnid_db3_module);
64#endif
65
66#ifdef CNID_BACKEND_HASH
67    cnid_register(&cnid_hash_module);
68#endif
69
70#ifdef CNID_BACKEND_LAST
71    cnid_register(&cnid_last_module);
72#endif
73
74#ifdef CNID_BACKEND_MTAB
75    cnid_register(&cnid_mtab_module);
76#endif
77
78#ifdef CNID_BACKEND_CDB
79    cnid_register(&cnid_cdb_module);
80#endif
81
82#ifdef CNID_BACKEND_DBD
83    cnid_register(&cnid_dbd_module);
84#endif
85
86#ifdef CNID_BACKEND_TDB
87    cnid_register(&cnid_tdb_module);
88#endif
89}
90