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 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: tt_db_server_consts.h /main/3 1995/10/23 12:03:11 rswiston $ */
29 * tt_db_server_consts.h - Declares constants that are used by the
30 * _Tt_db_server_db class that may be useful
31 * in other parts of the DB server.
33 * Copyright (c) 1992 by Sun Microsystems, Inc.
37 #ifndef _TT_DB_SERVER_CONSTS_H
38 #define _TT_DB_SERVER_CONSTS_H
40 #include "db/tt_db_key.h"
47 // The TT_DB_VERSION should be set to the lowest version of ToolTalk
48 // that includes a DB server that is compatible with the current
49 // database table formats. Currently, the last change to the table
50 // formats took place in ToolTalk version 1.1.
51 #define TT_DB_VERSION "1.1"
53 #define TT_DB_FILE_TABLE_FILE "file_table"
54 #define TT_DB_FILE_OBJECT_MAP_FILE "file_object_map"
55 #define TT_DB_PROPERTY_TABLE_FILE "property_table"
56 #define TT_DB_ACCESS_TABLE_FILE "access_table"
58 #define TT_DB_PROPS_CACHE_LEVEL_PROPERTY "_MODIFICATION_DATE"
59 #define TT_DB_FORWARD_POINTER_PROPERTY "_NEW_OIDKEY"
60 #define TT_DB_OBJECT_TYPE_PROPERTY "_NODE_TYPE"
61 #define TT_DB_MESSAGE_PROPERTY "_TT_MSG_%d_%d"
62 #define TT_DB_MESSAGE_INFO_PROPERTY "_TT_QUEUED_MSGS"
64 // The ':' at the beginning of the file name is for old client
65 // compatibility. The old server protocol expects a ':' in all file
66 // paths to delimit a hostname.
67 #define TT_DB_FORWARD_POINTER_FILE ":.TT_DB_FORWARD_POINTER_FILE"
69 const int TT_DB_MAX_KEY_LENGTH = 120;
70 const int TT_DB_MAX_PROPERTY_NAME_LENGTH = 64;
72 const int TT_DB_LONG_SIZE = LONG_BIT/8;
73 const int TT_DB_SHORT_SIZE = 2;
75 const int TT_DB_FIRST_KEY_OFFSET = 0;
76 const int TT_DB_SECOND_KEY_OFFSET = TT_DB_KEY_LENGTH;
77 const int TT_DB_FILE_PATH_OFFSET = TT_DB_KEY_LENGTH;
78 const int TT_DB_PROPERTY_NAME_OFFSET = TT_DB_KEY_LENGTH;
79 const int TT_DB_PROPERTY_VALUE_OFFSET = TT_DB_KEY_LENGTH+
80 TT_DB_MAX_PROPERTY_NAME_LENGTH;
81 const int TT_DB_ACCESS_USER_OFFSET = TT_DB_KEY_LENGTH;
82 const int TT_DB_ACCESS_GROUP_OFFSET = TT_DB_KEY_LENGTH+TT_DB_LONG_SIZE;
83 const int TT_DB_ACCESS_MODE_OFFSET = TT_DB_KEY_LENGTH+2*TT_DB_LONG_SIZE;
85 #endif /* _TT_DB_SERVER_CONSTS_H */