1e8baeaa981b116e80c28201a94ca0d68778264b
[oweals/opkg-lede.git] / libopkg / opkg.h
1 /* opkg.h - the itsy package management system
2
3    Carl D. Worth
4
5    Copyright (C) 2001 University of Southern California
6
7    This program is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License as
9    published by the Free Software Foundation; either version 2, or (at
10    your option) any later version.
11
12    This program is distributed in the hope that it will be useful, but
13    WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    General Public License for more details.
16 */
17
18 #ifndef OPKG_H
19 #define OPKG_H
20
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24
25 #include "includes.h"
26 #include "opkg_conf.h"
27 #include "opkg_message.h"
28
29 #define OPKG_PKG_EXTENSION ".ipk"
30 #define DPKG_PKG_EXTENSION ".deb"
31
32 #define OPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"
33 #define OPKG_PKG_VERSION_SEP_CHAR '_'
34
35 #define OPKG_STATE_DIR_PREFIX OPKGLIBDIR"/opkg"
36 #define OPKG_LISTS_DIR_SUFFIX "lists"
37 #define OPKG_INFO_DIR_SUFFIX "info"
38 #define OPKG_STATUS_FILE_SUFFIX "status"
39
40 #define OPKG_BACKUP_SUFFIX "-opkg.backup"
41
42 #define OPKG_LIST_DESCRIPTION_LENGTH 128
43
44 enum opkg_error {
45     OPKG_SUCCESS = 0,
46     OPKG_PKG_DEPS_UNSATISFIED,
47     OPKG_PKG_IS_ESSENTIAL,
48     OPKG_PKG_HAS_DEPENDENTS,
49     OPKG_PKG_HAS_NO_CANDIDATE
50 };
51 typedef enum opkg_error opkg_error_t;
52
53 extern int opkg_state_changed;
54
55
56 struct errlist {
57     char * errmsg;
58     struct errlist * next;
59 } ;
60
61 struct errlist* error_list;
62
63
64 #endif