//////////////////////////////////////////////////////////////////////////////
//
// Asura_PS3_Network.h
//
// Copyright (c) 2007 Rebellion. All rights reserved.
//
// Description:
//
//     wrapper for various network libraries
//
//////////////////////////////////////////////////////////////////////////////

// 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_PS3_NETWORK_H___
#define ASURA_PS3_NETWORK_H___ 1

class Asura_PS3_Network
{
public:

	static bool Initialise();
	static void Shutdown();

	static bool IsConnecting() { return s_bConnecting; }
	static bool IsConnected();
	static bool GetConnectionError() { return s_bConnectionError; }

	// function to receive messages from sysutil callback
	static void SysUtilNetCtlEvent( uint64_t uStatus );

private:

	static void EventHandler( int iPrevState, int iNewState, int iEvent, int iErrorCode, void* pArg );
	static void ProcessSysUtilNetCtlResult( int iResult );

	static bool s_bInitialised;
	static bool s_bConnecting;
	static bool s_bConnectionError;
	static int s_iEventHandlerID;
};

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

#endif // #ifndef ASURA_PS3_NETWORK_H___
