diff options
Diffstat (limited to 'cpp/src/IceBT/Util.h')
-rw-r--r-- | cpp/src/IceBT/Util.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cpp/src/IceBT/Util.h b/cpp/src/IceBT/Util.h new file mode 100644 index 00000000000..1d11baaa8b7 --- /dev/null +++ b/cpp/src/IceBT/Util.h @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICE_BT_UTIL_H +#define ICE_BT_UTIL_H + +#include <IceBT/Config.h> +#include <IceBT/Types.h> + +#include <Ice/Network.h> + +namespace IceBT +{ + +bool isValidDeviceAddress(const std::string&); +bool parseDeviceAddress(const std::string&, DeviceAddress&); +std::string formatDeviceAddress(const DeviceAddress&); + +std::string addrToString(const std::string&, Ice::Int); +std::string addrToString(const SocketAddress&); +SocketAddress createAddr(const std::string&, Ice::Int); + +std::string fdToString(SOCKET); +void fdToAddressAndChannel(SOCKET, std::string&, int&, std::string&, int&); +int compareAddress(const SocketAddress&, const SocketAddress&); + +} + +#endif |