summaryrefslogtreecommitdiffstats
blob: cf24a265092d7f7b58e0b45b5473ca8ed2e0499f (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
36
/*
 * Copyright (c) 2010 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#ifndef SWIFTEN_HostAddressPort_H
#define SWIFTEN_HostAddressPort_H

#include "Swiften/Network/HostAddress.h"

namespace Swift {
	class HostAddressPort {
		public:
			HostAddressPort(const HostAddress& address, int port) : address_(address), port_(port) {
			}

			const HostAddress& getAddress() const {
				return address_;
			}

			int getPort() const {
				return port_;
			}

			bool operator==(const HostAddressPort& o) const {
				return address_ == o.address_ && port_ == o.port_;
			}

		private:
			HostAddress address_;
			int port_;
	};
}

#endif