#pragma once

namespace inertia
{

/** The default Ethernet Protocol ID. */
#define DEFAULT_ETHERNET_PROTOCOL_ID 0xBABE


/** @brief Ethernet Settings
 *
 *  Class containing settings for Ethernet connection.
 */
struct INERTIA_API EthernetSettings
{
	std::wstring adapterName; ///< The name of the network adapter used for the Ethernet connection.
	std::wstring macAddress;  ///< The MAC Address of the network adapter.
	unsigned protocolID;      ///< The Ethernet Protocol ID to use.
	unsigned gatewayID;       ///< The ID of the gateway to accept messages from, 0 to use the first detected gateway.

	/** Default constructor.
	 *  Without an adapterName EthernetSettings will be invalid.
	 */
	EthernetSettings();

	/** Constructor with individual arguments.
	 *  @param adapterName name of the network adapter
	 *  @param protocolID the protocolID to use
	 */
	EthernetSettings(std::wstring const& adapterName, unsigned const protocolID);

	/** Constructor with string argument.
	 *  Creates EthernetSettings from a string.
	 *  @param argString string with arguments
	 */
	EthernetSettings(std::wstring const& argString);

#ifdef WITH_BOOST_PROGRAM_OPTIONS
	/** Get the possible command-line arguments for EthernetSettings.
	 *  Only available when \a WITH_BOOST_PROGRAM_OPTIONS is defined.
	 *  @return the option description
	 */
	static const po::options_description GetOptionDescription();
#endif

	/** Get a string representation of this EthernetSettings.
	 *  The string is compatible with GetOptionDescription() and EthernetSettings(std::wstring const&).
	 *  @return the string
	 */
	std::wstring const ToString() const;
};

}
