/*! \file
 * \brief Handles requests to the PlusDevice.
 *
 * PlusDevice is a specific implementation of a SensorDevice for zForce Plus(TM).
 *
 * \copyright
 * COPYRIGHT NOTICE: (c) 2017-2022 Neonode Technologies AB. All rights reserved.
 */

#ifndef DEVICE_SENSORDEVICE_PLUSDEVICE_PLUSDEVICE_H
#define DEVICE_SENSORDEVICE_PLUSDEVICE_PLUSDEVICE_H 1

#ifndef ZFORCECOMMON_H
    #error Please include "zForceCommon.h" before this file.
#endif // ZFORCECOMMON_H

/*!
 * \brief Struct representing a PlusDevice.
 *
 * Struct representing a PlusDevice. PlusDevice is a specific implementation of a SensorDevice for zForce Plus(TM).
 */
struct PlusDevice
{
    /*!
     * Pointer to zForce.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    zForce                * zForce;
    /*!
     * The Connection this Device is part of.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    Connection            * Connection;
    /*!
     * Which type of Device this is.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    DeviceType              DeviceType;
    /*!
     * Which Device Index this device has.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    uint32_t                DeviceIndex;
    /*!
     * List of Storage Devices. Will change type during implementation.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    Device               ** StorageDevices;
    /*!
     * Number of Storage Devices.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    uint32_t                NumberOfStorageDevices;
    /*!
     * Private Protocol Data.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     */
    void                  * PrivateProtocolData;
    /*!
     * \brief Destructor.
     *
     * Destructs the Device and all base structs.
     * \n\n
     * Inherited from SensorDevice, Device base classes.
     *
     * \param self Pointer to the struct itself.
     *
     * \return No return value.
     */
    void                    ( * Destructor)(Device * self);
    /*!
     * Resolution of the device.
     * \n\n
     * Inherited from SensorDevice base class.
     */
    CartesianCoordinates    Resolution;
    /*!
     * Touch Active Area of the device.
     * \n\n
     * Inherited from SensorDevice base class.
     */
    TouchActiveArea         TouchActiveArea;
    /*!
     * Reverse The Touch Active Area of the device.
     * \n\n
     * Inherited from SensorDevice base class.
     */
    ReverseTouchActiveArea  ReverseTouchActiveArea;

    /*!
     * \brief Ask the Device if it is enabled.
     *
     * Asks the Device if it is enabled. Also reports if the device is in continuous mode and number of messages left to
     * receive.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetEnable)(SensorDevice * self);

    /*!
     * \brief Enable the device.
     *
     * Enables the device and sets it to either continuous mode or a specified number of messages. Not all protocols
     * handle non-continuous mode.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * - ::EINVALIDINPUT - Continuous cannot be false when numberOfMessages = 0.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param continuousMode Set to true for continuous mode.
     * \param numberOfMessages When in non-continuous mode, specifies how many Messages to receive before the Device
     *                         disables itself. May not be 0 when continuousMode == false.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetEnable)(SensorDevice * self, bool continuousMode, uint32_t numberOfMessages);

    /*!
     * \brief Ask the Device if it is disabled.
     *
     * Asks the device if it is disabled.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetDisable)(SensorDevice * self);

    /*!
     * \brief Disable the device.
     *
     * Disables the device. Messages will stop arriving as soon as the Device processes the request, but Messages
     * already in progress will still arrive as normal.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetDisable)(SensorDevice * self);

    /*!
     * \brief Get the Operating Modes.
     *
     * Gets the Operating Modes as two bitmasks.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetOperationModes)(SensorDevice * self);

    /*!
     * \brief Set the Operating Modes.
     *
     * Sets the Operating Modes of the Device as two bitmasks.\n
     * Setting the modeMask bit for a specific Mode to 1 changes it to become the corresponding bit in modeValues but
     * setting the bit to 0 does not change it.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * - ::EINVALIDINPUT - The modeMask and/or modeValue fields try to set bits that are not defined.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param modeMask A bit set to 1 means set to the corresponding bit in the modeValue field and 0 means do not
     *                 change this bit.
     * \param modeValues The value to set the bits to.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetOperationModes)(SensorDevice * self, OperationModes modeMask,
                                                                        OperationModes modeValues);

    /*!
     * \brief Get the Resolution.
     *
     * Gets the Resolution.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetResolution)(SensorDevice * self);

    /*!
     * \brief Set the Resolution.
     *
     * Sets the Resolution.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param x The Resolution of the X axis.
     * \param xIsValid Set to true to change this value or false to ignore it. Ignored on a Device that does not allow
     *                 it.
     * \param y The Resolution of the Y axis.
     * \param yIsValid Set to true to change this value or false to ignore it. Ignored on a Device that does not allow
     *                 it.
     * \param z The Resolution of the Z axis.
     * \param zIsValid Set to true to change this value or false to ignore it. Ignored on a Device that does not allow
     *                 it.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetResolution)(SensorDevice * self, uint32_t x, bool xIsValid,
                                                                    uint32_t y, bool yIsValid,
                                                                    uint32_t z, bool zIsValid);

    /*!
     * \brief Get the X- and Y-axes Reverse setting.
     *
     * Gets the X- and Y-axes Reverse setting.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetReverseTouchActiveArea)(SensorDevice * self);

    /*!
     * \brief Enable/Disable Reversing the X- and/or Y-Axes.
     *
     * Enables/Disables Reversing the X- and/or Y-Axes. When an axis is reversed, the 0-point starts on the opposite
     * end of it.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param xIsReversed True to reverse the X axis.
     * \param yIsReversed True to reverse the Y axis.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetReverseTouchActiveArea)(SensorDevice * self, bool xIsReversed, bool yIsReversed);

    /*!
     * \brief Get the Flip X/Y axes setting.
     *
     * Gets the Flip X/Y axes setting.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetFlipXY)(SensorDevice * self);

    /*!
     * \brief Enable/Disable flipping the X- and Y-axes.
     *
     * Enables/Disables flipping the X-axis and Y-axis. When the axis are flipped, the axis that in normal mode was X,
     * is now Y, and the axis that was Y is now X.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param axesAreflipped True to flip the axes.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetFlipXY)(SensorDevice * self, bool axesAreFlipped);

    /*!
     * \brief Get the Reflective Edge Filter setting.
     *
     * Gets the Reflective Edge Filter setting.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetReflectiveEdgeFilter)(SensorDevice * self);

    /*!
     * \brief Enable/Disable the Reflective Edge Filter.
     *
     * Enables/Disables the Reflective Edge Filter.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param isFilterOn True to enable the filter.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetReflectiveEdgeFilter)(SensorDevice * self, bool isFilterOn);

    /*!
     * \brief Get the current Merge Touches setting.
     *
     * Gets the current Merge Touches setting.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetMergeTouches)(SensorDevice * self);

    /*!
     * \brief Enable/Disable the Merge Touches setting.
     *
     * Enables/Disables the Merge Touches setting.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param areTouchesMerged True to enable merging touches.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetMergeTouches)(SensorDevice * self, bool areTouchesMerged);

    /*!
     * \brief Get the Touch Active Area.
     *
     * Gets the Touch Active Area.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetTouchActiveArea)(SensorDevice * self);

    /*!
     * \brief Set the Touch Active Area.
     *
     * Sets the Touch Active Area.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * - ::EINVALIDINPUT - Lower bound input values must be lower than upper.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param lowerBoundX The lower boundary for the X axis to set.
     * \param upperBoundX The upper boundary for the X axis to set.
     * \param xIsValid Set to true to change the values or false to ignore.
     * \param lowerBoundY The lower boundary for the Y axis to set.
     * \param upperBoundY The upper boundary for the Y axis to set.
     * \param yIsValid Set to true to change the values or false to ignore.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetTouchActiveArea)(SensorDevice * self, uint32_t lowerBoundX,
                                                                         uint32_t upperBoundX, bool xIsValid,
                                                                         uint32_t lowerBoundY,
                                                                         uint32_t upperBoundY, bool yIsValid);

    /*!
     * \brief Get the Detected Object Size Restriction.
     *
     * Gets the Detected Object Size Restriction.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetDetectedObjectSizeRestriction)(SensorDevice * self);

    /*!
     * \brief Set the Detected Object Size Restriction.
     *
     * Sets the Detected Object Size Restriction.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * - ::EINVALIDINPUT - Lower boundary input values must be lower than upper.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param minimumSize The minimum object size to detect by device.
     * \param maximumSize The maximum object size to detect by device.
     * \param minimumSizeIsValid Set to True to alter minimumSize detection.
     * \param maximumSizeIsValid Set to True to alter maximumSize detection.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetDetectedObjectSizeRestriction)(SensorDevice * self, uint32_t minimumSize,
                                                                                       uint32_t maximumSize,
                                                                                       bool minimumSizeIsValid,
                                                                                       bool maximumSizeIsValid);

    /*!
     * \brief Get the number of tracked objects.
     *
     * Gets the number of tracked objects.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetNumberOfTrackedObjects) (SensorDevice * self);

    /*!
     * \brief Set the number of tracked objects.
     *
     * Sets the number of tracked objects.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param numberOfTrackedObjects Tracked object count.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetNumberOfTrackedObjects) (SensorDevice * self, uint32_t numberOfTrackedObjects);

    /*!
     * \brief Get the X and Y offsets.
     *
     * Gets the X and Y offsets.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetOffset) (SensorDevice * self);

    /*!
     * \brief Set the X and Y offsets.
     *
     * Sets the X and Y offsets.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param offsetX X Offset.
     * \param offsetXIsValid Offset X is valid, i.e. you want to set X Offset.
     * \param offsetY Y Offset.
     * \param offsetYIsValid Offset Y is valid, i.e. you want to set Y Offset.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetOffset) (SensorDevice * self, uint32_t offsetX, bool offsetXIsValid,
                                                                 uint32_t offsetY, bool offsetYIsValid);

    /*!
     * \brief Get the Hid Display Size.
     *
     * Gets the Hid Display Size.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetHidDisplaySize) (SensorDevice * self);

    /*!
     * \brief Set the Hid Display Size.
     *
     * Sets the Hid Display Size.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param sizeX X Size.
     * \param sizeXIsValid X Size is valid, i.e. you want to set Size X.
     * \param sizeY Y Size.
     * \param sizeYIsValid Y Size is valid, i.e. you want to set Size Y.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetHidDisplaySize) (SensorDevice * self, uint32_t sizeX, bool sizeXIsValid,
                                                                         uint32_t sizeY, bool sizeYIsValid);

    /*!
     * \brief Get the Touch Mode.
     *
     * Gets the Touch Mode.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetTouchMode) (SensorDevice * self);

    /*!
     * \brief Set the Touch Mode.
     *
     * Sets the Touch Mode.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param touchMode Touch Mode to set.
     * \param touchModeIsValid Touch Mode is valid, i.e. you want to set Touch Mode.
     * \param clickOnTouchTime Click on Touch Time in ms.
     * \param clickOnTouchTimeIsValid Click On Touch Time is valid, i.e. you want to set Click On Touch Time.
     * \param clickOnTouchRadius Click on Touch Radius in 1/10th of mm.
     * \param clickOnTouchRadiusIsValid Click On Touch Radius is valid, i.e. you want to set Click On Touch Radius.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetTouchMode) (SensorDevice * self, TouchModes touchMode, bool touchModeIsValid,
                                                                    uint32_t clickOnTouchTime,
                                                                    bool clickOnTouchTimeIsValid,
                                                                    uint32_t clickOnTouchRadius,
                                                                    bool clickOnTouchRadiusIsValid);

    /*!
     * \brief Get the state of Floating Protection.
     *
     * Gets the state of Floating Protection.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetFloatingProtection) (SensorDevice * self);

    /*!
     * \brief Set Floating Protection.
     *
     * Sets Floating Protection.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     * \n\n
     * Inherited from SensorDevice base class.
     *
     * \param self Pointer to the struct itself.
     * \param enabled Floating Protection is enabled.
     * \param enabledIsValid Enable is valid, i.e. you want to Enable/Disable Floating Protection.
     * \param time Floating Protection Time in ms.
     * \param timeIsValid Floating Protection Time is valid, i.e. you want to set Floating Protection Time.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetFloatingProtection) (SensorDevice * self, bool enabled, bool enabledIsValid,
                                                                             uint32_t time, bool timeIsValid);

    /*!
     * \brief Get the state of Snapping Filter.
     *
     * Gets the state of Snapping Filter.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * GetSnappingFilter) (SensorDevice * self);

    /*!
     * \brief Set Snapping Filter.
     *
     * Sets Snapping Filter.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     *
     * \param self Pointer to the struct itself.
     * \param enabled Snapping Filter is enabled.
     * \param enabledIsValid Enable is valid, i.e. you want to Enable/Disable Snapping Filter.
     * \param leftInner Distance from edge to the inner snapping edge, left side of Touch Active Area.
     * \param leftOuter Distance from edge to the outer snapping edge, left side of Touch Active Area.
     * \param leftIsValid Left is valid, i.e. you want to update leftInner & leftOuter in Snapping Filter.
     * \param rightInner Distance from edge to the inner snapping edge, right side of Touch Active Area.
     * \param rightOuter Distance from edge to the outer snapping edge, right side of Touch Active Area.
     * \param rightIsValid Right is valid, i.e. you want to update rightInner & rightOuter in Snapping Filter.
     * \param topInner Distance from edge to the inner snapping edge, top side of Touch Active Area.
     * \param topOuter Distance from edge to the outer snapping edge, top side of Touch Active Area.
     * \param topIsValid Top is valid, i.e. you want to update topInner & topOuter in Snapping Filter.
     * \param bottomInner Distance from edge to the inner snapping edge, bottom side of Touch Active Area. 
     * \param bottomOuter Distance from edge to the outer snapping edge, bottom side of Touch Active Area.
     * \param bottomIsValid Bottom is valid, i.e. you want to update bottomInner & bottomOuter in Snapping Filter.
     *
     * \return True for success, false for failure. See errno.
     */
    bool                    ( * SetSnappingFilter) (SensorDevice * self, bool enabled, bool enabledIsValid,
                                                                         uint32_t leftInner,
                                                                         uint32_t leftOuter, bool leftIsValid,
                                                                         uint32_t rightInner,
                                                                         uint32_t rightOuter, bool rightIsValid,
                                                                         uint32_t topInner,
                                                                         uint32_t topOuter, bool topIsValid,
                                                                         uint32_t bottomInner,
                                                                         uint32_t bottomOuter, bool bottomIsValid);

    /*!
     * \brief Get the state of Double-Click Prevention.
     *
     * Gets the state of Double-Click Prevention
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     *
     * \param self Pointer to the struct itself.
     *
     * \return True for success, false for failure. See errno.
     */
     bool                    ( * GetDoubleClickPrevention) (SensorDevice * self);

    /*!
     * \brief Set Double-Click Prevention.
     *
     * Sets Double-Click Prevention.
     * \n\n
     * On failure, errno is set.
     * - ::EALREADYINPROGRESS - Another request is currently in progress.
     * - ::ENOTSUPPORTED - This request is not supported by this Protocol and/or Device.
     *
     * \param self Pointer to the struct itself.
     * \param enabled Double-Click Prevention is enabled.
     * \param enabledIsValid Enable is valid, i.e. you want to Enable/Disable Double-Click Prevention.
     * \param doubleClickPreventionTime Double-Click Prevention Time in ms.
     * \param doubleClickPreventionTimeIsValid Double-Click Prevention Time is valid, i.e. you want to set
     *                                         Double-Click Prevention Time.
     * \param doubleClickPreventionRadius Double-Click Prevention Radius in 1/10th of mm.
     * \param doubleClickPreventionTimeIsValid Double-Click Prevention Radius is valid, i.e. you want to set
     *                                         Double-Click Prevention Radius.
     *
     * \return True for success, false for failure. See errno.
     */
     bool                   ( * SetDoubleClickPrevention) (SensorDevice * self, bool enabled, bool enabledIsValid,
                                                                             uint32_t doubleClickPreventionTime,
                                                                             bool doubleClickPreventionTimeIsValid,
                                                                             uint32_t doubleClickPreventionRadius,
                                                                             bool doubleClickPreventionRadiusIsValid);
};

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

/*!
 * \brief Internal call used to create a new PlusDevice.
 *
 * Internal call used to create a new PlusDevice.
 * \n\n
 * On failure, errno is set.
 * - ::EINVALIDSIZE - Invalid size.
 *
 * \param connection The Connection the Device is associated with.
 * \param deviceType Which DeviceType to create.
 * \param deviceIndex Which Device Index to set.
 * \param size If this is used as a base class for another class, set size to non-zero.
 *
 * \return A pointer to the new Device.
 */
DLLINTERNAL PlusDevice * PlusDevice_New (Connection * connection, DeviceType deviceType, uint32_t deviceIndex,
                                                                  size_t size);

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // DEVICE_SENSORDEVICE_PLUSDEVICE_PLUSDEVICE_H
