File: mtp_storage_info.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (73 lines) | stat: -rw-r--r-- 2,624 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright 2012 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

// This protobuf is for sending the characteristics of a storage from a mtp/ptp
// device to the browser.
message MtpStorageInfo {
  // The name of the storage. e.g. usb:2,5:65537
  optional string storage_name = 1;

  // Device vendor name. e.g. Kodak
  optional string vendor = 2;

  // Device vendor id. e.g. 0x040a
  optional uint32 vendor_id = 3;

  // Device product name. e.g. DC4800
  optional string product = 4;

  // Device product id. e.g. 0x0160
  optional uint32 product_id = 5;

  // Device flags as defined by libmtp. See libmtp's src/device-flags.h.
  optional uint32 device_flags = 6;

  // Device storage type as defined in the PIMA 15740-2000 standard, first
  // edition, section 5.5.3, table 11.
  optional uint32 storage_type = 7;

  // Device file system type as defined in the PIMA 15740-2000 standard, first
  // edition, section 5.5.3, table 12.
  optional uint32 filesystem_type = 8;

  // Access capability as defined in the PIMA 15740-2000 standard, first
  // edition, section 5.5.3, table 13.
  optional uint32 access_capability = 9;

  // Capacity of the storage in bytes.
  optional uint64 max_capacity = 10;

  // Free space of the storage in bytes.
  optional uint64 free_space_in_bytes = 11;

  // Free space of the storage in objects. i.e. How many more objects can be
  // created on the device.
  optional uint64 free_space_in_objects = 12;

  // A description of the storage. This is device dependent.
  optional string storage_description = 13;

  // The volume label of the storage. This is device dependent.
  optional string volume_identifier = 14;

  // Device serial number. Per the MTP spec (MTPforUSB-IFv1.1.pdf) section
  // 5.1.1.14 "Serial Number":
  //
  // "This string is required, and contains the MTP function's serial number.
  // Serial numbers are required to be unique among all MTP functions sharing
  // identical Model and Device Version fields (this field was optional in the
  // PTP specification, but is required in MTP). The serial number should be
  // the device's unique serial number such as the one typically printed on the
  // device."
  //
  // "The serial number shall be a 32 character hexadecimal string for legacy
  // compatibility reasons. This string must be exactly 32 characters,
  // including any leading 0s, and does not require any prefix to identify it
  // as hexadecimal (such as '0x')."
  optional string serial_number = 15;
}