1/*
2 * Copyright (C) 2018 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 */
16syntax = "proto2";
17
18option java_outer_classname = "SyncManagerCtsProto";
19
20package android.content.syncmanager.cts;
21
22message Payload {
23    message SyncInvocation {
24        optional int64 time = 1;
25        optional string account_name = 2;
26        optional string account_type = 3;
27        optional string authority = 4;
28        optional bytes extras = 5;
29    }
30
31    message Request {
32        message AddAccount {
33            optional string name = 1;
34        }
35        optional AddAccount add_account = 1;
36
37        message RemoveAllAccounts {
38        }
39        optional RemoveAllAccounts remove_all_accounts = 2;
40
41        message ClearSyncInvocations {
42        }
43        optional ClearSyncInvocations clear_sync_invocations = 3;
44
45        message GetSyncInvocations {
46        }
47        optional GetSyncInvocations get_sync_invocations = 4;
48
49        message SyncRequest {
50            optional SyncInvocation parameters = 1;
51        }
52        optional SyncRequest sync_request = 5;
53
54        message SetResult {
55            enum Result {
56                OK = 0;
57                SOFT_ERROR = 1;
58                HARD_ERROR = 2;
59            }
60
61            optional Result result = 1;
62        }
63        optional SetResult set_result = 6;
64    }
65
66    optional Request request = 1;
67
68    message Response {
69        message SyncInvocations {
70            repeated SyncInvocation sync_invocations = 1;
71        }
72        optional SyncInvocations sync_invocations = 1;
73    }
74    optional Response response = 2;
75}
76