blob: 29f3a406e5a97d5c71b08fea92915484bc5bbb92 [file] [log] [blame]
Matthew Williamsfa774182013-06-18 15:44:11 -07001/*
2 * Copyright (C) 2013 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
17package android.content;
18import android.os.Bundle;
19import android.content.ISyncContext;
20
21/**
22 * Interface to define an anonymous service that is extended by developers
23 * in order to perform anonymous syncs (syncs without an Account or Content
24 * Provider specified). See {@link android.content.AbstractThreadedSyncAdapter}.
25 * {@hide}
26 */
Matthew Williams56dbf8f2013-07-26 12:56:39 -070027oneway interface ISyncServiceAdapter {
Matthew Williamsfa774182013-06-18 15:44:11 -070028
29 /**
30 * Initiate a sync. SyncAdapter-specific parameters may be specified in
31 * extras, which is guaranteed to not be null.
32 *
33 * @param syncContext the ISyncContext used to indicate the progress of the sync. When
34 * the sync is finished (successfully or not) ISyncContext.onFinished() must be called.
35 * @param extras SyncAdapter-specific parameters.
36 *
37 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +000038 @UnsupportedAppUsage
Matthew Williamsfa774182013-06-18 15:44:11 -070039 void startSync(ISyncContext syncContext, in Bundle extras);
40
41 /**
42 * Cancel the currently ongoing sync.
43 */
Andrei Oneaf650e3c2019-02-25 13:15:54 +000044 @UnsupportedAppUsage
Matthew Williamsfa774182013-06-18 15:44:11 -070045 void cancelSync(ISyncContext syncContext);
46
47}