/*********************************************************\
         __      __           __  __
        / /     / / _____    / / / / ______   __     __
       / /     / / /___  \  / / / / / ___  | / /    / /
      / /_____/ / _____| / / / / / / /__/ / / /    / /
     / ______  / / ___  / / / / / / _____/ / /    / /
    / /     / / / /__/ / / / / / / |____  / |____/ /
   /_/     /_/ |______/ /_/ /_/  \_____/  \_____  /
                                         ______/ /
            High Level Game Framework   /_______/

  ------------------------------------------------------

  Copyright (c) 2009 - Rodrigo Braz Monteiro.
  This file is subject to the terms of license.txt.

\*********************************************************/

#pragma once

#include "input_joystick.h"
#ifdef XINPUT_AVAILABLE

namespace Halley {

	// XInput implementation
	class InputJoystickXInput : public InputJoystick {
	public:
		~InputJoystickXInput();
		std::string getName() const;

		bool isEnabled() const { return enabled; }

		JoystickType getType() const {
			return JOYSTICK_360;
		}

		void setVibration(float high, float low);

	private:
		InputJoystickXInput(int number);

		void update();
		void setEnabled(bool enabled);

		int index;
		int cooldown;
		bool enabled;

		friend class Input;
	};
}

#endif
