summaryrefslogtreecommitdiff
path: root/cpp/src/IceBT/Util.h
blob: 5f35afb56d9f14846d301a3a72101115adf63ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// **********************************************************************
//
// Copyright (c) 2003-2016 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