Accept topic changes from servers that do not send topic-set timestamps (fixes SF...
[ircu2.10.12-pk.git] / libs / dbprim / doc / man / man3 / dbprim_key.3
1 .TH "Database keys" 3 "6 Mar 2003" "dbprim" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Database keys \- 
6 .SS "Defines"
7
8 .in +1c
9 .ti -1c
10 .RI "#define \fBDB_KEY_INIT\fP(key, size)"
11 .br
12 .RI "\fIDatabase key static initializer.\fP"
13 .ti -1c
14 .RI "#define \fBdk_key\fP(key)"
15 .br
16 .RI "\fIDatabase key accessor macro.\fP"
17 .ti -1c
18 .RI "#define \fBdk_len\fP(key)"
19 .br
20 .RI "\fIDatabase key length accessor macro.\fP"
21 .in -1c
22 .SS "Typedefs"
23
24 .in +1c
25 .ti -1c
26 .RI "typedef struct _db_key_s \fBdb_key_t\fP"
27 .br
28 .RI "\fIDatabase key.\fP"
29 .in -1c
30 .SH "DETAILED DESCRIPTION"
31 .PP 
32 This module contains interfaces common to all database modules--mainly the macros concerned with manipulating database keys and the definition of the key structure.
33 .PP
34 The key may be any arbitrary pointer, including a pointer to a string. Everything that handles a key either copies the contents of the \fBdb_key_t\fP structure or passes it to a user-defined function. If required, as in the case of a string, a length may also be represented in the key structure. 
35 .SH "DEFINE DOCUMENTATION"
36 .PP 
37 .SS "#define DB_KEY_INIT(key, size)"
38 .PP
39 .PP
40  This macro allows a \fBdb_key_t\fP to be initialized statically.
41 .PP
42 \fBParameters: \fP
43 .in +1c
44 .TP
45 \fB\fIkey\fP\fP
46 A pointer to the key. 
47 .TP
48 \fB\fIsize\fP\fP
49 Size of the key. 
50 .SS "#define dk_key(key)"
51 .PP
52 .PP
53  This macro allows access to the key field of a \fBdb_key_t\fP. It may be used as an lvalue in order to assign a key to a \fBdb_key_t\fP.
54 .PP
55 \fBParameters: \fP
56 .in +1c
57 .TP
58 \fB\fIkey\fP\fP
59 A pointer to a \fBdb_key_t\fP. 
60 .PP
61 \fBReturns: \fP
62 .in +1c
63 A pointer to a key (\fCvoid *\fP). 
64 .SS "#define dk_len(key)"
65 .PP
66 .PP
67  This macro allows access to the key length field of a \fBdb_key_t\fP. It may be used as an lvalue in order to assign a length to a \fBdb_key_t\fP.
68 .PP
69 \fBParameters: \fP
70 .in +1c
71 .TP
72 \fB\fIkey\fP\fP
73 A pointer to a \fBdb_key_t\fP. 
74 .PP
75 \fBReturns: \fP
76 .in +1c
77 An \fCint\fP describing the length of the key. 
78 .SH "TYPEDEF DOCUMENTATION"
79 .PP 
80 .SS "typedef struct _db_key_s db_key_t"
81 .PP
82 .PP
83  This structure is a generic key containing a void * pointer and a length parameter. It should be accessed with * \fBdk_key\fP() and \fBdk_len\fP().