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
24 * $XConsortium: info_lib.h /main/5 1996/09/04 01:37:43 cde-hal $
26 * Copyright (c) 1992 HAL Computer Systems International, Ltd.
27 * All rights reserved. Unpublished -- rights reserved under
28 * the Copyright Laws of the United States. USE OF A COPYRIGHT
29 * NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
32 * THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
33 * SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
34 * DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
35 * PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
38 * RESTRICTED RIGHTS LEGEND
39 * Use, duplication, or disclosure by the Government is subject
40 * to the restrictions as set forth in subparagraph (c)(l)(ii)
41 * of the Rights in Technical Data and Computer Software clause
42 * at DFARS 252.227-7013.
44 * HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
54 #include "dstr/dlist.h"
55 #include "dstr/dlist_void_ptr_cell.h"
56 #include "api/info_base.h"
57 #include "utility/funcs.h"
59 /*************************************/
61 /*************************************/
63 class info_lib : public primitive
67 info_lib(char** set_name_array, char** list_name_array,
68 char* info_lib_dir = 0, char* selected_base_name = 0,
69 char* info_lib_name = "", int descriptor = -1);
74 Boolean define_info_base( char* base_name,
80 // get a base (the manager of a collection of documents)
81 info_base* get_info_base(const char* info_base_name);
83 // get number of info bases in the lib
84 int num_of_bases() { return info_base_list.count(); };
87 const char* get_info_lib_path() { return info_lib_path; };
88 const char* get_info_lib_name() { return info_lib_name; };
89 const char* get_info_lib_uid() { return info_lib_uid; };
91 // iterator. 0 is the termination value
92 // can be used to get all base names
93 long first() { return info_base_list.first(); };
94 info_base* operator()(long ind) {
95 return (info_base*)(((dlist_void_ptr_cell*)ind)->void_ptr());
97 void next(long& ind) { info_base_list.next(ind); };
100 enum TestSelector { LOC, GRA };
101 info_base* getInfobaseByComponent( const char *locator_string,
102 enum TestSelector sel);
103 info_base** getInfobasesByComponent( char **locator_strings,
104 int count, enum TestSelector sel);
107 const char* get_bad_infobase_path(int);
108 const char* get_bad_infobase_name(int);
110 int descriptor() { return f_descriptor; };
113 char info_lib_path[PATHSIZ];
114 char info_lib_name[PATHSIZ];
115 char info_lib_uid[UIDSIZ];
116 dlist info_base_list;
121 object_dict *f_obj_dict;
123 info_base* _init_info_base( const char* new_db_path,
124 const char* base_name,
125 const char* base_desc,
126 const char* base_uid,
127 const char* base_locale,
132 int f_bad_base_array_size;
133 int f_bad_info_bases;
134 char** f_bad_info_base_paths;
135 char** f_bad_info_base_names;
140 void define_composites(composite_mgr_t* mgr_ptr,
143 Boolean& base_exist);
147 typedef info_lib* info_libPtr;