summaryrefslogtreecommitdiff
path: root/doc/man3/alpm_databases.3
blob: 84eda8c5eea81756a6d211212cc69ed56dbfd746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.TH "Database Functions" 3 "16 Oct 2006" "libalpm" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Database Functions \- Frunctions to query and manipulate the database of libalpm.  

.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "pmdb_t * \fBalpm_db_register\fP (char *treename, alpm_cb_db_register callback)"
.br
.ti -1c
.RI "int \fBalpm_db_unregister\fP (pmdb_t *db)"
.br
.ti -1c
.RI "void * \fBalpm_db_getinfo\fP (PM_DB *db, unsigned char parm)"
.br
.ti -1c
.RI "int \fBalpm_db_setserver\fP (pmdb_t *db, char *url)"
.br
.ti -1c
.RI "int \fBalpm_db_update\fP (int level, PM_DB *db)"
.br
.ti -1c
.RI "pmpkg_t * \fBalpm_db_readpkg\fP (pmdb_t *db, char *name)"
.br
.ti -1c
.RI "PMList * \fBalpm_db_getpkgcache\fP (pmdb_t *db)"
.br
.ti -1c
.RI "PMList * \fBalpm_db_whatprovides\fP (pmdb_t *db, char *name)"
.br
.ti -1c
.RI "pmgrp_t * \fBalpm_db_readgrp\fP (pmdb_t *db, char *name)"
.br
.ti -1c
.RI "PMList * \fBalpm_db_getgrpcache\fP (pmdb_t *db)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Frunctions to query and manipulate the database of libalpm. 
.PP
.SH "Function Documentation"
.PP 
.SS "PMList* alpm_db_getgrpcache (pmdb_t * db)"
.PP
Get the group cache of a package database 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to get the group from 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of groups on success, NULL on error 
.RE
.PP

.SS "void* alpm_db_getinfo (PM_DB * db, unsigned char parm)"
.PP
Get informations about a database. 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP database pointer 
.br
\fIparm\fP name of the info to get 
.RE
.PP
\fBReturns:\fP
.RS 4
a void* on success (the value), NULL on error 
.RE
.PP

.SS "PMList* alpm_db_getpkgcache (pmdb_t * db)"
.PP
Get the package cache of a package database 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to get the package from 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of packages on success, NULL on error 
.RE
.PP

.SS "pmgrp_t* alpm_db_readgrp (pmdb_t * db, char * name)"
.PP
Get a group entry from a package database 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to get the group from 
.br
\fIname\fP of the group 
.RE
.PP
\fBReturns:\fP
.RS 4
the groups entry on success, NULL on error 
.RE
.PP

.SS "pmpkg_t* alpm_db_readpkg (pmdb_t * db, char * name)"
.PP
Get a package entry from a package database 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to get the package from 
.br
\fIname\fP of the package 
.RE
.PP
\fBReturns:\fP
.RS 4
the package entry on success, NULL on error 
.RE
.PP

.SS "pmdb_t* alpm_db_register (char * treename, alpm_cb_db_register callback)"
.PP
Register a package database 
.PP
\fBParameters:\fP
.RS 4
\fItreename\fP the name of the repository 
.br
\fIcallback\fP a function to be called upon new database creation 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, -1 on error (pm_errno is set accordingly) 
.RE
.PP

.SS "int alpm_db_setserver (pmdb_t * db, char * url)"
.PP
Set the serverlist of a database. 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP database pointer 
.br
\fIurl\fP url of the server 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, -1 on error (pm_errno is set accordingly) 
.RE
.PP

.SS "int alpm_db_unregister (pmdb_t * db)"
.PP
Unregister a package database 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to unregister 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, -1 on error (pm_errno is set accordingly) 
.RE
.PP

.SS "int alpm_db_update (int level, PM_DB * db)"
.PP
Update a package database 
.PP
\fBParameters:\fP
.RS 4
\fIlevel\fP control for checking lastupdate time 
.br
\fIdb\fP pointer to the package database to update 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up to date 
.RE
.PP

.SS "PMList* alpm_db_whatprovides (pmdb_t * db, char * name)"
.PP
Get the list of packages that a package provides 
.PP
\fBParameters:\fP
.RS 4
\fIdb\fP pointer to the package database to get the package from 
.br
\fIname\fP name of the package 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of packages on success, NULL on error 
.RE
.PP