// File: x11inputmodule.cpp
// Created by: <Falko Buttler>
// Created on: 15.04.2005

/**
 * iowarriorinputmodule.h - is part of the iwear-framework
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Input Library
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __IOWARRIORINPUTMODULE_H
#define __IOWARRIORINPUTMODULE_H

#ifndef __INPUTMODULE_H
#include <iwear_input/inputmodule.h>
#endif

#ifndef __INPUTMANAGER_H
#include <iwear_input/inputmanager.h>
#endif

#ifndef __IWEARIOWARRIOR_H
#include <iwear_iowarrior/iweariowarrior.h>
#endif

#ifndef __IOWARRIORINPUTFUNCTOR_H
#include <iwear_iowarrior/iowarriorinputfunctor.h>
#endif

using namespace iwear::iowarrior;
using namespace iwear::input;

namespace iwear { 
namespace input {
namespace iowarrior {

    /** Interface for all IOWarriorInputModules that will be implemented.
     * The IOWarriorInputModule implements all features which are needed by 
     * all IOWarriorinputmodules. 
     * Inheriting classes must add the InputEventTypes to the
     * input_event_types list.
     */
    class IOWarriorInputModule : public InputModule {
	
    public:

  	/** Creates a new IOWarriorInputModule. 
   	 * @param input_manager a pointer to the
	 *  input_manager to which the IOWarriorInputModule should be
	 *  registered to.
	 * @param io_warrior The IOWarrior instance from which the
	 *  events should be revieved.
	 */
	IOWarriorInputModule(InputManager* input_manager,
			     IWearIOWarrior* io_warrior, 
			     Configuration& conf);

	/** Destroys the IOWarriorInputModule.
	 * 
	 */
	virtual ~IOWarriorInputModule();

	InputHardwareInfo input_hardware_info;

    protected:

    private:
	uint32_t activate_power_state(iwear::power_state);
	IOWarriorInputFunctor* io_warrior_input_functor;
	IWearIOWarrior* io_warrior;
    };
} //  namespace iowarrior
} // namespce input
} //namespace iwear

#endif	// __IOWARRIORINPUTMODULE_H

