File: mtp_file_entry.proto

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (55 lines) | stat: -rw-r--r-- 1,520 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
// 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 file entries from a mtp/ptp device to the
// browser.
message MtpFileEntry {
  // The id for the file on the mtp/ptp device.
  optional uint32 item_id = 1;

  // The id of this file's parent on the mtp/ptp device.
  optional uint32 parent_id = 2;

  // The file's name.
  optional string file_name = 3;

  // The file's size.
  optional uint64 file_size = 4;

  // The file's modification time. This is approximately the number of seconds
  // since Unix epoch. However, it does not account for timezone offsets or
  // daylight savings time.
  optional int64 modification_time = 5;

  // Values match libmtp values unless noted below.
  enum FileType {
    FILE_TYPE_FOLDER = 0;
    FILE_TYPE_JPEG = 14;
    FILE_TYPE_JFIF = 15;
    FILE_TYPE_TIFF = 16;
    FILE_TYPE_BMP = 17;
    FILE_TYPE_GIF = 18;
    FILE_TYPE_PICT = 19;
    FILE_TYPE_PNG = 20;
    FILE_TYPE_WINDOWSIMAGEFORMAT = 25;
    FILE_TYPE_JP2 = 40;
    FILE_TYPE_JPX = 41;
    // Truly unknown file type.
    FILE_TYPE_UNKNOWN = 44;
    // There's more file types to map to, but right now they are not
    // interesting. Just assign a dummy value for now.
    FILE_TYPE_OTHER = 9999;
  }

  // The file's type.
  optional FileType file_type = 6;
}

message MtpFileEntries {
  repeated MtpFileEntry file_entries = 1;
}