File: sb_config.hh

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (41 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright (c) 2004, 2005 Nokia
 * Author: Timo Savola <tsavola@movial.fi>
 *
 * Licensed under GPL, see COPYING for details.
 */

#include <map>
#include <list>
#include <string>
#include <exception>

namespace sb {

	struct error :
		std::exception
	{
		error(const std::string &);
		error(const std::string &, const std::string &);
		error(const std::string &, const std::string &, const std::string &);
		~error() throw ();

		const char *what() const throw ();

	private:
		std::string message;
	};

	char *strip(char *);
	char *strip_quotes(char *);

	std::list<std::string> split(const std::string &);

	/**
	 * @return true if scratchbox.config exists (read: we are inside Scratchbox)
	 */
	bool read_config(std::map<std::string, std::string> &) throw (error);

	char **build_argv(const char *, std::list<std::string> &);

}