#ifndef __ROCCAT_KONEPUREOPTICAL_H__
#define __ROCCAT_KONEPUREOPTICAL_H__

/*
 * 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 "konepure.h"

G_BEGIN_DECLS

enum {
	KONEPUREOPTICAL_CPI_VALUES_NUM = 7,
};

#define USB_DEVICE_ID_ROCCAT_KONEPURE_OPTICAL 0x2db4

#define KONEPUREOPTICAL_DBUS_SERVER_PATH "/org/roccat/Konepureoptical"
#define KONEPUREOPTICAL_DBUS_SERVER_INTERFACE "org.roccat.Konepureoptical"

#define KONEPUREOPTICAL_DEVICE_NAME "Kone Pure Optical"

RoccatDevice *konepureoptical_device_first(void);
RoccatDeviceScanner *konepureoptical_device_scanner_new(void);

KoneplusRmp *konepureoptical_default_rmp(void);
GKeyFile *konepureoptical_rmp_defaults(void);
KoneplusRmp *konepureoptical_rmp_load_actual(guint profile_index);
void konepureoptical_rmp_update_from_device(KoneplusRmp *rmp, RoccatDevice *device, guint profile_index);
KoneplusRmp *konepureoptical_rmp_load(RoccatDevice *device, guint profile_index, GError **error);
gboolean konepureoptical_rmp_save_actual(KoneplusRmp *rmp, guint profile_index, GError **error);
gboolean konepureoptical_rmp_save(RoccatDevice *device, KoneplusRmp *rmp, guint profile_index, GError **error);
KoneplusRmp *konepureoptical_rmp_load_save_after_reset(RoccatDevice *device, guint profile_index, GError **error);

KonepureProfileSettings *konepureoptical_rmp_to_profile_settings(KoneplusRmp *rmp);
void konepureoptical_rmp_update_with_profile_settings(KoneplusRmp *rmp, KonepureProfileSettings const *profile_settings);

RoccatKeyFile *konepureoptical_configuration_load(void);
gboolean konepureoptical_configuration_save(RoccatKeyFile *config, GError **error);

DBusGProxy *konepureoptical_dbus_proxy_new(void);
gboolean konepureoptical_dbus_emit_profile_data_changed_outside(DBusGProxy *proxy, guint profile_number);
gboolean konepureoptical_dbus_emit_profile_data_changed_outside_instant(guint profile_number);
gboolean konepureoptical_dbus_emit_profile_changed_outside(DBusGProxy *proxy, guint profile_number);
gboolean konepureoptical_dbus_emit_profile_changed_outside_instant(guint profile_number);
gboolean konepureoptical_dbus_emit_configuration_changed_outside(DBusGProxy *proxy);

G_END_DECLS

#endif

