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 /// <since_tizen> 4 </since_tizen>
25 public class UsbDeviceStrings
27 private readonly UsbDevice _device;
28 private string _language;
30 internal UsbDeviceStrings(UsbDevice device, string language)
37 /// Gets string describing device manufacturer.
39 /// <exception cref="InvalidOperationException">Throws exception if device is disconnected or not opened for operation.</exception>
40 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
41 /// <since_tizen> 4 </since_tizen>
42 public string Manufacturer
46 _device.ThrowIfDisposed();
47 return Interop.DescriptorString(_device._handle.GetManufacturerStr, _language);
52 /// Gets product string of device
54 /// <exception cref="InvalidOperationException">Throws exception if device is not opened for operation.</exception>
55 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
56 /// <since_tizen> 4 </since_tizen>
61 _device.ThrowIfDisposed();
62 return Interop.DescriptorString(_device._handle.GetProductStr, _language);
67 /// Gets serial number of a device.
69 /// <exception cref="InvalidOperationException">Throws exception if device is not opened for operation.</exception>
70 /// <exception cref="UnauthorizedAccessException">Throws exception if user has insufficient permission on device.</exception>
71 /// <since_tizen> 4 </since_tizen>
76 _device.ThrowIfDisposed();
77 return Interop.DescriptorString(_device._handle.GetSerialNumberStr, _language);