Debian Codegraph @

dat/common/dat_init.h

raw
1 /*
2 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
3 *
4 * This Software is licensed under one of the following licenses:
5 *
6 * 1) under the terms of the "Common Public License 1.0" a copy of which is
7 * in the file LICENSE.txt in the root directory. The license is also
8 * available from the Open Source Initiative, see
9 * http://www.opensource.org/licenses/cpl.php.
10 *
11 * 2) under the terms of the "The BSD License" a copy of which is in the file
12 * LICENSE2.txt in the root directory. The license is also available from
13 * the Open Source Initiative, see
14 * http://www.opensource.org/licenses/bsd-license.php.
15 *
16 * 3) under the terms of the "GNU General Public License (GPL) Version 2" a
17 * copy of which is in the file LICENSE3.txt in the root directory. The
18 * license is also available from the Open Source Initiative, see
19 * http://www.opensource.org/licenses/gpl-license.php.
20 *
21 * Licensee has the right to choose one of the above licenses.
22 *
23 * Redistributions of source code must retain the above copyright
24 * notice and one of the license notices.
25 *
26 * Redistributions in binary form must reproduce both the above copyright
27 * notice, one of the license notices in the documentation
28 * and/or other materials provided with the distribution.
29 */
30
31 /**********************************************************************
32 *
33 * HEADER: dat_init.h
34 *
35 * PURPOSE: DAT registry global data
36 *
37 * $Id: dat_init.h,v 1.16 2005/03/24 05:58:27 jlentini Exp $
38 **********************************************************************/
39
40 #ifndef _DAT_INIT_H_
41 #define _DAT_INIT_H_
42
43 #include "dat_osd.h"
44
45 /*********************************************************************
46 * *
47 * Enumerations *
48 * *
49 *********************************************************************/
50
51 typedef enum
52 {
53 DAT_MODULE_STATE_UNINITIALIZED,
54 DAT_MODULE_STATE_INITIALIZING,
55 DAT_MODULE_STATE_INITIALIZED,
56 DAT_MODULE_STATE_DEINITIALIZING,
57 DAT_MODULE_STATE_DEINITIALIZED
58 } DAT_MODULE_STATE;
59
60 /*********************************************************************
61 * *
62 * Function Prototypes *
63 * *
64 *********************************************************************/
65
66 DAT_MODULE_STATE
67 dat_module_get_state ( void ) ;
68
69 #if defined(_MSC_VER) || defined(_WIN64) || defined(_WIN32)
70 /* NT. MSC compiler, Win32/64 platform */
71 void
72 dat_init ( void );
73
74 void
75 dat_fini ( void );
76
77 #else /* GNU C */
78
79 void
80 dat_init ( void ) __attribute__ ((constructor));
81
82 void
83 dat_fini ( void ) __attribute__ ((destructor));
84 #endif
85
86 extern DAT_RETURN
87 dats_handle_vector_init ( void );
88
89 extern DAT_IA_HANDLE
90 dats_set_ia_handle (
91 IN DAT_IA_HANDLE ia_handle);
92
93 extern DAT_RETURN
94 dats_get_ia_handle(
95 IN DAT_IA_HANDLE handle,
96 OUT DAT_IA_HANDLE *ia_handle_p);
97
98 extern DAT_BOOLEAN
99 dats_is_ia_handle (
100 IN DAT_HANDLE dat_handle);
101
102 extern DAT_RETURN
103 dats_free_ia_handle(
104 IN DAT_IA_HANDLE handle);
105
106 #endif