1fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams/* 2fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Copyright (C) 2013 The Android Open Source Project 3fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * 4fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Licensed under the Apache License, Version 2.0 (the "License"); 5fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * you may not use this file except in compliance with the License. 6fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * You may obtain a copy of the License at 7fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * 8fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * http://www.apache.org/licenses/LICENSE-2.0 9fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * 10fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Unless required by applicable law or agreed to in writing, software 11fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * distributed under the License is distributed on an "AS IS" BASIS, 12fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * See the License for the specific language governing permissions and 14fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * limitations under the License. 15fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams */ 16fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams 17fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williamspackage android.content; 18fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williamsimport android.os.Bundle; 19fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williamsimport android.content.ISyncContext; 20fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams 21fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams/** 22fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Interface to define an anonymous service that is extended by developers 23fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * in order to perform anonymous syncs (syncs without an Account or Content 24fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Provider specified). See {@link android.content.AbstractThreadedSyncAdapter}. 25fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * {@hide} 26fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams */ 2756dbf8f23677d28615e61ef2fbb0e738cca02528Matthew Williamsoneway interface ISyncServiceAdapter { 28fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams 29fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams /** 30fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Initiate a sync. SyncAdapter-specific parameters may be specified in 31fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * extras, which is guaranteed to not be null. 32fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * 33fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * @param syncContext the ISyncContext used to indicate the progress of the sync. When 34fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * the sync is finished (successfully or not) ISyncContext.onFinished() must be called. 35fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * @param extras SyncAdapter-specific parameters. 36fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * 37fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams */ 38fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams void startSync(ISyncContext syncContext, in Bundle extras); 39fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams 40fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams /** 41fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams * Cancel the currently ongoing sync. 42fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams */ 43fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams void cancelSync(ISyncContext syncContext); 44fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams 45fa77418134c6f1f80af225a78819f069e9c974fbMatthew Williams} 46