• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.sync.notifier;
6 
7 
8 import android.accounts.Account;
9 import android.content.SyncStatusObserver;
10 
11 /**
12  * Since the ContentResolver in Android has a lot of static methods, it is hard to
13  * mock out for tests. This interface wraps all the sync-related methods we use from
14  * the Android ContentResolver.
15  */
16 public interface SyncContentResolverDelegate {
17 
addStatusChangeListener(int mask, SyncStatusObserver callback)18     Object addStatusChangeListener(int mask, SyncStatusObserver callback);
19 
removeStatusChangeListener(Object handle)20     void removeStatusChangeListener(Object handle);
21 
setMasterSyncAutomatically(boolean sync)22     void setMasterSyncAutomatically(boolean sync);
23 
getMasterSyncAutomatically()24     boolean getMasterSyncAutomatically();
25 
setSyncAutomatically(Account account, String authority, boolean sync)26     void setSyncAutomatically(Account account, String authority, boolean sync);
27 
getSyncAutomatically(Account account, String authority)28     boolean getSyncAutomatically(Account account, String authority);
29 
setIsSyncable(Account account, String authority, int syncable)30     void setIsSyncable(Account account, String authority, int syncable);
31 
getIsSyncable(Account account, String authority)32     int getIsSyncable(Account account, String authority);
33 }
34