1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18package android.content;
19
20option java_multiple_files = true;
21
22import "frameworks/base/core/proto/android/content/component_name.proto";
23import "frameworks/base/core/proto/android/os/patternmatcher.proto";
24import "frameworks/base/core/proto/android/privacy.proto";
25
26// Next Tag: 14
27message IntentProto {
28    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
29
30    enum DockState {
31        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
32        // the phone is not in any dock.
33        DOCK_STATE_UNDOCKED = 0;
34
35        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
36        // the phone is in a desk dock.
37        DOCK_STATE_DESK = 1;
38
39        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
40        // the phone is in a car dock.
41        DOCK_STATE_CAR = 2;
42
43        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
44        // the phone is in a analog (low end) dock.
45        DOCK_STATE_LE_DESK = 3;
46
47        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
48        // the phone is in a digital (high end) dock.
49        DOCK_STATE_HE_DESK = 4;
50    }
51
52    optional string action = 1;
53    repeated string categories = 2;
54    optional string data = 3 [ (.android.privacy).dest = DEST_EXPLICIT ];
55    optional string type = 4;
56    optional string flag = 5;
57    optional string package = 6;
58    optional ComponentNameProto component = 7;
59    optional string source_bounds = 8;
60    optional string clip_data = 9 [ (.android.privacy).dest = DEST_LOCAL ];
61    optional string extras = 10 [ (.android.privacy).dest = DEST_LOCAL ];
62    // UserHandle value (similar to user_id in other protos).
63    optional int32 content_user_hint = 11;
64    optional string selector = 12;
65    optional string identifier = 13 [ (.android.privacy).dest = DEST_EXPLICIT ];
66}
67
68// Next Tag: 11
69message IntentFilterProto {
70    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
71
72    repeated string actions = 1;
73    repeated string categories = 2;
74    // https://developer.android.com/guide/topics/manifest/data-element#scheme:
75    // The scheme part of a URI. This is the minimal essential attribute for
76    // specifying a URI; at least one scheme attribute must be set for the filter,
77    // or none of the other URI attributes are meaningful. A scheme is specified
78    // without the trailing colon (for example, http, rather than http:). If the
79    // filter has a data type set (the mimeType attribute) but no scheme, the
80    // content: and file: schemes are assumed.
81    repeated string data_schemes = 3  [ (.android.privacy).dest = DEST_EXPLICIT ];
82    repeated android.os.PatternMatcherProto data_scheme_specs = 4;
83    repeated AuthorityEntryProto data_authorities = 5;
84    repeated android.os.PatternMatcherProto data_paths = 6;
85    repeated string data_types = 7;
86    optional int32 priority = 8;
87    optional bool has_partial_types = 9;
88    optional bool get_auto_verify = 10;
89}
90
91message AuthorityEntryProto {
92    option (.android.msg_privacy).dest = DEST_AUTOMATIC;
93
94    optional string host = 1;
95    optional bool wild = 2;
96    optional int32 port = 3;
97}
98