30 Ipv4Address() : _() {}
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]);
49class DalException :
public std::exception
51class __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);
80 SocketDescriptor() : mType(Type::None), mPortNum(), mSocketPath() {}
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;