1 /*
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 
17 package android.content;
18 import android.os.Bundle;
19 import 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  */
27 oneway interface ISyncServiceAdapter {
28 
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      */
startSync(ISyncContext syncContext, in Bundle extras)38     void startSync(ISyncContext syncContext, in Bundle extras);
39 
40     /**
41      * Cancel the currently ongoing sync.
42      */
cancelSync(ISyncContext syncContext)43     void cancelSync(ISyncContext syncContext);
44 
45 }
46