2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.System.Usb
22 /// Device information for the USB device.
24 /// <since_tizen> 4 </since_tizen>
25 public class UsbDeviceInformation
27 private readonly UsbDevice _device;
29 internal UsbDeviceInformation(UsbDevice device)
35 /// USB specification release number as binary-coded decimal.
37 /// <exception cref="UnauthorizedAccessException">Throws an exception if the user has insufficient permission on the device.</exception>
38 /// <since_tizen> 4 </since_tizen>
43 _device.ThrowIfDisposed();
44 return Interop.NativeGet<int>(_device._handle.GetBcdUsb);
49 /// Gets the device class.
51 /// <since_tizen> 4 </since_tizen>
56 _device.ThrowIfDisposed();
57 return Interop.NativeGet<int>(_device._handle.GetClass);
62 /// Gets the device subclass.
64 /// <since_tizen> 4 </since_tizen>
69 _device.ThrowIfDisposed();
70 return Interop.NativeGet<int>(_device._handle.GetSubClass);
75 /// Gets the device protocol.
77 /// <since_tizen> 4 </since_tizen>
82 _device.ThrowIfDisposed();
83 return Interop.NativeGet<int>(_device._handle.GetProtocol);
88 /// Gets the vendor ID.
90 /// <since_tizen> 4 </since_tizen>
95 _device.ThrowIfDisposed();
96 return Interop.NativeGet<int>(_device._handle.GetIdVendor);
101 /// Gets the product ID.
103 /// <since_tizen> 4 </since_tizen>
108 _device.ThrowIfDisposed();
109 return Interop.NativeGet<int>(_device._handle.GetIdProduct);
114 /// Gets the device release number in binary-coded decimal.
116 /// <since_tizen> 4 </since_tizen>
117 public int DeviceVersion
121 _device.ThrowIfDisposed();
122 return Interop.NativeGet<int>(_device._handle.GetBcdDevice);