Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / gtx / objdict.c
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10 /*
11 * Description:
12 * Implementation of the gator object dictionary.
13 *
14 *------------------------------------------------------------------------*/
15
16 #include <afsconfig.h>
17 #include <afs/param.h>
18
19 #include <roken.h>
20
21 #include "gtxobjdict.h" /*Interface for this module */
22
23 static char mn[] = "gator_objdict"; /*Module name */
24 static int objdict_debug; /*Is debugging turned on? */
25
26 /*------------------------------------------------------------------------
27 * gator_objdict_init
28 *
29 * Description:
30 * Initialize the gator object dictionary package.
31 *
32 * Arguments:
33 * int adebug: Is debugging turned on?
34 *
35 * Returns:
36 * 0 on success,
37 * Error value otherwise.
38 *
39 * Environment:
40 * *** MUST BE THE FIRST ROUTINE CALLED FROM
41 * THIS PACKAGE ***
42 *
43 * Side Effects:
44 * As advertised.
45 *------------------------------------------------------------------------*/
46
47 int
48 gator_objdict_init(int adebug)
49 { /*gator_objdict_init */
50
51 static char rn[] = "gator_objdict_init"; /*Routine name */
52
53 /*
54 * Remember what our debugging setting is.
55 */
56 objdict_debug = adebug;
57
58 if (objdict_debug)
59 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
60
61 /*
62 * Finally, return the good news.
63 */
64 return (0);
65
66 } /*gator_objdict_init */
67
68 /*------------------------------------------------------------------------
69 * gator_objdict_add
70 *
71 * Description:
72 * Add an entry to the gator object dictionary.
73 *
74 * Arguments:
75 * struct onode *objtoadd: Ptr to object to add.
76 *
77 * Returns:
78 * 0 on success,
79 * Error value otherwise.
80 *
81 * Environment:
82 * Nothing interesting.
83 *
84 * Side Effects:
85 * As advertised.
86 *------------------------------------------------------------------------*/
87
88 int
89 gator_objdict_add(struct onode *objtoadd)
90 { /*gator_objdict_add */
91
92 static char rn[] = "gator_objdict_add"; /*Routine name */
93
94 if (objdict_debug)
95 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
96
97 /*
98 * Finally, return the good news.
99 */
100 return (0);
101
102 } /*gator_objdict_add */
103
104 /*------------------------------------------------------------------------
105 * gator_objdict_delete
106 *
107 * Description:
108 * Delete an entry from the gator object dictionary.
109 *
110 * Arguments:
111 * struct onode *objtodelete: Ptr to object to delete.
112 *
113 * Returns:
114 * 0 on success,
115 * Error value otherwise.
116 *
117 * Environment:
118 * Nothing interesting.
119 *
120 * Side Effects:
121 * As advertised.
122 *------------------------------------------------------------------------*/
123
124 int
125 gator_objdict_delete(struct onode *objtodelete)
126 { /*gator_objdict_delete */
127
128 static char rn[] = "gator_objdict_delete"; /*Routine name */
129
130 if (objdict_debug)
131 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
132
133 /*
134 * Finally, return the good news.
135 */
136 return (0);
137
138 } /*gator_objdict_delete */
139
140 /*------------------------------------------------------------------------
141 * gator_objdict_lookup
142 *
143 * Description:
144 * Look up a gator object by name.
145 *
146 * Arguments:
147 * char *nametofind: String name of desired onode.
148 *
149 * Returns:
150 * Ptr to desired onode if successful,
151 * Null pointer otherwise.
152 *
153 * Environment:
154 * Nothing interesting.
155 *
156 * Side Effects:
157 * As advertised.
158 *------------------------------------------------------------------------*/
159
160 struct onode *
161 gator_objdict_lookup(char *nametofind)
162 { /*gator_objdict_lookup */
163
164 static char rn[] = "gator_objdict_lookup"; /*Routine name */
165
166 if (objdict_debug)
167 fprintf(stderr, "[%s:%s] Called\n", mn, rn);
168
169 /*
170 * Finally, return the good news.
171 */
172 return (NULL);
173
174 } /*gator_objdict_lookup */