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 USB device.
24 public class UsbDeviceInformation
26 private readonly UsbDevice _device;
28 internal UsbDeviceInformation(UsbDevice device)
34 /// USB specification release number as binary-coded decimal.
36 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
41 _device.ThrowIfDisposed();
42 return Interop.NativeGet<int>(_device._handle.GetBcdUsb);
47 /// Gets device class.
53 _device.ThrowIfDisposed();
54 return Interop.NativeGet<int>(_device._handle.GetClass);
59 /// Gets device sub class.
65 _device.ThrowIfDisposed();
66 return Interop.NativeGet<int>(_device._handle.GetSubClass);
71 /// Gets device protocol.
77 _device.ThrowIfDisposed();
78 return Interop.NativeGet<int>(_device._handle.GetProtocol);
89 _device.ThrowIfDisposed();
90 return Interop.NativeGet<int>(_device._handle.GetIdVendor);
101 _device.ThrowIfDisposed();
102 return Interop.NativeGet<int>(_device._handle.GetIdProduct);
107 /// Gets device release number in binary-coded decimal.
109 public int DeviceVersion
113 _device.ThrowIfDisposed();
114 return Interop.NativeGet<int>(_device._handle.GetBcdDevice);