//////////////////////////////////////////////////////////////////////////////
//
// Asura_SteamworksConfig.h
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

// B E G I N   F I L E   W R A P P E R ///////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef ___ASURA_STEAMWORKS_CONFIG_H___
#define ___ASURA_STEAMWORKS_CONFIG_H___ 1

#ifdef ASURA_PC_SUPPORT_STEAMWORKS

#include "Network/Asura_Platform_NetSocket.h"

// Used to hold configuration information from the command line (or other stream source)
// The information depend on the mode of execution:
// Server - should be and ip/udp pair : xxx.xxx.xxx.xxx:xxxxx - the IP usually 0.0.0.0 and the port is the binding port
// Client - should be either ip/udp pair (indicating the server location) or an 64 bits value in 8-dotted format indicating steam ID opaque view
// This class exist to allow bypassing the front end which rely on broadcasting mechanism which doesnt work in steam.
class Asura_PC_SteamworksConfig 
{
public:

	static bool SetServer(const char* szConfig);
	static bool SetClient(const char* szConfig);
	static void ClearConfig();

	static bool IsServer();
	static bool IsConfigured();
	static Asura_NetAddress GetAddress();
	static u_short GetPort();

private:

	static bool s_bWasConfigured;
	static bool s_bIsServer;
	static Asura_NetAddress s_xAddress; 
	static u_short s_usPort;


};

#endif // ASURA_PC_SUPPORT_STEAMWORKS

// E N D   F I L E   W R A P P E R ///////////////////////////////////////////

#endif // #ifndef ___ASURA_STEAMWORKS_CONFIG_H___
