btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / package / Exception.h
blob2e41c1d9c22ab7ce2e8a47dff19a9268be5da171
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
9 #include <String.h>
11 #include <package/CommitTransactionResult.h>
14 using BPackageKit::BCommitTransactionResult;
15 using BPackageKit::BTransactionError;
18 class Exception {
19 public:
20 Exception(BTransactionError error);
22 BTransactionError Error() const
23 { return fError; }
25 status_t SystemError() const
26 { return fSystemError; }
27 Exception& SetSystemError(status_t error);
29 const BString& PackageName() const
30 { return fPackageName; }
31 Exception& SetPackageName(const BString& packageName);
33 const BString& Path1() const
34 { return fPath1; }
35 Exception& SetPath1(const BString& path);
37 const BString& Path2() const
38 { return fPath2; }
39 Exception& SetPath2(const BString& path);
41 const BString& String1() const
42 { return fString1; }
43 Exception& SetString1(const BString& string);
45 const BString& String2() const
46 { return fString2; }
47 Exception& SetString2(const BString& string);
49 void SetOnResult(BCommitTransactionResult& result);
51 private:
52 BTransactionError fError;
53 status_t fSystemError;
54 BString fPackageName;
55 BString fPath1;
56 BString fPath2;
57 BString fString1;
58 BString fString2;
62 #endif // EXCEPTION_H