1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
29 cdl_exec (const std::string repository_tree, const std::string savefile_name, const std::string install_tree, bool no_resolve);
30 bool cmd_new (const std::string cdl_hardware, const std::string cdl_template = "default", const std::string cdl_version = "");
34 bool cmd_add (const std::vector<std::string> cdl_packages);
35 bool cmd_remove (const std::vector<std::string> cdl_packages);
36 bool cmd_version (const std::string cdl_version, const std::vector<std::string> cdl_packages);
37 bool cmd_template (const std::string cdl_template, const std::string cdl_version = "");
38 bool cmd_export (const std::string cdl_savefile);
39 bool cmd_import (const std::string cdl_savefile);
40 bool cmd_target (const std::string cdl_target);
43 static void set_quiet_mode(bool);
44 static void set_verbose_mode(bool);
45 static void set_ignore_errors_mode(bool);
46 static void set_no_updates_mode(bool);
47 static void set_debug_level(int);
52 static bool ignore_errors;
53 static bool no_updates;
54 std::string repository;
56 std::string install_prefix;
58 static bool debug_level_set;
59 static int debug_level;
60 CdlPackagesDatabase pkgdata;
61 CdlInterpreter interp;
62 CdlConfiguration config;
63 void init(bool /* load */);
64 void delete_cdl_data ();
65 static void diagnostic_handler (std::string message);
66 void exception_handler (CdlStringException exception);
67 void exception_handler ();
68 void report_conflicts();
69 static CdlInferenceCallbackResult inference_callback (CdlTransaction transaction);
70 static void transaction_callback(const CdlTransactionCallback&);
71 std::string resolve_package_alias (const std::string alias);
72 std::string resolve_hardware_alias (const std::string alias);
73 void update_debug_level(void);