~ubuntu-branches/debian/lenny/netatalk/lenny

« back to all changes in this revision

Viewing changes to libatalk/cnid/hash/cnid_hash.h

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2005-10-07 13:46:11 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051007134611-r07qa2g67xwkp2if
Tags: 2.0.3-1ubuntu1
* debian/netatalk.init
  - run cnid_metad if CNID_METAD_RUN=yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * interface for database access to cnids. i do it this way to abstract
 
3
 * things a bit in case we want to change the underlying implementation.
 
4
 */
 
5
 
 
6
#ifndef _ATALK_CNID_HASH__H
 
7
#define _ATALK_CNID_HASH__H 1
 
8
 
 
9
#include <sys/cdefs.h>
 
10
#include <sys/stat.h>
 
11
#include <unistd.h>
 
12
#include <string.h>
 
13
 
 
14
#include <netatalk/endian.h>
 
15
#include <atalk/cnid.h>
 
16
#define STANDALONE 1
 
17
 
 
18
#include <stdlib.h>
 
19
#include <stdio.h>
 
20
#include <fcntl.h>
 
21
#include <unistd.h>
 
22
#include <string.h>
 
23
#include <fcntl.h>
 
24
#include <errno.h>
 
25
#include <sys/mman.h>
 
26
#include <sys/stat.h>
 
27
#include <signal.h>
 
28
#include <atalk/tdb.h>
 
29
 
 
30
#define HASH_ERROR_LINK  1
 
31
#define HASH_ERROR_DEV   2
 
32
#define HASH_ERROR_INODE 4
 
33
 
 
34
struct _cnid_hash_private {
 
35
    dev_t  st_dev;
 
36
    int    st_set;
 
37
    int    error;
 
38
    TDB_CONTEXT *tdb;  
 
39
};
 
40
 
 
41
/* cnid_open.c */
 
42
extern struct _cnid_module cnid_hash_module;
 
43
extern struct _cnid_db *cnid_hash_open __P((const char *, mode_t));
 
44
 
 
45
/* cnid_close.c */
 
46
extern void cnid_hash_close __P((struct _cnid_db *));
 
47
 
 
48
/* cnid_add.c */
 
49
extern cnid_t cnid_hash_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
 
50
                                 char *, const int, cnid_t));
 
51
 
 
52
/* cnid_get.c */
 
53
extern cnid_t cnid_hash_get __P((struct _cnid_db *, const cnid_t, char *, const int));
 
54
extern char *cnid_hash_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
 
55
extern cnid_t cnid_hash_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
 
56
 
 
57
/* cnid_update.c */
 
58
extern int cnid_hash_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
 
59
                                 const cnid_t, char *, int));
 
60
 
 
61
/* cnid_delete.c */
 
62
extern int cnid_hash_delete __P((struct _cnid_db *, const cnid_t));
 
63
 
 
64
/* cnid_nextid.c */
 
65
extern cnid_t cnid_hash_nextid __P((struct _cnid_db *));
 
66
 
 
67
#endif /* include/atalk/cnid_hash.h */