using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace UnifiedPOS.Scanner.V1_4
{
    [ServiceContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public interface Scanner
    {
        #region Version 1.1

        //
        // Common Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetAutoDisable(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetAutoDisable(string ConsumerID, bool AutoDisable);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapCompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapCompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetCapCompareFirmwareVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapPowerReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapPowerReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        PowerReporting GetCapPowerReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapStatisticsReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapStatisticsReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetCapStatisticsReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapUpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapUpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetCapUpdateFirmware(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapUpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCapUpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetCapUpdateStatistics(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCheckHealthText", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetCheckHealthTextResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetCheckHealthText(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetClaimed", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetClaimedResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetClaimed(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDataCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDataCountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        int GetDataCount(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetDataEventEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetDataEventEnabled(string ConsumerID, bool DataEventEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetDeviceEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetDeviceEnabled(string ConsumerID, bool DeviceEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetFreezeEvents(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetFreezeEvents(string ConsumerID, bool FreezeEvents);

        // [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetOutputID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetOutputIDResponse")]
        // [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        // int GetOutputID(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        PowerNotification GetPowerNotify(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetPowerNotify(string ConsumerID, PowerNotification PowerNotify);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPowerState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPowerStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        PowerState GetPowerState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        ControlState GetState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceControlDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceControlDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetDeviceControlDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceControlVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceControlVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        UposVersion GetDeviceControlVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceServiceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceServiceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetDeviceServiceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceServiceVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDeviceServiceVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        UposVersion GetDeviceServiceVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPhysicalDeviceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPhysicalDeviceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetPhysicalDeviceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPhysicalDeviceName", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetPhysicalDeviceNameResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetPhysicalDeviceName(string ConsumerID);

        //
        // Specific Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDecodeData", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetDecodeDataResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        bool GetDecodeData(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDecodeData", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetDecodeDataResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetDecodeData(string ConsumerID, bool DecodeData);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanData", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanDataResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        byte[] GetScanData(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanDataLabel", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanDataLabelResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        byte[] GetScanDataLabel(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanDataType", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetScanDataTypeResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        int GetScanDataType(string ConsumerID);

        //
        // Common Methods
        //

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/Open", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/OpenResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        //void Open(string ConsumerID, string EndpointAddress);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/Close", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CloseResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        //void Close(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/Claim", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClaimResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void Claim(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/Release", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ReleaseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void Release(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CheckHealth", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CheckHealthResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void CheckHealth(string ConsumerID, HealthCheckLevel Level);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearInput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearInputResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void ClearInput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearInputProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearInputPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void ClearInputProperties(string ConsumerID);

        // [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearOutput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ClearOutputResponse")]
        // [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        // void ClearOutput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/DirectIO", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/DirectIOResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        DirectIOData DirectIO(string ConsumerID, int Command, int Data, object Obj);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        CompareFirmwareResult CompareFirmwareVersion(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ResetStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/ResetStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void ResetStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/RetrieveStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/RetrieveStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string RetrieveStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void UpdateFirmware(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void UpdateStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        //
        // Specific Methods
        //

        #endregion

        #region Version 1.2

        //
        // Session Management
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetWSPOSVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetWSPOSVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        UposVersion GetWSPOSVersion();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GenerateConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GenerateConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GenerateConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/OpenSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/OpenSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void OpenSession(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CloseSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CloseSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void CloseSession(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetProviderSessionTimeout", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetProviderSessionTimeoutResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        int GetProviderSessionTimeout(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/KeepAlive", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/KeepAliveResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void KeepAlive(string ConsumerID);

        //
        // Device Control
        // 

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/OpenDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/OpenDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void OpenDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CloseDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/CloseDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void CloseDevice(string ConsumerID);

        //
        // Event Polling
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/PollForUPOSEvent", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/PollForUPOSEventResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        ScannerEvent PollForUPOSEvent(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetEventResponse", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetEventResponseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetEventResponse(string ConsumerID, ScannerEventResponse EventResponse);

        #endregion

        #region Version 1.3

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetEncryptedClaimedConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/GetEncryptedClaimedConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        string GetEncryptedClaimedConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetEventRequestProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/Scanner/SetEventRequestPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/Scanner/UposException", Name = "UposException")]
        void SetEventRequestProperties(string ConsumerID, PropertyNameList list);

        #endregion
    }

    #region Version 1.1

    //
    // Common Data Types
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DirectIOData
    {
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class UposException
    {
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class UposVersion
    {
        [DataMember]
        public int Major { get; set; }
        [DataMember]
        public int Minor { get; set; }
        [DataMember]
        public int Build { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class Statistic
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Value { get; set; }
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/", ItemName = "Statistic")]
    public class StatisticList : List<Statistic>
    {
    }

    //
    // Common Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum CompareFirmwareResult
    {
        [EnumMember]
        CFV_FIRMWARE_OLDER,
        [EnumMember]
        CFV_FIRMWARE_SAME,
        [EnumMember]
        CFV_FIRMWARE_NEWER,
        [EnumMember]
        CFV_FIRMWARE_DIFFERENT,
        [EnumMember]
        CFV_FIRMWARE_UNKNOWN,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum ControlState
    {
        [EnumMember]
        S_CLOSED,
        [EnumMember]
        S_IDLE,
        [EnumMember]
        S_BUSY,
        [EnumMember]
        S_ERROR,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum ErrorCode
    {
        [EnumMember]
        E_CLOSED,
        [EnumMember]
        E_CLAIMED,
        [EnumMember]
        E_NOTCLAIMED,
        [EnumMember]
        E_NOSERVICE,
        [EnumMember]
        E_DISABLED,
        [EnumMember]
        E_ILLEGAL,
        [EnumMember]
        E_NOHARDWARE,
        [EnumMember]
        E_OFFLINE,
        [EnumMember]
        E_NOEXIST,
        [EnumMember]
        E_EXISTS,
        [EnumMember]
        E_FAILURE,
        [EnumMember]
        E_TIMEOUT,
        [EnumMember]
        E_BUSY,
        [EnumMember]
        E_EXTENDED,
        [EnumMember]
        E_DEPRECATED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum HealthCheckLevel
    {
        [EnumMember]
        CH_INTERNAL,
        [EnumMember]
        CH_EXTERNAL,
        [EnumMember]
        CH_INTERACTIVE,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum PowerNotification
    {
        [EnumMember]
        PN_DISABLED,
        [EnumMember]
        PN_ENABLED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum PowerReporting
    {
        [EnumMember]
        PR_NONE,
        [EnumMember]
        PR_STANDARD,
        [EnumMember]
        PR_ADVANCED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum PowerState
    {
        [EnumMember]
        PS_UNKNOWN,
        [EnumMember]
        PS_ONLINE,
        [EnumMember]
        PS_OFF,
        [EnumMember]
        PS_OFFLINE,
        [EnumMember]
        PS_OFF_OFFLINE,
    }

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum StatisticCategories
    {
        [EnumMember]
        All,
        [EnumMember]
        Manufacturer,
        [EnumMember]
        Upos,
    }
    */
    public class StatisticCategories
    {
        public const string All = "";
        public const string Manufacturer = "M_";
        public const string Upos = "U_";
    }

    //
    // Specific Data Types
    //

    //
    // Specific Enumerations
    //

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum BarCodeSymbology
    {
        [EnumMember]
        Aztec,
        [EnumMember]
        Cca,
        [EnumMember]
        Ccb,
        [EnumMember]
        Ccc,
        [EnumMember]
        Codabar,
        [EnumMember]
        Code128,
        [EnumMember]
        Code128Parsed,
        [EnumMember]
        Code39,
        [EnumMember]
        Code93,
        [EnumMember]
        DataMatrix,
        [EnumMember]
        Ean128,
        [EnumMember]
        Ean13S,
        [EnumMember]
        Ean8S,
        [EnumMember]
        EanJan13,
        [EnumMember]
        EanJan8,
        [EnumMember]
        Gs1DataBar,
        [EnumMember]
        Gs1DataBarExpanded,
        [EnumMember]
        Gs1DataBarExpandedStacked,
        [EnumMember]
        Gs1DataBarStackedOmnidirectional,
        [EnumMember]
        Itf,
        [EnumMember]
        Maxicode,
        [EnumMember]
        MicroPDF417,
        [EnumMember]
        MicroQRCode,
        [EnumMember]
        Ocra,
        [EnumMember]
        Ocrb,
        [EnumMember]
        Other,
        [EnumMember]
        Pdf417,
        [EnumMember]
        QRCode,
        [EnumMember]
        Rss14,
        [EnumMember]
        RssExpanded,
        [EnumMember]
        TF,
        [EnumMember]
        Unknown,
        [EnumMember]
        Upca,
        [EnumMember]
        Upcas,
        [EnumMember]
        Upcd1,
        [EnumMember]
        Upcd2,
        [EnumMember]
        Upcd3,
        [EnumMember]
        Upcd4,
        [EnumMember]
        Upcd5,
        [EnumMember]
        Upce,
        [EnumMember]
        Upces,
    }
    */
    public class BarCodeSymbology
    {
        public const int SCAN_SDT_UNKNOWN = 0;
        public const int SCAN_SDT_UPCA = 101;
        public const int SCAN_SDT_UPCE = 102;
        public const int SCAN_SDT_EAN8 = 103;
        public const int SCAN_SDT_JAN8 = 103;
        public const int SCAN_SDT_JAN13 = 104;
        public const int SCAN_SDT_EAN13 = 104;
        public const int SCAN_SDT_TF = 105;
        public const int SCAN_SDT_ITF = 106;
        public const int SCAN_SDT_Codabar = 107;
        public const int SCAN_SDT_Code39 = 108;
        public const int SCAN_SDT_Code93 = 109;
        public const int SCAN_SDT_Code128 = 110;
        public const int SCAN_SDT_UPCA_S = 111;
        public const int SCAN_SDT_UPCE_S = 112;
        public const int SCAN_SDT_UPCD1 = 113;
        public const int SCAN_SDT_UPCD2 = 114;
        public const int SCAN_SDT_UPCD3 = 115;
        public const int SCAN_SDT_UPCD4 = 116;
        public const int SCAN_SDT_UPCD5 = 117;
        public const int SCAN_SDT_EAN8_S = 118;
        public const int SCAN_SDT_EAN13_S = 119;
        public const int SCAN_SDT_EAN128 = 120;
        public const int SCAN_SDT_OCRA = 121;
        public const int SCAN_SDT_OCRB = 122;
        public const int SCAN_SDT_Code128_Parsed = 123;
        public const int SCAN_SDT_RSS14 = 131;
        public const int SCAN_SDT_RSS_EXPANDED = 132;
        public const int SCAN_SDT_GS1DATABAR = 131;
        public const int SCAN_SDT_GS1DATABAR_E = 132;
        public const int SCAN_SDT_ITF_CK = 133;
        public const int SCAN_SDT_GS1DATABAR_TYPE2 = 134;
        public const int SCAN_SDT_CCA = 151;
        public const int SCAN_SDT_CCB = 152;
        public const int SCAN_SDT_CCC = 153;
        public const int SCAN_SDT_DATAMATRIX = 203;
        public const int SCAN_SDT_PDF417 = 201;
        public const int SCAN_SDT_MAXICODE = 202;
        public const int SCAN_SDT_UQRCODE = 205;
        public const int SCAN_SDT_QRCODE = 204;
        public const int SCAN_SDT_AZTEC = 206;
        public const int SCAN_SDT_UPDF417 = 207;
        public const int SCAN_SDT_OTHER = 501;
    }

    //
    // Constants
    //

    /*
    public class Constants
    {
        public const int ExtendedErrorFirmwareBadFile = 281;
        public const int ExtendedErrorStatistics = 280;
        public const int ExtendedErrorStatisticsDependency = 282;
        public const string StatisticCommunicationErrorCount = "CommunicationErrorCount";
        public const string StatisticDeviceCategory = "DeviceCategory";
        public const string StatisticFirmwareRevision = "FirmwareRevision";
        public const string StatisticGoodScanCount = "GoodScanCount";
        public const string StatisticHoursPoweredCount = "HoursPoweredCount";
        public const string StatisticInstallationDate = "InstallationDate";
        public const string StatisticInterface = "Interface";
        public const string StatisticManufactureDate = "ManufactureDate";
        public const string StatisticManufacturerName = "ManufacturerName";
        public const string StatisticMechanicalRevision = "MechanicalRevision";
        public const string StatisticModelName = "ModelName";
        public const string StatisticSerialNumber = "SerialNumber";
        public const string StatisticUnifiedPOSVersion = "UnifiedPOSVersion";
        public const int WaitForever = -1;
    }
    */

    public class ExtendedError
    {
        public const int EFIRMWARE_BAD_FILE = 281;
        public const int ESTATS_ERROR = 280;
        public const int ESTATS_DEPENDENCY = 282;
    }

    public class StatisticProperties
    {
        public const string CommunicationErrorCount = "CommunicationErrorCount";
        public const string DeviceCategory = "DeviceCategory";
        public const string FirmwareRevision = "FirmwareRevision";
        public const string GoodScanCount = "GoodScanCount";
        public const string HoursPoweredCount = "HoursPoweredCount";
        public const string InstallationDate = "InstallationDate";
        public const string Interface = "Interface";
        public const string ManufactureDate = "ManufactureDate";
        public const string ManufacturerName = "ManufacturerName";
        public const string MechanicalRevision = "MechanicalRevision";
        public const string ModelName = "ModelName";
        public const string SerialNumber = "SerialNumber";
        public const string UnifiedPOSVersion = "UnifiedPOSVersion";
    }

    public class Wait
    {
        public const int FOREVER = -1;
    }

    #endregion

    #region Version 1.2

    //
    // Event Polling
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class ScannerEvent
    {
        [DataMember]
        public DataEvent DataEvent { get; set; }
        [DataMember]
        public DirectIOEvent DirectIOEvent { get; set; }
        [DataMember]
        public ErrorEvent ErrorEvent { get; set; }
        //[DataMember]
        //public OutputCompleteEvent OutputCompleteEvent { get; set; }
        [DataMember]
        public StatusUpdateEvent StatusUpdateEvent { get; set; }
        [DataMember]
        public DataContainedEvent DataContainedEvent { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class ScannerEventResponse
    {
        [DataMember]
        public DataEventResponse DataEventResponse { get; set; }
        [DataMember]
        public DataContainedEventResponse DataContainedEventResponse { get; set; }
        [DataMember]
        public DirectIOEventResponse DirectIOEventResponse { get; set; }
        [DataMember]
        public ErrorEventResponse ErrorEventResponse { get; set; }
        //[DataMember]
        //public OutputCompleteEventResponse OutputCompleteEventResponse { get; set; }
        [DataMember]
        public StatusUpdateEventResponse StatusUpdateEventResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DataEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DataEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DirectIOEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int EventNumber { get; set; }
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DirectIOEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DirectIOData DirectIOData { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class ErrorEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
        [DataMember]
        public ErrorLocus ErrorLocus { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class ErrorEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class OutputCompleteEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        int OutputID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class OutputCompleteEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class StatusUpdateEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class StatusUpdateEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum ErrorLocus
    {
        [EnumMember]
        EL_INPUT,
        [EnumMember]
        EL_INPUT_DATA,
        [EnumMember]
        EL_OUTPUT,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public enum ErrorResponse
    {
        [EnumMember]
        ER_CLEAR,
        [EnumMember]
        ER_CONTINUEINPUT,
        [EnumMember]
        ER_RETRY,
    }

    #endregion

    #region Version 1.3

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/", ItemName = "PropertyName")]
    public class PropertyNameList : List<string>
    {
    }



    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/", ItemName = "Parameter")]
    public class ParameterList : Dictionary<string, object>
    {
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DataContainedEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
        [DataMember]
        public ParameterList Parameters { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/Scanner/")]
    public class DataContainedEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public bool SetDataEventEnabled { get; set; }
        [DataMember]
        public bool CallClearInputProperties { get; set; }
    }

    #endregion
}
