Merge branch 'master' into cde-next
[oweals/cde.git] / cde / lib / DtHelp / AccessI.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: AccessI.h /main/7 1995/12/18 16:29:56 cde-hp $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        AccessI.h
28  **
29  **   Project:     Run Time Project File Access
30  **
31  **   Description: Header file for Access.h
32  **
33  **
34  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
35  **
36  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
37  **  (c) Copyright 1993, 1994 International Business Machines Corp.
38  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
39  **  (c) Copyright 1993, 1994 Novell, Inc.
40  **
41  **
42  ****************************************************************************
43  ************************************<+>*************************************/
44 #ifndef _DtHelpAccessI_h
45 #define _DtHelpAccessI_h
46
47
48 #ifndef _XtIntrinsic_h
49 /*
50  * typedef Boolean
51  */
52 #ifdef CRAY
53 typedef long            Boolean;
54 #else
55 typedef char            Boolean;
56 #endif
57 #endif
58
59 #ifndef _XLIB_H_
60 #ifndef True
61 #define True    1
62 #endif
63 #ifndef TRUE
64 #define TRUE    1
65 #endif
66 #ifndef False
67 #define False   0
68 #endif
69 #ifndef FALSE
70 #define FALSE   0
71 #endif
72 #endif
73
74 /******************************************************************************
75  *                   Semi-Public Structures
76  ******************************************************************************/
77 typedef struct {
78         char  match;
79         char *substitution;
80 } _DtSubstitutionRec;
81
82 typedef struct _dtHelpCeLockInfo {
83         int             fd;
84         _DtHelpVolumeHdl        volume;
85 } _DtHelpCeLockInfo;
86
87 /******************************************************************************
88  *                   Semi-Public Access Functions
89  ******************************************************************************/
90 extern  char    *_DtHelpCeExpandPathname (
91                         char               *spec,
92                         char               *filename,
93                         char               *type,
94                         char               *suffix,
95                         char               *lang,
96                         _DtSubstitutionRec *subs,
97                         int                 num );
98 extern  int      _DtHelpCeFileOpenAndSeek(
99                         char            *filename,
100                         int              offset,
101                         int              fd,
102                         BufFilePtr      *ret_file,
103                         time_t          *ret_time);
104 extern  int      _DtHelpCeGetDocStamp (
105                         _DtHelpVolumeHdl  volume,
106                         char            **ret_doc,
107                         char            **ret_time);
108 extern  int      _DtHelpCeGetLangSubParts (
109                         char             *lang,
110                         char            **subLang,
111                         char            **subTer,
112                         char            **subCodeSet );
113 extern  int      _DtHelpCeGetTopicChildren(
114                         _DtHelpVolumeHdl  volume,
115                         char             *topic_id,
116                         char            ***ret_childs);
117 extern  int      _DtHelpGetTopicTitle(
118                         _DtHelpVolumeHdl  volume,
119                         char             *target_id,
120                         char            **ret_title);
121 extern  int      _DtHelpCeGetUncompressedFileName (
122                         char              *name,
123                         char             **ret_name);
124 extern  const char *_DtHelpCeGetVolumeCharSet (
125                         _DtHelpVolumeHdl  volume);
126 extern  int      _DtHelpCeGetVolumeFlag (
127                         _DtHelpVolumeHdl  volume);
128 extern  int      _DtHelpCeIsTopTopic(
129                         _DtHelpVolumeHdl   volume,
130                         const char        *id);
131 extern  int      _DtHelpCeLockVolume(
132                         _DtHelpVolumeHdl   volume,
133                         _DtHelpCeLockInfo *ret_info);
134 extern  int      _DtHelpCeMapTargetToId (
135                         _DtHelpVolumeHdl  volume,
136                         char             *target_id,
137                         char            **ret_id);
138 extern  int      _DtHelpCeUnlockVolume(_DtHelpCeLockInfo lock_info);
139 #endif /* _DtHelpAccessI_h */