0ae01e7bca2c9f0bd2403fc9473c89d6d9d8b28f
1 /* pkg_hash.h - the opkg package management system
5 Copyright (C) 2002 Compaq Computer Corporation
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.
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.
24 #include "hash_table.h"
27 void pkg_hash_init(void);
28 void pkg_hash_deinit(void);
30 void pkg_hash_fetch_available(pkg_vec_t
*available
);
32 int pkg_hash_add_from_file(const char *file_name
, pkg_src_t
*src
,
33 pkg_dest_t
*dest
, int is_status_file
);
34 int pkg_hash_load_feeds(void);
35 int pkg_hash_load_status_files(void);
37 void hash_insert_pkg(pkg_t
*pkg
, int set_status
);
39 abstract_pkg_t
* ensure_abstract_pkg_by_name(const char * pkg_name
);
40 void pkg_hash_fetch_all_installed(pkg_vec_t
*installed
);
41 pkg_t
* pkg_hash_fetch_by_name_version(const char *pkg_name
,
42 const char * version
);
43 pkg_t
*pkg_hash_fetch_best_installation_candidate(abstract_pkg_t
*apkg
,
44 int (*constraint_fcn
)(pkg_t
*pkg
, void *data
), void *cdata
, int quiet
);
45 pkg_t
*pkg_hash_fetch_best_installation_candidate_by_name(const char *name
);
46 pkg_t
*pkg_hash_fetch_installed_by_name(const char *pkg_name
);
47 pkg_t
*pkg_hash_fetch_installed_by_name_dest(const char *pkg_name
,
50 void file_hash_remove(const char *file_name
);
51 pkg_t
*file_hash_get_file_owner(const char *file_name
);
52 void file_hash_set_file_owner(const char *file_name
, pkg_t
*pkg
);