1/*
2 * Copyright 2013-2014, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef EXCEPTION_H
6#define EXCEPTION_H
7
8
9#include <String.h>
10
11#include <package/CommitTransactionResult.h>
12
13
14using BPackageKit::BCommitTransactionResult;
15using BPackageKit::BTransactionError;
16
17
18class Exception {
19public:
20								Exception(BTransactionError error);
21
22			BTransactionError	Error() const
23									{ return fError; }
24
25			status_t			SystemError() const
26									{ return fSystemError; }
27			Exception&			SetSystemError(status_t error);
28
29			const BString&		PackageName() const
30									{ return fPackageName; }
31			Exception&			SetPackageName(const BString& packageName);
32
33			const BString&		Path1() const
34									{ return fPath1; }
35			Exception&			SetPath1(const BString& path);
36
37			const BString&		Path2() const
38									{ return fPath2; }
39			Exception&			SetPath2(const BString& path);
40
41			const BString&		String1() const
42									{ return fString1; }
43			Exception&			SetString1(const BString& string);
44
45			const BString&		String2() const
46									{ return fString2; }
47			Exception&			SetString2(const BString& string);
48
49			void				SetOnResult(BCommitTransactionResult& result);
50
51private:
52			BTransactionError	fError;
53			status_t			fSystemError;
54			BString				fPackageName;
55			BString				fPath1;
56			BString				fPath2;
57			BString				fString1;
58			BString				fString2;
59};
60
61
62#endif	// EXCEPTION_H
63