/*
 * This file is part of roccat-tools.
 *
 * roccat-tools 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, either version 2 of the License, or
 * (at your option) any later version.
 *
 * roccat-tools 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 roccat-tools. If not, see <http://www.gnu.org/licenses/>.
 */

#include "roccat/roccat.h"
#include "roccat/isku.h"
#include "roccat/iskufx.h"
#include "roccat/koneplus.h"
#include "roccat/konepure.h"
#include "roccat/konepureoptical.h"
#include "roccat/konextd.h"
#include "roccat/ryos.h"

guint roccat_talk_device_get_type(guint talk_device) {
	switch(talk_device) {
	case ROCCAT_TALK_DEVICE_MOUSE:
	case USB_DEVICE_ID_ROCCAT_KONEPLUS:
	case USB_DEVICE_ID_ROCCAT_KONEPURE:
	case USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL:
	case USB_DEVICE_ID_ROCCAT_KONEXTD:
		return ROCCAT_TALK_DEVICE_MOUSE;
		break;
	case ROCCAT_TALK_DEVICE_KEYBOARD:
	case USB_DEVICE_ID_ROCCAT_ISKU:
	case USB_DEVICE_ID_ROCCAT_ISKUFX:
	case USB_DEVICE_ID_ROCCAT_RYOS_MK:
	case USB_DEVICE_ID_ROCCAT_RYOS_MK_GLOW:
	case USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO:
		return ROCCAT_TALK_DEVICE_KEYBOARD;
		break;
	default:
		return ROCCAT_TALK_DEVICE_NONE;
		break;
	}
}

gchar const *roccat_talk_device_get_text_static(guint talk_device) {
	switch(talk_device) {
	case ROCCAT_TALK_DEVICE_ALL:
		return "All";
	case ROCCAT_TALK_DEVICE_KEYBOARD:
		return "*Any keyboard";
	case USB_DEVICE_ID_ROCCAT_ISKU:
		return ISKU_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_ISKUFX:
		return ISKUFX_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_RYOS_MK:
		return RYOS_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_RYOS_MK_GLOW:
		return RYOS_DEVICE_NAME_GLOW;
	case USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO:
		return RYOS_DEVICE_NAME_PRO;
	case ROCCAT_TALK_DEVICE_MOUSE:
		return "*Any mouse";
	case USB_DEVICE_ID_ROCCAT_KONEPLUS:
		return KONEPLUS_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_KONEPURE:
		return KONEPURE_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL:
		return KONEPUREOPTICAL_DEVICE_NAME;
	case USB_DEVICE_ID_ROCCAT_KONEXTD:
		return KONEXTD_DEVICE_NAME;
	default:
		return "unknown";
	}
}
