首页 > 代码库 > Delphi Android USB声明文件

Delphi Android USB声明文件

自己转的比较全面的USB声明文件:

 

unit Androidapi.JNI.USB;interfaceuses  AndroidAPI.JNIBridge,  Androidapi.JNI.JavaTypes,  Androidapi.JNI.os,  androidapi.JNI.App;type  JUsbInterface = interface;  JUsbEndPoint = interface;  JUsbManager = interface;  JUsbRequest = interface;  JUsbInterfaceClass = interface(JObjectClass)    [{C8CD6F55-CD21-417D-8234-C715E861D81F}]    function _GetCREATOR : JParcelable_Creator; cdecl;                          //  A: $19    function describeContents : Integer; cdecl;                                 // ()I A: $1    function getEndpoint(&index : Integer) : JUsbEndpoint; cdecl;               // (I)Landroid/hardware/usb/UsbEndpoint; A: $1    function getEndpointCount : Integer; cdecl;                                 // ()I A: $1    function getId : Integer; cdecl;                                            // ()I A: $1    function getInterfaceClass : Integer; cdecl;                                // ()I A: $1    function getInterfaceProtocol : Integer; cdecl;                             // ()I A: $1    function getInterfaceSubclass : Integer; cdecl;                             // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1    property CREATOR : JParcelable_Creator read _GetCREATOR;                    // Landroid/os/Parcelable$Creator; A: $19  end;  [JavaSignature(android/hardware/usb/UsbInterface)]  JUsbInterface = interface(JObject)    [{BD59133B-06ED-424A-9C3E-A3F7020DB784}]    function describeContents : Integer; cdecl;                                 // ()I A: $1    function getEndpoint(&index : Integer) : JUsbEndpoint; cdecl;               // (I)Landroid/hardware/usb/UsbEndpoint; A: $1    function getEndpointCount : Integer; cdecl;                                 // ()I A: $1    function getId : Integer; cdecl;                                            // ()I A: $1    function getInterfaceClass : Integer; cdecl;                                // ()I A: $1    function getInterfaceProtocol : Integer; cdecl;                             // ()I A: $1    function getInterfaceSubclass : Integer; cdecl;                             // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1  end;  TJUsbInterface = class(TJavaGenericImport<JUsbInterfaceClass, JUsbInterface>)  end;  JUsbAccessory = interface;  JUsbAccessoryClass = interface(JObjectClass)    [{98C18E63-827C-44F3-9CF6-9C82D7F1BBFE}]    function _GetCREATOR : JParcelable_Creator; cdecl;                          //  A: $19    function describeContents : Integer; cdecl;                                 // ()I A: $1    function equals(obj : JObject) : boolean; cdecl;                            // (Ljava/lang/Object;)Z A: $1    function getDescription : JString; cdecl;                                   // ()Ljava/lang/String; A: $1    function getManufacturer : JString; cdecl;                                  // ()Ljava/lang/String; A: $1    function getModel : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    function getSerial : JString; cdecl;                                        // ()Ljava/lang/String; A: $1    function getUri : JString; cdecl;                                           // ()Ljava/lang/String; A: $1    function getVersion : JString; cdecl;                                       // ()Ljava/lang/String; A: $1    function hashCode : Integer; cdecl;                                         // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1    property CREATOR : JParcelable_Creator read _GetCREATOR;                    // Landroid/os/Parcelable$Creator; A: $19  end;  [JavaSignature(android/hardware/usb/UsbAccessory)]  JUsbAccessory = interface(JObject)    [{CA84BEB5-FADB-42DD-9120-4FCEA58EB211}]    function describeContents : Integer; cdecl;                                 // ()I A: $1    function equals(obj : JObject) : boolean; cdecl;                            // (Ljava/lang/Object;)Z A: $1    function getDescription : JString; cdecl;                                   // ()Ljava/lang/String; A: $1    function getManufacturer : JString; cdecl;                                  // ()Ljava/lang/String; A: $1    function getModel : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    function getSerial : JString; cdecl;                                        // ()Ljava/lang/String; A: $1    function getUri : JString; cdecl;                                           // ()Ljava/lang/String; A: $1    function getVersion : JString; cdecl;                                       // ()Ljava/lang/String; A: $1    function hashCode : Integer; cdecl;                                         // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1  end;  TJUsbAccessory = class(TJavaGenericImport<JUsbAccessoryClass, JUsbAccessory>)  end;  JUsbDevice = interface;  JUsbDeviceClass = interface(JObjectClass)    [{322E87AC-CF09-4502-8FB0-CC1ADC520615}]    function _GetCREATOR : JParcelable_Creator; cdecl;                          //  A: $19    function describeContents : Integer; cdecl;                                 // ()I A: $1    function equals(o : JObject) : boolean; cdecl;                              // (Ljava/lang/Object;)Z A: $1    function getDeviceClass : Integer; cdecl;                                   // ()I A: $1    function getDeviceId : Integer; cdecl; overload;                            // ()I A: $1    function getDeviceId(&name : JString) : Integer; cdecl; overload;           // (Ljava/lang/String;)I A: $9    function getDeviceName : JString; cdecl; overload;                          // ()Ljava/lang/String; A: $1    function getDeviceName(id : Integer) : JString; cdecl; overload;            // (I)Ljava/lang/String; A: $9    function getDeviceProtocol : Integer; cdecl;                                // ()I A: $1    function getDeviceSubclass : Integer; cdecl;                                // ()I A: $1    function getInterface(&index : Integer) : JUsbInterface; cdecl;             // (I)Landroid/hardware/usb/UsbInterface; A: $1    function getInterfaceCount : Integer; cdecl;                                // ()I A: $1    function getProductId : Integer; cdecl;                                     // ()I A: $1    function getVendorId : Integer; cdecl;                                      // ()I A: $1    function hashCode : Integer; cdecl;                                         // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1    property CREATOR : JParcelable_Creator read _GetCREATOR;                    // Landroid/os/Parcelable$Creator; A: $19  end;  [JavaSignature(android/hardware/usb/UsbDevice)]  JUsbDevice = interface(JObject)    [{894CF2BF-306D-49BA-9776-D89F60E90353}]    function describeContents : Integer; cdecl;                                 // ()I A: $1    function equals(o : JObject) : boolean; cdecl;                              // (Ljava/lang/Object;)Z A: $1    function getDeviceClass : Integer; cdecl;                                   // ()I A: $1    function getDeviceId : Integer; cdecl; overload;                            // ()I A: $1    function getDeviceName : JString; cdecl; overload;                          // ()Ljava/lang/String; A: $1    function getDeviceProtocol : Integer; cdecl;                                // ()I A: $1    function getDeviceSubclass : Integer; cdecl;                                // ()I A: $1    function getInterface(&index : Integer) : JUsbInterface; cdecl;             // (I)Landroid/hardware/usb/UsbInterface; A: $1    function getInterfaceCount : Integer; cdecl;                                // ()I A: $1    function getProductId : Integer; cdecl;                                     // ()I A: $1    function getVendorId : Integer; cdecl;                                      // ()I A: $1    function hashCode : Integer; cdecl;                                         // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1  end;  TJUsbDevice = class(TJavaGenericImport<JUsbDeviceClass, JUsbDevice>)  end;  JUsbDeviceConnection = interface;  JUsbDeviceConnectionClass = interface(JObjectClass)    [{87714045-C806-4665-8115-A3E814566A46}]    function bulkTransfer(endpoint : JUsbEndpoint; buffer : TJavaArray<Byte>; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (Landroid/hardware/usb/UsbEndpoint;[BII)I A: $1    function bulkTransfer(endpoint : JUsbEndpoint; buffer : TJavaArray<Byte>; offset : Integer; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (Landroid/hardware/usb/UsbEndpoint;[BIII)I A: $1    function claimInterface(intf : JUsbInterface; force : boolean) : boolean; cdecl;// (Landroid/hardware/usb/UsbInterface;Z)Z A: $1    function controlTransfer(requestType : Integer; request : Integer; value : Integer; &index : Integer; buffer : TJavaArray<Byte>; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (IIII[BII)I A: $1    function controlTransfer(requestType : Integer; request : Integer; value : Integer; &index : Integer; buffer : TJavaArray<Byte>; offset : Integer; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (IIII[BIII)I A: $1    function getFileDescriptor : Integer; cdecl;                                // ()I A: $1    function getRawDescriptors : TJavaArray<Byte>; cdecl;                       // ()[B A: $1    function getSerial : JString; cdecl;                                        // ()Ljava/lang/String; A: $1    function releaseInterface(intf : JUsbInterface) : boolean; cdecl;           // (Landroid/hardware/usb/UsbInterface;)Z A: $1    function requestWait : JUsbRequest; cdecl;                                  // ()Landroid/hardware/usb/UsbRequest; A: $1    procedure close ; cdecl;                                                    // ()V A: $1  end;  [JavaSignature(android/hardware/usb/UsbDeviceConnection)]  JUsbDeviceConnection = interface(JObject)    [{0946E9B4-626D-46F3-BE00-5C9B9EE7D545}]    function bulkTransfer(endpoint : JUsbEndpoint; buffer : TJavaArray<Byte>; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (Landroid/hardware/usb/UsbEndpoint;[BII)I A: $1    function bulkTransfer(endpoint : JUsbEndpoint; buffer : TJavaArray<Byte>; offset : Integer; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (Landroid/hardware/usb/UsbEndpoint;[BIII)I A: $1    function claimInterface(intf : JUsbInterface; force : boolean) : boolean; cdecl;// (Landroid/hardware/usb/UsbInterface;Z)Z A: $1    function controlTransfer(requestType : Integer; request : Integer; value : Integer; &index : Integer; buffer : TJavaArray<Byte>; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (IIII[BII)I A: $1    function controlTransfer(requestType : Integer; request : Integer; value : Integer; &index : Integer; buffer : TJavaArray<Byte>; offset : Integer; length : Integer; timeout : Integer) : Integer; cdecl; overload;// (IIII[BIII)I A: $1    function getFileDescriptor : Integer; cdecl;                                // ()I A: $1    function getRawDescriptors : TJavaArray<Byte>; cdecl;                       // ()[B A: $1    function getSerial : JString; cdecl;                                        // ()Ljava/lang/String; A: $1    function releaseInterface(intf : JUsbInterface) : boolean; cdecl;           // (Landroid/hardware/usb/UsbInterface;)Z A: $1    function requestWait : JUsbRequest; cdecl;                                  // ()Landroid/hardware/usb/UsbRequest; A: $1    procedure close ; cdecl;                                                    // ()V A: $1  end;  TJUsbDeviceConnection = class(TJavaGenericImport<JUsbDeviceConnectionClass, JUsbDeviceConnection>)  end;  JUsbEndpointClass = interface(JObjectClass)    [{42D2502A-B42F-4A3D-A8F5-719DD014F925}]    function _GetCREATOR : JParcelable_Creator; cdecl;                          //  A: $19    function describeContents : Integer; cdecl;                                 // ()I A: $1    function getAddress : Integer; cdecl;                                       // ()I A: $1    function getAttributes : Integer; cdecl;                                    // ()I A: $1    function getDirection : Integer; cdecl;                                     // ()I A: $1    function getEndpointNumber : Integer; cdecl;                                // ()I A: $1    function getInterval : Integer; cdecl;                                      // ()I A: $1    function getMaxPacketSize : Integer; cdecl;                                 // ()I A: $1    function getType : Integer; cdecl;                                          // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1    property CREATOR : JParcelable_Creator read _GetCREATOR;                    // Landroid/os/Parcelable$Creator; A: $19  end;  [JavaSignature(android/hardware/usb/UsbEndpoint)]  JUsbEndpoint = interface(JObject)    [{3DA76151-8683-40C5-9D74-EC46C3EE6BE9}]    function describeContents : Integer; cdecl;                                 // ()I A: $1    function getAddress : Integer; cdecl;                                       // ()I A: $1    function getAttributes : Integer; cdecl;                                    // ()I A: $1    function getDirection : Integer; cdecl;                                     // ()I A: $1    function getEndpointNumber : Integer; cdecl;                                // ()I A: $1    function getInterval : Integer; cdecl;                                      // ()I A: $1    function getMaxPacketSize : Integer; cdecl;                                 // ()I A: $1    function getType : Integer; cdecl;                                          // ()I A: $1    function toString : JString; cdecl;                                         // ()Ljava/lang/String; A: $1    procedure writeToParcel(parcel : JParcel; flags : Integer) ; cdecl;         // (Landroid/os/Parcel;I)V A: $1  end;  TJUsbEndpoint = class(TJavaGenericImport<JUsbEndpointClass, JUsbEndpoint>)  end;  JUsbManagerClass = interface(JObjectClass)    [{00663E01-CEEF-47D5-BF37-513629999939}]    function _GetACTION_USB_ACCESSORY_ATTACHED : JString; cdecl;                //  A: $19    function _GetACTION_USB_ACCESSORY_DETACHED : JString; cdecl;                //  A: $19    function _GetACTION_USB_DEVICE_ATTACHED : JString; cdecl;                   //  A: $19    function _GetACTION_USB_DEVICE_DETACHED : JString; cdecl;                   //  A: $19    function _GetEXTRA_ACCESSORY : JString; cdecl;                              //  A: $19    function _GetEXTRA_DEVICE : JString; cdecl;                                 //  A: $19    function _GetEXTRA_PERMISSION_GRANTED : JString; cdecl;                     //  A: $19    function getAccessoryList : TJavaArray<JUsbAccessory>; cdecl;               // ()[Landroid/hardware/usb/UsbAccessory; A: $1    function getDeviceList : JHashMap; cdecl;                                   // ()Ljava/util/HashMap; A: $1    function hasPermission(accessory : JUsbAccessory) : boolean; cdecl; overload;// (Landroid/hardware/usb/UsbAccessory;)Z A: $1    function hasPermission(device : JUsbDevice) : boolean; cdecl; overload;     // (Landroid/hardware/usb/UsbDevice;)Z A: $1    function openAccessory(accessory : JUsbAccessory) : JParcelFileDescriptor; cdecl;// (Landroid/hardware/usb/UsbAccessory;)Landroid/os/ParcelFileDescriptor; A: $1    function openDevice(device : JUsbDevice) : JUsbDeviceConnection; cdecl;     // (Landroid/hardware/usb/UsbDevice;)Landroid/hardware/usb/UsbDeviceConnection; A: $1    procedure requestPermission(accessory : JUsbAccessory; pi : JPendingIntent) ; cdecl; overload;// (Landroid/hardware/usb/UsbAccessory;Landroid/app/PendingIntent;)V A: $1    procedure requestPermission(device : JUsbDevice; pi : JPendingIntent) ; cdecl; overload;// (Landroid/hardware/usb/UsbDevice;Landroid/app/PendingIntent;)V A: $1    property ACTION_USB_ACCESSORY_ATTACHED : JString read _GetACTION_USB_ACCESSORY_ATTACHED;// Ljava/lang/String; A: $19    property ACTION_USB_ACCESSORY_DETACHED : JString read _GetACTION_USB_ACCESSORY_DETACHED;// Ljava/lang/String; A: $19    property ACTION_USB_DEVICE_ATTACHED : JString read _GetACTION_USB_DEVICE_ATTACHED;// Ljava/lang/String; A: $19    property ACTION_USB_DEVICE_DETACHED : JString read _GetACTION_USB_DEVICE_DETACHED;// Ljava/lang/String; A: $19    property EXTRA_ACCESSORY : JString read _GetEXTRA_ACCESSORY;                // Ljava/lang/String; A: $19    property EXTRA_DEVICE : JString read _GetEXTRA_DEVICE;                      // Ljava/lang/String; A: $19    property EXTRA_PERMISSION_GRANTED : JString read _GetEXTRA_PERMISSION_GRANTED;// Ljava/lang/String; A: $19  end;  [JavaSignature(android/hardware/usb/UsbManager)]  JUsbManager = interface(JObject)    [{B49F7F12-1E88-442D-88D6-E67E24A0A3FF}]    function getAccessoryList : TJavaArray<JUsbAccessory>; cdecl;               // ()[Landroid/hardware/usb/UsbAccessory; A: $1    function getDeviceList : JHashMap; cdecl;                                   // ()Ljava/util/HashMap; A: $1    function hasPermission(accessory : JUsbAccessory) : boolean; cdecl; overload;// (Landroid/hardware/usb/UsbAccessory;)Z A: $1    function hasPermission(device : JUsbDevice) : boolean; cdecl; overload;     // (Landroid/hardware/usb/UsbDevice;)Z A: $1    function openAccessory(accessory : JUsbAccessory) : JParcelFileDescriptor; cdecl;// (Landroid/hardware/usb/UsbAccessory;)Landroid/os/ParcelFileDescriptor; A: $1    function openDevice(device : JUsbDevice) : JUsbDeviceConnection; cdecl;     // (Landroid/hardware/usb/UsbDevice;)Landroid/hardware/usb/UsbDeviceConnection; A: $1    procedure requestPermission(accessory : JUsbAccessory; pi : JPendingIntent) ; cdecl; overload;// (Landroid/hardware/usb/UsbAccessory;Landroid/app/PendingIntent;)V A: $1    procedure requestPermission(device : JUsbDevice; pi : JPendingIntent) ; cdecl; overload;// (Landroid/hardware/usb/UsbDevice;Landroid/app/PendingIntent;)V A: $1  end;  TJUsbManager = class(TJavaGenericImport<JUsbManagerClass, JUsbManager>)  end;  JUsbRequestClass = interface(JObjectClass)    [{DDD3609C-991D-44C3-A262-6EC3AE6CA978}]    function cancel : boolean; cdecl;                                           // ()Z A: $1    function getClientData : JObject; cdecl;                                    // ()Ljava/lang/Object; A: $1    function getEndpoint : JUsbEndpoint; cdecl;                                 // ()Landroid/hardware/usb/UsbEndpoint; A: $1    function init : JUsbRequest; cdecl;                                         // ()V A: $1    function initialize(connection : JUsbDeviceConnection; endpoint : JUsbEndpoint) : boolean; cdecl;// (Landroid/hardware/usb/UsbDeviceConnection;Landroid/hardware/usb/UsbEndpoint;)Z A: $1    function queue(buffer : JByteBuffer; length : Integer) : boolean; cdecl;    // (Ljava/nio/ByteBuffer;I)Z A: $1    procedure close ; cdecl;                                                    // ()V A: $1    procedure setClientData(data : JObject) ; cdecl;                            // (Ljava/lang/Object;)V A: $1  end;  [JavaSignature(android/hardware/usb/UsbRequest)]  JUsbRequest = interface(JObject)    [{3D42DD85-7C3D-464A-A717-89F25373F9A9}]    function cancel : boolean; cdecl;                                           // ()Z A: $1    function getClientData : JObject; cdecl;                                    // ()Ljava/lang/Object; A: $1    function getEndpoint : JUsbEndpoint; cdecl;                                 // ()Landroid/hardware/usb/UsbEndpoint; A: $1    function initialize(connection : JUsbDeviceConnection; endpoint : JUsbEndpoint) : boolean; cdecl;// (Landroid/hardware/usb/UsbDeviceConnection;Landroid/hardware/usb/UsbEndpoint;)Z A: $1    function queue(buffer : JByteBuffer; length : Integer) : boolean; cdecl;    // (Ljava/nio/ByteBuffer;I)Z A: $1    procedure close ; cdecl;                                                    // ()V A: $1    procedure setClientData(data : JObject) ; cdecl;                            // (Ljava/lang/Object;)V A: $1  end;  TJUsbRequest = class(TJavaGenericImport<JUsbRequestClass, JUsbRequest>)  end;  JUsbConstants = interface;  JUsbConstantsClass = interface(JObjectClass)    [{82AD42D7-224A-4DA7-8AFF-E1208FE2DDD2}]    function _GetUSB_CLASS_APP_SPEC : Integer; cdecl;                           //  A: $19    function _GetUSB_CLASS_AUDIO : Integer; cdecl;                              //  A: $19    function _GetUSB_CLASS_CDC_DATA : Integer; cdecl;                           //  A: $19    function _GetUSB_CLASS_COMM : Integer; cdecl;                               //  A: $19    function _GetUSB_CLASS_CONTENT_SEC : Integer; cdecl;                        //  A: $19    function _GetUSB_CLASS_CSCID : Integer; cdecl;                              //  A: $19    function _GetUSB_CLASS_HID : Integer; cdecl;                                //  A: $19    function _GetUSB_CLASS_HUB : Integer; cdecl;                                //  A: $19    function _GetUSB_CLASS_MASS_STORAGE : Integer; cdecl;                       //  A: $19    function _GetUSB_CLASS_MISC : Integer; cdecl;                               //  A: $19    function _GetUSB_CLASS_PER_INTERFACE : Integer; cdecl;                      //  A: $19    function _GetUSB_CLASS_PHYSICA : Integer; cdecl;                            //  A: $19    function _GetUSB_CLASS_PRINTER : Integer; cdecl;                            //  A: $19    function _GetUSB_CLASS_STILL_IMAGE : Integer; cdecl;                        //  A: $19    function _GetUSB_CLASS_VENDOR_SPEC : Integer; cdecl;                        //  A: $19    function _GetUSB_CLASS_VIDEO : Integer; cdecl;                              //  A: $19    function _GetUSB_CLASS_WIRELESS_CONTROLLER : Integer; cdecl;                //  A: $19    function _GetUSB_DIR_IN : Integer; cdecl;                                   //  A: $19    function _GetUSB_DIR_OUT : Integer; cdecl;                                  //  A: $19    function _GetUSB_ENDPOINT_DIR_MASK : Integer; cdecl;                        //  A: $19    function _GetUSB_ENDPOINT_NUMBER_MASK : Integer; cdecl;                     //  A: $19    function _GetUSB_ENDPOINT_XFERTYPE_MASK : Integer; cdecl;                   //  A: $19    function _GetUSB_ENDPOINT_XFER_BULK : Integer; cdecl;                       //  A: $19    function _GetUSB_ENDPOINT_XFER_CONTROL : Integer; cdecl;                    //  A: $19    function _GetUSB_ENDPOINT_XFER_INT : Integer; cdecl;                        //  A: $19    function _GetUSB_ENDPOINT_XFER_ISOC : Integer; cdecl;                       //  A: $19    function _GetUSB_INTERFACE_SUBCLASS_BOOT : Integer; cdecl;                  //  A: $19    function _GetUSB_SUBCLASS_VENDOR_SPEC : Integer; cdecl;                     //  A: $19    function _GetUSB_TYPE_CLASS : Integer; cdecl;                               //  A: $19    function _GetUSB_TYPE_MASK : Integer; cdecl;                                //  A: $19    function _GetUSB_TYPE_RESERVED : Integer; cdecl;                            //  A: $19    function _GetUSB_TYPE_STANDARD : Integer; cdecl;                            //  A: $19    function _GetUSB_TYPE_VENDOR : Integer; cdecl;                              //  A: $19    function init : JUsbConstants; cdecl;                                       // ()V A: $1    property USB_CLASS_APP_SPEC : Integer read _GetUSB_CLASS_APP_SPEC;          // I A: $19    property USB_CLASS_AUDIO : Integer read _GetUSB_CLASS_AUDIO;                // I A: $19    property USB_CLASS_CDC_DATA : Integer read _GetUSB_CLASS_CDC_DATA;          // I A: $19    property USB_CLASS_COMM : Integer read _GetUSB_CLASS_COMM;                  // I A: $19    property USB_CLASS_CONTENT_SEC : Integer read _GetUSB_CLASS_CONTENT_SEC;    // I A: $19    property USB_CLASS_CSCID : Integer read _GetUSB_CLASS_CSCID;                // I A: $19    property USB_CLASS_HID : Integer read _GetUSB_CLASS_HID;                    // I A: $19    property USB_CLASS_HUB : Integer read _GetUSB_CLASS_HUB;                    // I A: $19    property USB_CLASS_MASS_STORAGE : Integer read _GetUSB_CLASS_MASS_STORAGE;  // I A: $19    property USB_CLASS_MISC : Integer read _GetUSB_CLASS_MISC;                  // I A: $19    property USB_CLASS_PER_INTERFACE : Integer read _GetUSB_CLASS_PER_INTERFACE;// I A: $19    property USB_CLASS_PHYSICA : Integer read _GetUSB_CLASS_PHYSICA;            // I A: $19    property USB_CLASS_PRINTER : Integer read _GetUSB_CLASS_PRINTER;            // I A: $19    property USB_CLASS_STILL_IMAGE : Integer read _GetUSB_CLASS_STILL_IMAGE;    // I A: $19    property USB_CLASS_VENDOR_SPEC : Integer read _GetUSB_CLASS_VENDOR_SPEC;    // I A: $19    property USB_CLASS_VIDEO : Integer read _GetUSB_CLASS_VIDEO;                // I A: $19    property USB_CLASS_WIRELESS_CONTROLLER : Integer read _GetUSB_CLASS_WIRELESS_CONTROLLER;// I A: $19    property USB_DIR_IN : Integer read _GetUSB_DIR_IN;                          // I A: $19    property USB_DIR_OUT : Integer read _GetUSB_DIR_OUT;                        // I A: $19    property USB_ENDPOINT_DIR_MASK : Integer read _GetUSB_ENDPOINT_DIR_MASK;    // I A: $19    property USB_ENDPOINT_NUMBER_MASK : Integer read _GetUSB_ENDPOINT_NUMBER_MASK;// I A: $19    property USB_ENDPOINT_XFERTYPE_MASK : Integer read _GetUSB_ENDPOINT_XFERTYPE_MASK;// I A: $19    property USB_ENDPOINT_XFER_BULK : Integer read _GetUSB_ENDPOINT_XFER_BULK;  // I A: $19    property USB_ENDPOINT_XFER_CONTROL : Integer read _GetUSB_ENDPOINT_XFER_CONTROL;// I A: $19    property USB_ENDPOINT_XFER_INT : Integer read _GetUSB_ENDPOINT_XFER_INT;    // I A: $19    property USB_ENDPOINT_XFER_ISOC : Integer read _GetUSB_ENDPOINT_XFER_ISOC;  // I A: $19    property USB_INTERFACE_SUBCLASS_BOOT : Integer read _GetUSB_INTERFACE_SUBCLASS_BOOT;// I A: $19    property USB_SUBCLASS_VENDOR_SPEC : Integer read _GetUSB_SUBCLASS_VENDOR_SPEC;// I A: $19    property USB_TYPE_CLASS : Integer read _GetUSB_TYPE_CLASS;                  // I A: $19    property USB_TYPE_MASK : Integer read _GetUSB_TYPE_MASK;                    // I A: $19    property USB_TYPE_RESERVED : Integer read _GetUSB_TYPE_RESERVED;            // I A: $19    property USB_TYPE_STANDARD : Integer read _GetUSB_TYPE_STANDARD;            // I A: $19    property USB_TYPE_VENDOR : Integer read _GetUSB_TYPE_VENDOR;                // I A: $19  end;  [JavaSignature(android/hardware/usb/UsbConstants)]  JUsbConstants = interface(JObject)    [{0C48B886-B3F1-4161-8312-0E2D239EA601}]  end;  TJUsbConstants = class(TJavaGenericImport<JUsbConstantsClass, JUsbConstants>)  end;const  TJUsbManagerACTION_USB_DEVICE_ATTACHED = android.hardware.usb.action.USB_DEVICE_ATTACHED;  TJUsbManagerACTION_USB_DEVICE_DETACHED = android.hardware.usb.action.USB_DEVICE_DETACHED;  TJUsbManagerACTION_USB_ACCESSORY_ATTACHED = android.hardware.usb.action.USB_ACCESSORY_ATTACHED;  TJUsbManagerACTION_USB_ACCESSORY_DETACHED = android.hardware.usb.action.USB_ACCESSORY_DETACHED;  TJUsbManagerEXTRA_DEVICE = device;  TJUsbManagerEXTRA_ACCESSORY = accessory;  TJUsbManagerEXTRA_PERMISSION_GRANTED = permission;const  TJUsbConstantsUSB_ENDPOINT_DIR_MASK = 128;  TJUsbConstantsUSB_DIR_OUT = 0;  TJUsbConstantsUSB_DIR_IN = 128;  TJUsbConstantsUSB_ENDPOINT_NUMBER_MASK = 15;  TJUsbConstantsUSB_ENDPOINT_XFERTYPE_MASK = 3;  TJUsbConstantsUSB_ENDPOINT_XFER_CONTROL = 0;  TJUsbConstantsUSB_ENDPOINT_XFER_ISOC = 1;  TJUsbConstantsUSB_ENDPOINT_XFER_BULK = 2;  TJUsbConstantsUSB_ENDPOINT_XFER_INT = 3;  TJUsbConstantsUSB_TYPE_MASK = 96;  TJUsbConstantsUSB_TYPE_STANDARD = 0;  TJUsbConstantsUSB_TYPE_CLASS = 32;  TJUsbConstantsUSB_TYPE_VENDOR = 64;  TJUsbConstantsUSB_TYPE_RESERVED = 96;  TJUsbConstantsUSB_CLASS_PER_INTERFACE = 0;  TJUsbConstantsUSB_CLASS_AUDIO = 1;  TJUsbConstantsUSB_CLASS_COMM = 2;  TJUsbConstantsUSB_CLASS_HID = 3;  TJUsbConstantsUSB_CLASS_PHYSICA = 5;  TJUsbConstantsUSB_CLASS_STILL_IMAGE = 6;  TJUsbConstantsUSB_CLASS_PRINTER = 7;  TJUsbConstantsUSB_CLASS_MASS_STORAGE = 8;  TJUsbConstantsUSB_CLASS_HUB = 9;  TJUsbConstantsUSB_CLASS_CDC_DATA = 10;  TJUsbConstantsUSB_CLASS_CSCID = 11;  TJUsbConstantsUSB_CLASS_CONTENT_SEC = 13;  TJUsbConstantsUSB_CLASS_VIDEO = 14;  TJUsbConstantsUSB_CLASS_WIRELESS_CONTROLLER = 224;  TJUsbConstantsUSB_CLASS_MISC = 239;  TJUsbConstantsUSB_CLASS_APP_SPEC = 254;  TJUsbConstantsUSB_CLASS_VENDOR_SPEC = 255;  TJUsbConstantsUSB_INTERFACE_SUBCLASS_BOOT = 1;  TJUsbConstantsUSB_SUBCLASS_VENDOR_SPEC = 255;implementationend.

 

Delphi Android USB声明文件