Imake.tmpl: don't delete logfiles (make.log MakeOut)
[oweals/cde.git] / cde / programs / dtcm / libDtCmP / dtfns.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: dtfns.h /main/3 1995/11/03 10:37:45 rswiston $ */
24 /*      @(#)dtfns.h 1.3 94/11/07 SMI    */
25
26 /*                                                                      *
27  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
28  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
29  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
30  * (c) Copyright 1993, 1994 Novell, Inc.                                *
31  */
32
33
34 #ifndef _DTFNS_H
35 #define _DTFNS_H
36
37 #ifdef FNS
38
39 #include <fns/fns.h>
40
41 #define DTFNS_SEPERATOR         ':'
42
43 #define DTFNS_ORG_NAME          "org"
44 #define DTFNS_ORG_LEN           3
45
46 #define DTFNS_SITE_NAME         "site"
47 #define DTFNS_SITE_LEN          4
48
49 #define DTFNS_MYORG_NAME        "myorg"
50 #define DTFNS_MYORG_LEN         5
51
52 #define DTFNS_HOSTORG_NAME      "hostorg"
53 #define DTFNS_HOSTORG_LEN       7
54
55 #define DTFNS_HOST_NAME         "host"
56 #define DTFNS_HOST_LEN          4
57
58 #define DTFNS_THISUSER_NAME     "thisuser"
59 #define DTFNS_THISUSER_LEN      8
60
61 #define DTFNS_USER_NAME         "user"
62 #define DTFNS_USER_LEN          4
63
64 #define DTFNS_SERVICE_NAME      "service"
65 #define DTFNS_SERVICE_LEN       7
66
67 #define DTFNS_LONG_NAME_LEN     8               /* Longest of above names */
68
69 #define DTFNS_NULL_CONTEXT_TYPE         "SUNW_nscontext_null"
70 #define DTFNS_SERVICE_CONTEXT_TYPE      "SUNW_nscontext_service"
71
72 #define FNS_LIBRARY             "libfns.so.1"
73
74 extern int dtfns_init(void);
75 extern int dtfns_available(void);
76 extern int dtfns_service_name(const char *name, const char *type,
77                               const char *service, const char *service_type,
78                               const char *org, char *buf, const int size);
79 extern int dtfns_isa_helix_name(const char *);
80 extern int dtfns_lookup_str(const char *, char **, char *, int,
81                             char *, int);
82 extern int dtfns_str_from_ref(NS_Reference_t *, int posn,
83                               char *addr_buf, int addr_size,
84                               char *type_buf, int type_size);
85 extern int dtfns_append_to_ref(NS_Reference_t *, const char *addr,
86                                const char *addr_type);
87 extern int dtfns_bind_str(const char *name, const char *ref_type,
88                           char *types[], const char *new_str);
89
90 extern NS_Reference_t * dtfns_lookup_ref(const char *);
91 extern void             dtfns_myorg_name(char *, int);
92 extern NS_Context_t *   dtfns_get_initial_ctx(void);
93
94 extern const NS_ReferenceAddress_t * dtfns_addr_from_ref(const NS_Reference_t *,
95                                 char**, void**);
96 extern int   dtfns_str_from_addr(const NS_ReferenceAddress_t *, char *dbuf, int,
97                                                 char *tbuf, int);
98 extern NS_ReferenceAddress_t * dtfns_create_str_addr(const char *data,
99                                                     const char *type);
100
101 extern int dtfns_insert_addr(NS_Reference_t *, void **,
102                                 const NS_ReferenceAddress_t *);
103 extern int dtfns_delete_addr(NS_Reference_t *, void **);
104
105 #endif /* FNS */
106
107 #endif /* _DTFNS_H */
108