~ubuntu-branches/ubuntu/maverick/gwhere/maverick

« back to all changes in this revision

Viewing changes to src/data/gwcategory.h

  • Committer: Bazaar Package Importer
  • Author(s): Bart Martens
  • Date: 2007-01-27 16:01:01 UTC
  • mfrom: (2.1.1 feisty)
  • Revision ID: james.westby@ubuntu.com-20070127160101-u673yo4vke03jg26
Tags: 0.2.3.dfsg.1-2
* debian/rules: Convert gwhere.desktop to UTF-8.  Closes: #405137.
* debian/rules: Replace all "extraibles" with "extraíbles" in
  gwhere.desktop.  Closes: #405138.
* debian/copyright: Updated for year 2007.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  GWhere
2
 
 *  Copyright (C) 2000  S�bastien LECACHEUR
3
 
 *
4
 
 *  This program is free software; you can redistribute it and/or modify
5
 
 *  it under the terms of the GNU General Public License as published by
6
 
 *  the Free Software Foundation; either version 2 of the License, or
7
 
 *  (at your option) any later version.
8
 
 *
9
 
 *  This program is distributed in the hope that it will be useful,
10
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 *  GNU General Public License for more details.
13
 
 *
14
 
 *  You should have received a copy of the GNU General Public License
15
 
 *  along with this program; if not, write to the Free Software
16
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
 
 */
18
 
 
19
 
 
20
 
/*!
21
 
 * @header      gwcategory.h
22
 
 *              GWhere<br>
23
 
 *              Copyright (C) 2000  S�bastien LECACHEUR<br><br>
24
 
 *              This Distributed under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public Licence</a><br><br>
25
 
 *              This component was developed for the GWhere project.<br>
26
 
 *              It's an object for category representation. His structure gets many informations as file name, description, ...<br><br>
27
 
 * @abstract    This is the category data structure.
28
 
 * @author      S�bastien LECACHEUR <zero@gwhere.org>
29
 
 * @version     1.0 2001/08/21
30
 
 * @see         gwsupport.h
31
 
 * @see         glib.h
32
 
 * @link                GWhere Web Site <http://www.gwhere.org>
33
 
 * @link                GTK+ Web Site <http://www.gtk.org>
34
 
 * @ref         gwcategory.c
35
 
 * @author      Author <zero@gwhere.org>
36
 
 */
37
 
 
38
 
 
39
 
#ifndef GW_DATA_CATEGORY_H
40
 
#define GW_DATA_CATEGORY_H
41
 
 
42
 
 
43
 
#include <glib.h>
44
 
 
45
 
 
46
 
/*!
47
 
 * @struct      category
48
 
 * @abstract    Category data structure
49
 
 * @discussion  Category data is an opaque data structure containing information about a category.
50
 
 */
51
 
struct category;
52
 
 
53
 
 
54
 
/*!
55
 
 * @function    category_new
56
 
 * @abstract    Creates a new category.
57
 
 * @discussion  This function creates a new category. It's an allocation function.
58
 
 * @result      a pointer to the category structure.<br>
59
 
 *              Returns <i>NULL</i> when an error occured.<br>
60
 
 */
61
 
struct category * category_new ( void);
62
 
 
63
 
 
64
 
/*!
65
 
 * @function    category_set_index
66
 
 * @abstract    Sets the category's index.
67
 
 * @discussion  This function sets the category's index. This index must be unique.<br>
68
 
 * @param       p               the category to set the name
69
 
 * @param       index           the index number
70
 
 * @result      an error code.<br>
71
 
 *              Returns <i>0</i> when it's done.<br>
72
 
 *              Returns <i>-1</i> when an error occured.<br>
73
 
 */
74
 
gint category_set_index ( struct category *p, gint index);
75
 
 
76
 
 
77
 
/*!
78
 
 * @function    category_set_name
79
 
 * @abstract    Sets the category's name.
80
 
 * @discussion  This function sets the category's name.<br>
81
 
 *              The name may be <i>null</i>. It's dangerous!!
82
 
 * @param       p               the category to set the name
83
 
 * @param       name            the name
84
 
 * @result      an error code.<br>
85
 
 *              Returns <i>0</i> when it's done.<br>
86
 
 *              Returns <i>-1</i> when an error occured.<br>
87
 
 */
88
 
gint category_set_name ( struct category *p, gchar *name);
89
 
 
90
 
 
91
 
/*!
92
 
 * @function    category_set_description
93
 
 * @abstract    Sets the category's description.
94
 
 * @discussion  This function sets the category's description.<br>
95
 
 * @param       p               the category to set the description
96
 
 * @param       description     the description
97
 
 * @result      an error code.<br>
98
 
 *              Returns <i>0</i> when it's done.<br>
99
 
 *              Returns <i>-1</i> when an error occured.<br>
100
 
 */
101
 
gint category_set_description ( struct category *p, gchar *description);
102
 
 
103
 
 
104
 
/*!
105
 
 * @function    category_set_number_catalog
106
 
 * @abstract    Sets the category's number catalogs.
107
 
 * @discussion  This function sets the number of catalogs which use this category.<br>
108
 
 * @param       p               the category to set the number of catalogs
109
 
 * @param       num             the number of catalogs
110
 
 * @result      an error code.<br>
111
 
 *              Returns <i>0</i> when it's done.<br>
112
 
 *              Returns <i>-1</i> when an error occured.<br>
113
 
 */
114
 
gint category_set_number_catalog ( struct category *p, gint num);
115
 
 
116
 
 
117
 
/*!
118
 
 * @function    category_set_number_disk
119
 
 * @abstract    Sets the category's number disks.
120
 
 * @discussion  This function sets the number of disks which use this category.<br>
121
 
 * @param       p               the category to set the number of disks
122
 
 * @param       num             the number of disks
123
 
 * @result      an error code.<br>
124
 
 *              Returns <i>0</i> when it's done.<br>
125
 
 *              Returns <i>-1</i> when an error occured.<br>
126
 
 */
127
 
gint category_set_number_disk ( struct category *p, gint num);
128
 
 
129
 
 
130
 
/*!
131
 
 * @function    category_set_number_folder
132
 
 * @abstract    Sets the category's number folders.
133
 
 * @discussion  This function sets the number of folders which use this category.<br>
134
 
 * @param       p               the category to set the number of folders
135
 
 * @param       num             the number of folders
136
 
 * @result      an error code.<br>
137
 
 *              Returns <i>0</i> when it's done.<br>
138
 
 *              Returns <i>-1</i> when an error occured.<br>
139
 
 */
140
 
gint category_set_number_folder ( struct category *p, gint num);
141
 
 
142
 
 
143
 
/*!
144
 
 * @function    category_set_number_file
145
 
 * @abstract    Sets the category's number files.
146
 
 * @discussion  This function sets the number of files which use this category.<br>
147
 
 * @param       p               the category to set the number of files
148
 
 * @param       num             the number of files
149
 
 * @result      an error code.<br>
150
 
 *              Returns <i>0</i> when it's done.<br>
151
 
 *              Returns <i>-1</i> when an error occured.<br>
152
 
 */
153
 
gint category_set_number_file ( struct category *p, gint num);
154
 
 
155
 
 
156
 
/*!
157
 
 * @function    category_get_index
158
 
 * @abstract    Gets the category's index.
159
 
 * @discussion  This function gets the category's index.<br>
160
 
 * @param       p               the category to get index
161
 
 * @result      the category index.<br>
162
 
 *              Returns <i>-1</i> when an error occured.<br>
163
 
 */
164
 
gint category_get_index ( struct category *p);
165
 
 
166
 
 
167
 
/*!
168
 
 * @function    category_get_name
169
 
 * @abstract    Gets the category's name.
170
 
 * @discussion  This function gets the category's name.<br>
171
 
 * @param       p               the category to get name
172
 
 * @result      the category name.<br>
173
 
 *              Returns <i>""</i> if the category name is <i>NULL</i>
174
 
 *              Returns <i>NULL</i> when an error occured.<br>
175
 
 */
176
 
gchar * category_get_name ( struct category *p);
177
 
 
178
 
 
179
 
/*!
180
 
 * @function    category_get_description
181
 
 * @abstract    Gets the category's description.
182
 
 * @discussion  This function gets the category's description.<br>
183
 
 * @param       p               the category to get description
184
 
 * @result      the category description.<br>
185
 
 *              Returns <i>""</i> if the category description is <i>NULL</i>
186
 
 *              Returns <i>NULL</i> when an error occured.<br>
187
 
 */
188
 
gchar * category_get_description ( struct category *p);
189
 
 
190
 
 
191
 
/*!
192
 
 * @function    category_get_number_catalog
193
 
 * @abstract    Gets the category's number catalogs.
194
 
 * @discussion  This function gets the number of catalogs which use this category.<br>
195
 
 * @param       p               the category to get number of catalogs
196
 
 * @result      the number of catalogs.<br>
197
 
 *              Returns <i>-1</i> when an error occured.<br>
198
 
 */
199
 
gint category_get_number_catalog ( struct category *p);
200
 
 
201
 
 
202
 
/*!
203
 
 * @function    category_get_number_disk
204
 
 * @abstract    Gets the category's number disks.
205
 
 * @discussion  This function gets the number of disks which use this category.<br>
206
 
 * @param       p               the category to get number of disks
207
 
 * @result      the number of disks.<br>
208
 
 *              Returns <i>-1</i> when an error occured.<br>
209
 
 */
210
 
gint category_get_number_disk ( struct category *p);
211
 
 
212
 
 
213
 
/*!
214
 
 * @function    category_get_number_folder
215
 
 * @abstract    Gets the category's number folders.
216
 
 * @discussion  This function gets the number of folders which use this category.<br>
217
 
 * @param       p               the category to get number of folders
218
 
 * @result      the number of folders.<br>
219
 
 *              Returns <i>-1</i> when an error occured.<br>
220
 
 */
221
 
gint category_get_number_folder ( struct category *p);
222
 
 
223
 
 
224
 
/*!
225
 
 * @function    category_get_number_file
226
 
 * @abstract    Gets the category's number files.
227
 
 * @discussion  This function gets the number of files which use this category.<br>
228
 
 * @param       p               the category to get number of files
229
 
 * @result      the number of files.<br>
230
 
 *              Returns <i>-1</i> when an error occured.<br>
231
 
 */
232
 
gint category_get_number_file ( struct category *p);
233
 
 
234
 
 
235
 
/*!
236
 
 * @function    category_add_catalog
237
 
 * @abstract    Adds a catalog to the category
238
 
 * @discussion  This function adds a catalog that use this category. This function increments the category's number of catalogs.<br>
239
 
 * @param       p               the category to add a catalog
240
 
 * @result      the number of catalogs.<br>
241
 
 *              Returns <i>-1</i> when an error occured.<br>
242
 
 */
243
 
gint category_add_catalog ( struct category *p);
244
 
 
245
 
 
246
 
/*!
247
 
 * @function    category_add_disk
248
 
 * @abstract    Adds a disk to the category
249
 
 * @discussion  This function adds a disk that use this category. This function increments the category's number of disks.<br>
250
 
 * @param       p               the category to add a disk
251
 
 * @result      the number of disks.<br>
252
 
 *              Returns <i>-1</i> when an error occured.<br>
253
 
 */
254
 
gint category_add_disk ( struct category *p);
255
 
 
256
 
 
257
 
/*!
258
 
 * @function    category_add_folder
259
 
 * @abstract    Adds a folder to the category
260
 
 * @discussion  This function adds a folder that use this category. This function increments the category's number of folders.<br>
261
 
 * @param       p               the category to add a folder
262
 
 * @result      the number of folders.<br>
263
 
 *              Returns <i>-1</i> when an error occured.<br>
264
 
 */
265
 
gint category_add_folder ( struct category *p);
266
 
 
267
 
 
268
 
/*!
269
 
 * @function    category_add_file
270
 
 * @abstract    Adds a file to the category
271
 
 * @discussion  This function adds a file that use this category. This function increments the category's number of files.<br>
272
 
 * @param       p               the category to add a file
273
 
 * @result      the number of files.<br>
274
 
 *              Returns <i>-1</i> when an error occured.<br>
275
 
 */
276
 
gint category_add_file ( struct category *p);
277
 
 
278
 
 
279
 
/*!
280
 
 * @function    category_remove_catalog
281
 
 * @abstract    Removes a catalog to the category
282
 
 * @discussion  This function removes a catalog that use this category. This function decriment the category's number of catalogs.<br>
283
 
 * @param       p               the category to remove a catalog
284
 
 * @result      the number of catalogs.<br>
285
 
 *              Returns <i>-1</i> when an error occured.<br>
286
 
 */
287
 
gint category_remove_catalog ( struct category *p);
288
 
 
289
 
 
290
 
/*!
291
 
 * @function    category_remove_disk
292
 
 * @abstract    Removes a disk to the category
293
 
 * @discussion  This function removes a disk that use this category. This function decriment the category's number of disks.<br>
294
 
 * @param       p               the category to remove a disk
295
 
 * @result      the number of disks.<br>
296
 
 *              Returns <i>-1</i> when an error occured.<br>
297
 
 */
298
 
gint category_remove_disk ( struct category *p);
299
 
 
300
 
 
301
 
/*!
302
 
 * @function    category_remove_folder
303
 
 * @abstract    Removes a folder to the category
304
 
 * @discussion  This function removes a folder that use this category. This function decriment the category's number of folders.<br>
305
 
 * @param       p               the category to remove a folder
306
 
 * @result      the number of folders.<br>
307
 
 *              Returns <i>-1</i> when an error occured.<br>
308
 
 */
309
 
gint category_remove_folder ( struct category *p);
310
 
 
311
 
 
312
 
/*!
313
 
 * @function    category_remove_file
314
 
 * @abstract    Removes a file to the category
315
 
 * @discussion  This function removes a file that use this category. This function decriment the category's number of files.<br>
316
 
 * @param       p               the category to remove a file
317
 
 * @result      the number of files.<br>
318
 
 *              Returns <i>-1</i> when an error occured.<br>
319
 
 */
320
 
gint category_remove_file ( struct category *p);
321
 
 
322
 
 
323
 
/*!
324
 
 * @function    category_can_removed
325
 
 * @abstract    Gets if the category can be removed.
326
 
 * @discussion  This function gets if the category can be removed. The category can be removed if nothing use this category<br>
327
 
 * @param       p               the category to know if it can be removed
328
 
 * @result      is can be removed.<br>
329
 
 *              Returns <i>FALSE</i> when an error occured.<br>
330
 
 */
331
 
gboolean category_can_removed ( struct category *p);
332
 
 
333
 
 
334
 
/*!
335
 
 * @function    category_free
336
 
 * @abstract    Frees datas structure.
337
 
 * @discussion  This function frees the category's datas.
338
 
 * @param       p               the category to free
339
 
 * @result      an error code.<br>
340
 
 *              Returns <i>0</i> when it's done.<br>
341
 
 *              Returns <i>-1</i> when an error occured.<br>
342
 
 */
343
 
gint category_free ( struct category *p);
344
 
 
345
 
 
346
 
#endif