File: cdm_storage.mojom

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 (44 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download | duplicates (9)
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
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Next MinVersion: 1

module chromeos.cdm.mojom;

// Provides a interface for per-origin/cdm storage handled by Chrome. This is
// meant to translate to the media/mojo/mojom/cdm_storage.mojom interface that
// is in Chrome but is tied more closely to the Widevine CE CDM IStorage
// interface on this end. This one exists for the purpose of being able to do
// version management so we can handle version diffs between Chrome and
// Chrome OS.
// Next Method ID: 5
[Stable, Uuid="aaecebab-df8e-4047-a6ff-87fd251bf8c6"]
interface CdmStorage {
  // Reads the contents of |file_name| and return them in |data|. Returns
  // true and the file contents if successful. Errors reading the file or
  // non-existent files will return false and an empty data array.
  [Sync]
  Read@0(string file_name) => (bool success, array<uint8> data);

  // Creates/overwrites the contents of |file_name| with |data|. If the
  // write operation is successful, then true is returned, otherwise false is
  // returned. The contents of the file are unknown if Write() fails.
  [Sync]
  Write@1(string file_name, array<uint8> data) => (bool success);

  // Determines whether the specified file name exists or not. Returns true
  // if the file exists and false if it does not or an error occurred.
  [Sync]
  Exists@2(string file_name) => (bool success);

  // Gets the file size of the specified file name. Returned size is valid if
  // status is true.
  [Sync]
  GetSize@3(string file_name) => (bool success, uint64 size);

  // Removes the file at the specified path. Returns true if the file does not
  // exist or it exists and was removed; returns false otherwise.
  [Sync]
  Remove@4(string file_name) => (bool success);
};