summaryrefslogtreecommitdiff
path: root/chromium/components/arc/common/policy.mojom
blob: 2c0f02589fe063049c2a6e96e7befcb0dbbecd06 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Next MinVersion: 4

module arc.mojom;

import "mojo/public/mojom/base/time.mojom";

[Extensible]
//See depot/google3/wireless/android/enterprise/clouddps/proto/clouddps.proto
enum InstallErrorReason {
    // If the reason is unspecified, this error should be treated as a
    // non-transient error.
    REASON_UNSPECIFIED = 0,

    // The server didn't get a response from Play in time. The install may
    // still succeed or may fail with any error.
    TIMEOUT = 1,

    // A potentially transient error, for example, the device is not found (due
    // to replication delay), or Play was unavailable. A retry in a short amount
    // of time is likely to succeed.
    TRANSIENT_ERROR = 2,

    // The app was not found in Play.
    NOT_FOUND = 3,

    // The app is incompatible with the device.
    NOT_COMPATIBLE_WITH_DEVICE = 4,

    // The app has not been approved by the admin.
    NOT_APPROVED = 5,

    // The app has new permissions that have not been accepted by the admin.
    PERMISSIONS_NOT_ACCEPTED = 6,

    // The app is not available in the user's country.
    NOT_AVAILABLE_IN_COUNTRY = 7,

    // There are no more licenses to assign to the user.
    NO_LICENSES_REMAINING = 8,

    // The enterprise is no longer enrolled with Play for Work or CloudDPC is
    // not enabled for the enterprise.
    NOT_ENROLLED = 9,

    // The user is no longer valid. The user may have been deleted or disabled.
    USER_INVALID = 10,
};

// Next Method ID: 2
interface PolicyHost {
  // Get policies from Chrome OS, as JSON-encoded dictionary with the policies'
  // names as keys and their values as values. The list of possible policies can
  // be found in components/policy/resources/policy_templates.json
  GetPolicies@0() => (string policies);

  // Pass a JSON with policy compliance details that reference fields in
  // CloudDps NonComplianceReason. Should return ChromeOS response to the report
  // in JSON format as in CloudDps PolicyComplianceReportResponse.
  // ChromeOS always returns that it's compliant with the report.
  [MinVersion=1] ReportCompliance@1(string request) => (string response);

  // Reports that request was sent to CloudDPS for set of packages.
  [MinVersion=3] ReportCloudDpsRequested(mojo_base.mojom.Time time,
                                         array<string> package_names);
  // Reports that successful response was received from CloudDPS for set of
  // packages.
  [MinVersion=3] ReportCloudDpsSucceeded(mojo_base.mojom.Time time,
                                         array<string> package_names);
  // Reports that CloudDPS reports an error for packages.
  [MinVersion=3] ReportCloudDpsFailed(mojo_base.mojom.Time time,
                                      string package_name,
                                      InstallErrorReason reason);
};

// Next Method ID: 3
interface PolicyInstance {
  // DEPRECATED: Please use Init@2 instead.
  InitDeprecated@0(PolicyHost host_ptr);

  // Establishes full-duplex communication with the host.
  [MinVersion=2] Init@2(PolicyHost host_ptr) => ();

  // Indicates some policies have changed
  OnPolicyUpdated@1();
};