xref: /haiku/src/apps/terminal/ShellParameters.cpp (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include "ShellParameters.h"
8 
9 #include "TermConst.h"
10 
11 
12 ShellParameters::ShellParameters(int argc, const char* const* argv,
13 	const BString& currentDirectory)
14 	:
15 	fArguments(argv),
16 	fArgumentCount(argc),
17 	fCurrentDirectory(currentDirectory),
18 	fEncoding(M_UTF8)
19 {
20 }
21 
22 
23 void
24 ShellParameters::SetArguments(int argc, const char* const* argv)
25 {
26 	fArguments = argv;
27 	fArgumentCount = argc;
28 }
29 
30 
31 void
32 ShellParameters::SetCurrentDirectory(const BString& currentDirectory)
33 {
34 	fCurrentDirectory = currentDirectory;
35 }
36 
37 
38 void
39 ShellParameters::SetEncoding(int encoding)
40 {
41 	fEncoding = encoding;
42 }
43