2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: mmdb.h /main/5 1996/10/26 18:19:50 cde-hal $ */
28 #include "api/info_lib.h"
29 #include "mgrs/managers.h"
30 #include "dstr/void_ptr_array.h"
32 #include "oliasdb/olias_consts.h"
33 #include "oliasdb/node_hd.h"
34 #include "oliasdb/graphic_hd.h"
35 #include "oliasdb/toc_hd.h"
36 #include "oliasdb/locator_hd.h"
37 #include "oliasdb/doc_hd.h"
38 #include "oliasdb/stylesheet_hd.h"
39 #include "oliasdb/dlp_hd.h"
40 #include "oliasdb/mark.h"
46 char** info_base_set_names;
47 char** info_base_list_names;
49 managers internal_managers; // this should be constructed before
50 // the following objects!!!
54 graphic graphic_template;
55 olias_locator locator_template;
56 olias_node node_template;
59 stylesheet stylesheet_template;
61 void_ptr_array infolib_array;
65 real_destroy_info_base(const char* infoLibPath, const char* base_name);
67 Boolean real_destroy(const char* infoLibPath, const char* infoLibName);
68 info_lib* getInfoLib(const char* infoLibUid, int& i);
74 info_lib* openInfoLib(const char* path = getenv("MMDB_PATH"),
75 const char* selectedBookCaseName = 0,
76 const char* infoLibName = "InfoLibrary"
78 // NOTE: default argument ("InfoLibrary") needs to be abandoned.
79 void closeInfoLib(const char* infoLibUid = "InfoLibrary");
80 info_lib* getInfoLib(int descriptor);
82 // complete remove file dir structure for the infolib
83 // The action will be taken when the infolib is in closed state
84 Boolean destroy(const char* infoLibPath, const char* infoLibName = "InfoLibrary");
86 // return 1 if path is a valid dir path and the directory contains
87 // names.mmdb or bookcase.map file.
88 int validInfoLibPath(const char* path);
90 int major_code_version();
91 int minor_code_version();
92 mm_version code_version();
94 int numItems() { return infolib_array.no_elmts(); }
95 char* getInfoLibUid(char*);