config.h revision 287809
1139825Simp/*- 262976Smckusick * Copyright (c) 2013 Baptiste Daroussin <bapt@FreeBSD.org> 362976Smckusick * All rights reserved. 462976Smckusick * 562976Smckusick * Redistribution and use in source and binary forms, with or without 662976Smckusick * modification, are permitted provided that the following conditions 762976Smckusick * are met: 862976Smckusick * 1. Redistributions of source code must retain the above copyright 962976Smckusick * notice, this list of conditions and the following disclaimer. 1062976Smckusick * 2. Redistributions in binary form must reproduce the above copyright 1162976Smckusick * notice, this list of conditions and the following disclaimer in the 1262976Smckusick * documentation and/or other materials provided with the distribution. 1362976Smckusick * 1462976Smckusick * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1562976Smckusick * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1662976Smckusick * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1762976Smckusick * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1862976Smckusick * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1962976Smckusick * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2062976Smckusick * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2162976Smckusick * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2262976Smckusick * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2362976Smckusick * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2462976Smckusick * SUCH DAMAGE. 2562976Smckusick * 2662976Smckusick * $FreeBSD: stable/10/usr.sbin/pkg/config.h 287809 2015-09-15 05:46:55Z bapt $ 2762976Smckusick */ 2862976Smckusick 2962976Smckusick#ifndef _PKG_CONFIG_H 3062976Smckusick#define _PKG_CONFIG_H 3162976Smckusick 3262976Smckusick#define _LOCALBASE "/usr/local" 3363788Smckusick#define URL_SCHEME_PREFIX "pkg+" 3462976Smckusick 3562976Smckusicktypedef enum { 36116192Sobrien PACKAGESITE = 0, 37116192Sobrien ABI, 38116192Sobrien MIRROR_TYPE, 39158322Stegge ASSUME_ALWAYS_YES, 40158322Stegge SIGNATURE_TYPE, 4162976Smckusick FINGERPRINTS, 42105191Smckusick REPOS_DIR, 4362976Smckusick PUBKEY, 4473942Smckusick CONFIG_SIZE 4562976Smckusick} pkg_config_key; 4662976Smckusick 47177785Skibtypedef enum { 4862976Smckusick PKG_CONFIG_STRING=0, 4962976Smckusick PKG_CONFIG_BOOL, 50113376Sjeff PKG_CONFIG_LIST, 5162976Smckusick} pkg_config_t; 5262976Smckusick 5362976Smckusicktypedef enum { 5462976Smckusick CONFFILE_PKG=0, 5562976Smckusick CONFFILE_REPO, 56251171Sjeff} pkg_conf_file_t; 5762976Smckusick 5862976Smckusickint config_init(void); 59137035Sphkvoid config_finish(void); 60137035Sphkint config_string(pkg_config_key, const char **); 6162976Smckusickint config_bool(pkg_config_key, bool *); 6262976Smckusick 6362976Smckusick#endif 6462976Smckusick