<commit_before>/* Copyright (c) 2012 <NAME>, All Rights Reserved
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 */
package com.sun.jna.platform.win32;

import java.util.Arrays;
import java.util.List;

import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.Guid.GUID;
import com.sun.jna.platform.win32.WinDef.LONG;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import com.sun.jna.platform.win32.WinUser.HDEVNOTIFY;
import com.sun.jna.win32.StdCallLibrary;

/**
 * Based on dbt.h (various types)
 * 
 * @author <NAME>, <EMAIL>
 */
@SuppressWarnings("serial")
public interface DBT extends StdCallLibrary {

    /** The dbt no disk space. */
    int DBT_NO_DISK_SPACE = 0x0047;

    /** The dbt low disk space. */
    int DBT_LOW_DISK_SPACE = 0x0048;

    /** The dbt configmgprivate. */
    int DBT_CONFIGMGPRIVATE = 0x7FFF;

    /** The dbt devicearrival. */
    int DBT_DEVICEARRIVAL = 0x8000;

    /** The dbt devicequeryremove. */
    int DBT_DEVICEQUERYREMOVE = 0x8001;

    /** The dbt devicequeryremovefailed. */
    int DBT_DEVICEQUERYREMOVEFAILED = 0x8002;

    /** The dbt deviceremovepending. */
    int DBT_DEVICEREMOVEPENDING = 0x8003;

    /** The dbt deviceremovecomplete. */
    int DBT_DEVICEREMOVECOMPLETE = 0x8004;

    /** A device has been added to or removed from the system. */
    int DBT_DEVNODES_CHANGED = 0x0007;

    /** The dbt devicetypespecific. */
    int DBT_DEVICETYPESPECIFIC = 0x8005;

    /** The dbt customevent. */
    int DBT_CUSTOMEVENT = 0x8006;

    /** The guid devinterface usb device. */
    public GUID GUID_DEVINTERFACE_USB_DEVICE = new GUID(
            "{A5DCBF10-6530-11D2-901F-00C04FB951ED}");

    /** The guid devinterface hid. */
    public GUID GUID_DEVINTERFACE_HID = new GUID(
            "{4D1E55B2-F16F-11CF-88CB-001111000030}");

    /** The guid devinterface volume. */
    public GUID GUID_DEVINTERFACE_VOLUME = new GUID(
            "{53F5630D-B6BF-11D0-94F2-00A0C91EFB8B}");

    /** The guid devinterface keyboard. */
    public GUID GUID_DEVINTERFACE_KEYBOARD = new GUID(
            "{884b96c3-56ef-11d1-bc8c-00a0c91405dd}");

    /** The guid devinterface mouse. */
    public GUID GUID_DEVINTERFACE_MOUSE = new GUID(
            "{378DE44C-56EF-11D1-BC8C-00A0C91405DD}");

    /**
     * The Class DEV_BROADCAST_HDR.
     */
    public class DEV_BROADCAST_HDR extends Structure {

        /** The dbch_size. */
        public int dbch_size = size();

        /** The dbch_devicetype. */
        public int dbch_devicetype;

        /** The dbch_reserved. */
        public int dbch_reserved;

        /**
         * Instantiates a new dev broadcast hdr.
         */
        public DEV_BROADCAST_HDR() {
        }

        /**
         * Instantiates a new dev broadcast hdr.
         * 
         * @param pointer
         *            the pointer
         */
        public DEV_BROADCAST_HDR(long pointer) {
            this(new Pointer(pointer));
        }

        /**
         * Instantiates a new dev broadcast hdr.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_HDR(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbch_size", "dbch_devicetype",
                    "dbch_reserved" });
        }
    }

    /** The dbt devtyp oem. */
    int DBT_DEVTYP_OEM = 0x00000000;

    /** The dbt devtyp devnode. */
    int DBT_DEVTYP_DEVNODE = 0x00000001;

    /** The dbt devtyp volume. */
    int DBT_DEVTYP_VOLUME = 0x00000002;

    /** The dbt devtyp port. */
    int DBT_DEVTYP_PORT = 0x00000003;

    /** The dbt devtyp net. */
    int DBT_DEVTYP_NET = 0x00000004;

    /** The dbt devtyp deviceinterface. */
    int DBT_DEVTYP_DEVICEINTERFACE = 0x00000005;

    /** The dbt devtyp handle. */
    int DBT_DEVTYP_HANDLE = 0x00000006;

    /**
     * The Class DEV_BROADCAST_OEM.
     */
    public class DEV_BROADCAST_OEM extends Structure {

        /** The dbco_size. */
        public int dbco_size = size();

        /** The dbco_devicetype. */
        public int dbco_devicetype;

        /** The dbco_reserved. */
        public int dbco_reserved;

        /** The dbco_identifier. */
        public int dbco_identifier;

        /** The dbco_suppfunc. */
        public int dbco_suppfunc;

        /**
         * Instantiates a new dev broadcast oem.
         */
        public DEV_BROADCAST_OEM() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast oem.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_OEM(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbco_size", "dbco_devicetype",
                    "dbco_reserved", "dbco_identifier", "dbco_suppfunc" });
        }
    }

    /**
     * The Class DEV_BROADCAST_DEVNODE.
     */
    public class DEV_BROADCAST_DEVNODE extends Structure {

        /** The dbcd_size. */
        public int dbcd_size = size();

        /** The dbcd_devicetype. */
        public int dbcd_devicetype;

        /** The dbcd_reserved. */
        public int dbcd_reserved;

        /** The dbcd_devnode. */
        public int dbcd_devnode;

        /**
         * Instantiates a new dev broadcast devnode.
         */
        public DEV_BROADCAST_DEVNODE() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast devnode.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_DEVNODE(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbcd_size", "dbcd_devicetype",
                    "dbcd_reserved", "dbcd_devnode" });
        }
    }

    /**
     * The Class DEV_BROADCAST_VOLUME.
     */
    public class DEV_BROADCAST_VOLUME extends Structure {

        /** The dbcv_size. */
        public int dbcv_size = size();

        /** The dbcv_devicetype. */
        public int dbcv_devicetype;

        /** The dbcv_reserved. */
        public int dbcv_reserved;

        /** The dbcv_unitmask. */
        public int dbcv_unitmask;

        /** The dbcv_flags. */
        public short dbcv_flags;

        /**
         * Instantiates a new dev broadcast volume.
         */
        public DEV_BROADCAST_VOLUME() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast volume.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_VOLUME(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbcv_size", "dbcv_devicetype",
                    "dbcv_reserved", "dbcv_unitmask", "dbcv_flags" });
        }
    }
<commit_msg>Update DBT.java added DBTF_MEDIA and DBTF_NET<commit_after>/* Copyright (c) 2012 <NAME>, All Rights Reserved
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 */
package com.sun.jna.platform.win32;

import java.util.Arrays;
import java.util.List;

import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.Guid.GUID;
import com.sun.jna.platform.win32.WinDef.LONG;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import com.sun.jna.platform.win32.WinUser.HDEVNOTIFY;
import com.sun.jna.win32.StdCallLibrary;

/**
 * Based on dbt.h (various types)
 * 
 * @author <NAME>, <EMAIL>
 */
@SuppressWarnings("serial")
public interface DBT extends StdCallLibrary {

    /** The dbt no disk space. */
    int DBT_NO_DISK_SPACE = 0x0047;

    /** The dbt low disk space. */
    int DBT_LOW_DISK_SPACE = 0x0048;

    /** The dbt configmgprivate. */
    int DBT_CONFIGMGPRIVATE = 0x7FFF;

    /** The dbt devicearrival. */
    int DBT_DEVICEARRIVAL = 0x8000;

    /** The dbt devicequeryremove. */
    int DBT_DEVICEQUERYREMOVE = 0x8001;

    /** The dbt devicequeryremovefailed. */
    int DBT_DEVICEQUERYREMOVEFAILED = 0x8002;

    /** The dbt deviceremovepending. */
    int DBT_DEVICEREMOVEPENDING = 0x8003;

    /** The dbt deviceremovecomplete. */
    int DBT_DEVICEREMOVECOMPLETE = 0x8004;

    /** A device has been added to or removed from the system. */
    int DBT_DEVNODES_CHANGED = 0x0007;

    /** The dbt devicetypespecific. */
    int DBT_DEVICETYPESPECIFIC = 0x8005;

    /** The dbt customevent. */
    int DBT_CUSTOMEVENT = 0x8006;

    /** The guid devinterface usb device. */
    public GUID GUID_DEVINTERFACE_USB_DEVICE = new GUID(
            "{A5DCBF10-6530-11D2-901F-00C04FB951ED}");

    /** The guid devinterface hid. */
    public GUID GUID_DEVINTERFACE_HID = new GUID(
            "{4D1E55B2-F16F-11CF-88CB-001111000030}");

    /** The guid devinterface volume. */
    public GUID GUID_DEVINTERFACE_VOLUME = new GUID(
            "{53F5630D-B6BF-11D0-94F2-00A0C91EFB8B}");

    /** The guid devinterface keyboard. */
    public GUID GUID_DEVINTERFACE_KEYBOARD = new GUID(
            "{884b96c3-56ef-11d1-bc8c-00a0c91405dd}");

    /** The guid devinterface mouse. */
    public GUID GUID_DEVINTERFACE_MOUSE = new GUID(
            "{378DE44C-56EF-11D1-BC8C-00A0C91405DD}");

    /**
     * The Class DEV_BROADCAST_HDR.
     */
    public class DEV_BROADCAST_HDR extends Structure {

        /** The dbch_size. */
        public int dbch_size = size();

        /** The dbch_devicetype. */
        public int dbch_devicetype;

        /** The dbch_reserved. */
        public int dbch_reserved;

        /**
         * Instantiates a new dev broadcast hdr.
         */
        public DEV_BROADCAST_HDR() {
        }

        /**
         * Instantiates a new dev broadcast hdr.
         * 
         * @param pointer
         *            the pointer
         */
        public DEV_BROADCAST_HDR(long pointer) {
            this(new Pointer(pointer));
        }

        /**
         * Instantiates a new dev broadcast hdr.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_HDR(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbch_size", "dbch_devicetype",
                    "dbch_reserved" });
        }
    }

    /** The dbt devtyp oem. */
    int DBT_DEVTYP_OEM = 0x00000000;

    /** The dbt devtyp devnode. */
    int DBT_DEVTYP_DEVNODE = 0x00000001;

    /** The dbt devtyp volume. */
    int DBT_DEVTYP_VOLUME = 0x00000002;

    /** The dbt devtyp port. */
    int DBT_DEVTYP_PORT = 0x00000003;

    /** The dbt devtyp net. */
    int DBT_DEVTYP_NET = 0x00000004;

    /** The dbt devtyp deviceinterface. */
    int DBT_DEVTYP_DEVICEINTERFACE = 0x00000005;

    /** The dbt devtyp handle. */
    int DBT_DEVTYP_HANDLE = 0x00000006;

    /**
     * The Class DEV_BROADCAST_OEM.
     */
    public class DEV_BROADCAST_OEM extends Structure {

        /** The dbco_size. */
        public int dbco_size = size();

        /** The dbco_devicetype. */
        public int dbco_devicetype;

        /** The dbco_reserved. */
        public int dbco_reserved;

        /** The dbco_identifier. */
        public int dbco_identifier;

        /** The dbco_suppfunc. */
        public int dbco_suppfunc;

        /**
         * Instantiates a new dev broadcast oem.
         */
        public DEV_BROADCAST_OEM() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast oem.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_OEM(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbco_size", "dbco_devicetype",
                    "dbco_reserved", "dbco_identifier", "dbco_suppfunc" });
        }
    }

    /**
     * The Class DEV_BROADCAST_DEVNODE.
     */
    public class DEV_BROADCAST_DEVNODE extends Structure {

        /** The dbcd_size. */
        public int dbcd_size = size();

        /** The dbcd_devicetype. */
        public int dbcd_devicetype;

        /** The dbcd_reserved. */
        public int dbcd_reserved;

        /** The dbcd_devnode. */
        public int dbcd_devnode;

        /**
         * Instantiates a new dev broadcast devnode.
         */
        public DEV_BROADCAST_DEVNODE() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast devnode.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_DEVNODE(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbcd_size", "dbcd_devicetype",
                    "dbcd_reserved", "dbcd_devnode" });
        }
    }

    /**
     * The Class DEV_BROADCAST_VOLUME.
     */
    public class DEV_BROADCAST_VOLUME extends Structure {

        /** The dbcv_size. */
        public int dbcv_size = size();

        /** The dbcv_devicetype. */
        public int dbcv_devicetype;

        /** The dbcv_reserved. */
        public int dbcv_reserved;

        /** The dbcv_unitmask. */
        public int dbcv_unitmask;

        /** The dbcv_flags. */
        public short dbcv_flags;

        /**
         * Instantiates a new dev broadcast volume.
         */
        public DEV_BROADCAST_VOLUME() {
            // TODO Auto-generated constructor stub
        }

        /**
         * Instantiates a new dev broadcast volume.
         * 
         * @param memory
         *            the memory
         */
        public DEV_BROADCAST_VOLUME(Pointer memory) {
            super(memory);
            read();
        }

        /*
         * (non-Javadoc)
         * 
         * @see com.sun.jna.Structure#getFieldOrder()
         */
        protected List getFieldOrder() {
            return Arrays.asList(new String[] { "dbcv_size", "dbcv_devicetype",
                    "dbcv_reserved", "dbcv_unitmask", "dbcv_flags" });
        }
    }

    /** The dbt change affects media in drive, not physical device or drive. */
    int DBTF_MEDIA = 0x0001;

    /** The dbt indicated logical volume is a network volume. */
    int DBTF_NET = 0x0002;

{'fraction_non_alphanumeric': 0.1022375841368019, 'fraction_numerical': 0.028985507246376812, 'mean_word_length': 1.8327035383029886, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 14, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6983915', 'n_tokens_mistral': 5715, 'n_tokens_neox': 5200, 'n_words': 1224}