3 #include "audinate/dal/Types.hpp"
13 #define INLINE_STD_EXCEPTION inline
15 #define INLINE_STD_EXCEPTION
18 namespace Audinate {
namespace DAL {
20 enum class ChannelDirection
39 bool operator==(
const Ipv4Address & other)
const {
return _.addr32 == other._.addr32; }
40 bool operator!=(
const Ipv4Address & other)
const {
return !operator==(other); }
42 std::string toString()
const
44 return std::to_string(_.addr8[0]) +
"." + std::to_string(_.addr8[1]) +
"." + std::to_string(_.addr8[2]) +
"." + std::to_string(_.addr8[3]);
51 class __attribute__((visibility("default")))
DalException :
public std::exception
55 static DalException create(Error err,
const std::string & description);
56 static DalException create(
const std::string & name,
const std::string & description);
59 INLINE_STD_EXCEPTION Error getError() {
return mError; }
60 INLINE_STD_EXCEPTION std::string getErrorName()
const {
return mErrorName; }
61 INLINE_STD_EXCEPTION std::string getErrorDescription()
const {
return mErrorDescription; }
65 std::string mErrorName;
66 std::string mErrorDescription;
68 DalException(Error error,
const std::string & errorName,
const std::string & errorDescription);
81 SocketDescriptor(uint16_t portNum) : mType(Type::Port), mPortNum(portNum), mSocketPath() {}
82 SocketDescriptor(std::string socketPath) : mType(Type::Path), mPortNum(), mSocketPath(socketPath) {}
84 Type getType()
const {
return mType; }
85 uint16_t getPortNumber()
const {
return mPortNum; }
86 std::string getSocketPath()
const {
return mSocketPath; }
91 std::string mSocketPath;
149 std::string toString(Protocol protocol);
171 std::string toString(Component component);
173 enum class ComponentStatus
192 std::string toString(ComponentStatus status);
195 enum class TimeSource