• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/opkg-lede/libopkg/opkg_conf.h

  1 /* opkg_conf.h - the opkg 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_CONF_H
 19 #define OPKG_CONF_H
 20 
 21 typedef struct opkg_conf opkg_conf_t;
 22 extern opkg_conf_t *conf;
 23 
 24 #include <stdarg.h>
 25 #include <fnmatch.h>            /* FNM_CASEFOLD */
 26 
 27 #include "hash_table.h"
 28 #include "pkg_src_list.h"
 29 #include "pkg_dest_list.h"
 30 #include "nv_pair_list.h"
 31 
 32 #define OPKG_CONF_DEFAULT_TMP_DIR_BASE "/tmp"
 33 #define OPKG_CONF_TMP_DIR_SUFFIX "opkg-XXXXXX"
 34 #define OPKG_CONF_LISTS_DIR  OPKG_STATE_DIR_PREFIX "/lists"
 35 
 36 #define OPKG_CONF_DEFAULT_CONF_FILE_DIR OPKGETCDIR"/opkg"
 37 
 38 #define OPKG_CONF_DEFAULT_VERIFY_PROGRAM "/usr/sbin/opkg-key"
 39 
 40 /* In case the config file defines no dest */
 41 #define OPKG_CONF_DEFAULT_DEST_NAME "root"
 42 #define OPKG_CONF_DEFAULT_DEST_ROOT_DIR "/"
 43 
 44 #define OPKG_CONF_DEFAULT_HASH_LEN 1024
 45 
 46 struct opkg_conf {
 47         pkg_src_list_t pkg_src_list;
 48         pkg_dest_list_t pkg_dest_list;
 49         pkg_dest_list_t tmp_dest_list;
 50         nv_pair_list_t arch_list;
 51 
 52         int restrict_to_default_dest;
 53         pkg_dest_t *default_dest;
 54         char *dest_str;
 55 
 56         char *conf_file;
 57 
 58         char *tmp_dir;
 59         char *lists_dir;
 60 
 61         unsigned int pfm;       /* package field mask */
 62 
 63         /* For libopkg users to capture messages. */
 64         void (*opkg_vmessage) (int, const char *fmt, va_list ap);
 65 
 66         /* options */
 67         int autoremove;
 68         int force_depends;
 69         int force_defaults;
 70         int force_maintainer;
 71         int force_overwrite;
 72         int force_downgrade;
 73         int force_reinstall;
 74         int force_space;
 75         int force_removal_of_dependent_packages;
 76         int force_removal_of_essential_packages;
 77         int force_postinstall;
 78         int force_remove;
 79         int force_checksum;
 80         int check_signature;
 81         int force_signature;
 82         int no_check_certificate;
 83         int nodeps;             /* do not follow dependencies */
 84         int nocase;             /* perform case insensitive matching */
 85         char *offline_root;
 86         char *overlay_root;
 87         int query_all;
 88         int verbosity;
 89         char *verify_program;
 90         int noaction;
 91         int size;
 92         int strip_abi;
 93         int download_only;
 94         char *cache;
 95 
 96         /* proxy options */
 97         char *http_proxy;
 98         char *http_timeout;
 99         char *https_proxy;
100         char *ftp_proxy;
101         char *no_proxy;
102         char *proxy_user;
103         char *proxy_passwd;
104 
105         char *signature_ca_file;
106         char *signature_ca_path;
107 
108         hash_table_t pkg_hash;
109         hash_table_t file_hash;
110         hash_table_t obs_file_hash;
111 };
112 
113 enum opkg_option_type {
114         OPKG_OPT_TYPE_BOOL,
115         OPKG_OPT_TYPE_INT,
116         OPKG_OPT_TYPE_STRING
117 };
118 typedef enum opkg_option_type opkg_option_type_t;
119 
120 typedef struct opkg_option opkg_option_t;
121 struct opkg_option {
122         const char *name;
123         const opkg_option_type_t type;
124         void *const value;
125 };
126 
127 int opkg_conf_init(void);
128 int opkg_conf_load(void);
129 void opkg_conf_deinit(void);
130 
131 int opkg_conf_write_status_files(void);
132 char *root_filename_alloc(char *filename);
133 
134 #endif
135 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt