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 /// String information for USB device.
24 public class UsbDeviceStrings
26 private readonly UsbDevice _device;
27 private string _language;
29 internal UsbDeviceStrings(UsbDevice device, string language)
36 /// Gets string describing device manufacturer.
38 /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation.</exception>
39 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
40 public string Manufacturer
44 _device.ThrowIfDisposed();
45 return Interop.DescriptorString(_device._handle.GetManufacturerStr, _language);
50 /// Gets product string of device
52 /// <exception cref="InvalidOperationException">Throws exception if device is not opened for operation.</exception>
53 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
58 _device.ThrowIfDisposed();
59 return Interop.DescriptorString(_device._handle.GetProductStr, _language);
64 /// Gets serial number of a device.
66 /// <exception cref="InvalidOperationException">Throws exception if device is not opened for operation.</exception>
67 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
72 _device.ThrowIfDisposed();
73 return Interop.DescriptorString(_device._handle.GetSerialNumberStr, _language);