swift
dbuserror.h
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #ifndef SWIFT_SIM_XSWIFTBUS_DBUSERROR_H
5 #define SWIFT_SIM_XSWIFTBUS_DBUSERROR_H
6 
7 #include <dbus/dbus.h>
8 
9 #include <string>
10 
11 namespace XSwiftBus
12 {
13 
15  class CDBusError
16  {
17  public:
19  enum ErrorType
20  {
21  NoError,
22  Other
23  };
24 
26  CDBusError() = default;
27 
29  explicit CDBusError(const DBusError *error);
30 
32  ErrorType getType() const { return m_errorType; }
33 
34  private:
35  ErrorType m_errorType = NoError;
36  std::string m_name;
37  std::string m_message;
38  };
39 
40 } // namespace XSwiftBus
41 
42 #endif // SWIFT_SIM_XSWIFTBUS_DBUSERROR_H
ErrorType
Error type.
Definition: dbuserror.h:20
ErrorType getType() const
Get error type.
Definition: dbuserror.h:32
CDBusError()=default
Default constructur.
Plugin loaded by X-Plane which publishes a DBus service.
Definition: command.h:14