diff options
Diffstat (limited to 'core/java/android/content/IContentService.aidl')
-rw-r--r-- | core/java/android/content/IContentService.aidl | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/core/java/android/content/IContentService.aidl b/core/java/android/content/IContentService.aidl index 8617d949..b0f14c1 100644 --- a/core/java/android/content/IContentService.aidl +++ b/core/java/android/content/IContentService.aidl @@ -16,8 +16,10 @@ package android.content; +import android.accounts.Account; import android.content.ActiveSyncInfo; import android.content.ISyncStatusObserver; +import android.content.SyncAdapterType; import android.content.SyncStatusInfo; import android.net.Uri; import android.os.Bundle; @@ -34,15 +36,15 @@ interface IContentService { void notifyChange(in Uri uri, IContentObserver observer, boolean observerWantsSelfNotifications, boolean syncToNetwork); - void startSync(in Uri url, in Bundle extras); - void cancelSync(in Uri uri); + void requestSync(in Account account, String authority, in Bundle extras); + void cancelSync(in Account account, String authority); /** * Check if the provider should be synced when a network tickle is received * @param providerName the provider whose setting we are querying * @return true of the provider should be synced when a network tickle is received */ - boolean getSyncProviderAutomatically(String providerName); + boolean getSyncAutomatically(in Account account, String providerName); /** * Set whether or not the provider is synced when it receives a network tickle. @@ -50,32 +52,50 @@ interface IContentService { * @param providerName the provider whose behavior is being controlled * @param sync true if the provider should be synced when tickles are received for it */ - void setSyncProviderAutomatically(String providerName, boolean sync); + void setSyncAutomatically(in Account account, String providerName, boolean sync); - void setListenForNetworkTickles(boolean flag); + /** + * Check if this account/provider is syncable. + * @return >0 if it is syncable, 0 if not, and <0 if the state isn't known yet. + */ + int getIsSyncable(in Account account, String providerName); + + /** + * Set whether this account/provider is syncable. + * @param syncable, >0 denotes syncable, 0 means not syncable, <0 means unknown + */ + void setIsSyncable(in Account account, String providerName, int syncable); - boolean getListenForNetworkTickles(); + void setMasterSyncAutomatically(boolean flag); + + boolean getMasterSyncAutomatically(); /** * Returns true if there is currently a sync operation for the given * account or authority in the pending list, or actively being processed. */ - boolean isSyncActive(String account, String authority); + boolean isSyncActive(in Account account, String authority); ActiveSyncInfo getActiveSync(); /** + * Returns the types of the SyncAdapters that are registered with the system. + * @return Returns the types of the SyncAdapters that are registered with the system. + */ + SyncAdapterType[] getSyncAdapterTypes(); + + /** * Returns the status that matches the authority. If there are multiples accounts for * the authority, the one with the latest "lastSuccessTime" status is returned. * @param authority the authority whose row should be selected * @return the SyncStatusInfo for the authority, or null if none exists */ - SyncStatusInfo getStatusByAuthority(String authority); + SyncStatusInfo getSyncStatus(in Account account, String authority); /** * Return true if the pending status is true of any matching authorities. */ - boolean isAuthorityPending(String account, String authority); + boolean isSyncPending(in Account account, String authority); void addStatusChangeListener(int mask, ISyncStatusObserver callback); |