18182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood/* 28182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Copyright (C) 2010 The Android Open Source Project 38182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 48182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Licensed under the Apache License, Version 2.0 (the "License"); 58182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * you may not use this file except in compliance with the License. 68182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * You may obtain a copy of the License at 78182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 88182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * http://www.apache.org/licenses/LICENSE-2.0 98182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 108182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Unless required by applicable law or agreed to in writing, software 118182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * distributed under the License is distributed on an "AS IS" BASIS, 128182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 138182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * See the License for the specific language governing permissions and 148182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * limitations under the License. 158182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 168182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 178182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwoodpackage android.mtp; 188182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 198182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood/** 208182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * This class encapsulates information about an MTP device. 218182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * This corresponds to the DeviceInfo Dataset described in 228182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * section 5.1.1 of the MTP specification. 238182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 248182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwoodpublic class MtpDeviceInfo { 258182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 268182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood private String mManufacturer; 278182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood private String mModel; 288182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood private String mVersion; 298182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood private String mSerialNumber; 308182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 318182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood // only instantiated via JNI 328182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood private MtpDeviceInfo() { 338182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood } 348182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 358182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood /** 368182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Returns the manufacturer's name for the MTP device 378182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 388182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * @return the manufacturer name 398182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 408182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood public final String getManufacturer() { 418182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood return mManufacturer; 428182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood } 438182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 448182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood /** 458182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Returns the model name for the MTP device 468182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 478182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * @return the model name 488182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 498182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood public final String getModel() { 508182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood return mModel; 518182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood } 528182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 538182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood /** 548182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Returns the version string the MTP device 558182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 568182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * @return the device version 578182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 588182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood public final String getVersion() { 598182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood return mVersion; 608182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood } 618182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood 628182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood /** 638182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * Returns the unique serial number for the MTP device 648182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * 658182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood * @return the serial number 668182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood */ 678182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood public final String getSerialNumber() { 688182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood return mSerialNumber; 698182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood } 708182e72479a8b0d832df9c392890b25bfa6f97b5Mike Lockwood}