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"
58 #include "schema/object_dict.h"
60 /*************************************/
62 /*************************************/
64 class info_lib : public primitive
68 info_lib(char** set_name_array, char** list_name_array,
69 char* info_lib_dir = 0, char* selected_base_name = 0,
70 char* info_lib_name = (char*)"", int descriptor = -1);
75 Boolean define_info_base( char* base_name,
81 // get a base (the manager of a collection of documents)
82 info_base* get_info_base(const char* info_base_name);
84 // get number of info bases in the lib
85 int num_of_bases() { return info_base_list.count(); };
88 const char* get_info_lib_path() { return info_lib_path; };
89 const char* get_info_lib_name() { return info_lib_name; };
90 const char* get_info_lib_uid() { return info_lib_uid; };
92 // iterator. 0 is the termination value
93 // can be used to get all base names
94 long first() { return info_base_list.first(); };
95 info_base* operator()(long ind) {
96 return (info_base*)(((dlist_void_ptr_cell*)ind)->void_ptr());
98 void next(long& ind) { info_base_list.next(ind); };
101 enum TestSelector { LOC, GRA };
102 info_base* getInfobaseByComponent( const char *locator_string,
103 enum TestSelector sel);
104 info_base** getInfobasesByComponent( char **locator_strings,
105 int count, enum TestSelector sel);
108 const char* get_bad_infobase_path(int);
109 const char* get_bad_infobase_name(int);
111 int descriptor() { return f_descriptor; };
114 char info_lib_path[PATHSIZ];
115 char info_lib_name[PATHSIZ];
116 char info_lib_uid[UIDSIZ];
117 dlist info_base_list;
122 object_dict *f_obj_dict;
124 info_base* _init_info_base( const char* new_db_path,
125 const char* base_name,
126 const char* base_desc,
127 const char* base_uid,
128 const char* base_locale,
133 int f_bad_base_array_size;
134 int f_bad_info_bases;
135 char** f_bad_info_base_names;
136 char** f_bad_info_base_paths;
141 void define_composites(composite_mgr_t* mgr_ptr,
144 Boolean& base_exist);
148 typedef info_lib* info_libPtr;