Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 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.accounts; |
| 18 | |
| 19 | import android.accounts.IAccountManagerResponse; |
| 20 | import android.accounts.Account; |
| 21 | import android.os.Bundle; |
| 22 | |
| 23 | /** |
| 24 | * Central application service that provides account management. |
Fred Quintana | 3326920 | 2009-04-20 16:05:10 -0700 | [diff] [blame] | 25 | * @hide |
Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 26 | */ |
| 27 | interface IAccountManager { |
| 28 | String getPassword(in Account account); |
| 29 | String getUserData(in Account account, String key); |
Fred Quintana | a698f42 | 2009-04-08 19:14:54 -0700 | [diff] [blame] | 30 | String[] getAuthenticatorTypes(); |
Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 31 | Account[] getAccounts(); |
| 32 | Account[] getAccountsByType(String accountType); |
| 33 | boolean addAccount(in Account account, String password, in Bundle extras); |
| 34 | void removeAccount(in Account account); |
| 35 | void invalidateAuthToken(String accountType, String authToken); |
| 36 | String peekAuthToken(in Account account, String authTokenType); |
| 37 | void setAuthToken(in Account account, String authTokenType, String authToken); |
| 38 | void setPassword(in Account account, String password); |
| 39 | void clearPassword(in Account account); |
| 40 | void setUserData(in Account account, String key, String value); |
| 41 | |
Fred Quintana | a698f42 | 2009-04-08 19:14:54 -0700 | [diff] [blame] | 42 | void getAuthToken(in IAccountManagerResponse response, in Account account, |
| 43 | String authTokenType, boolean notifyOnAuthFailure, boolean expectActivityLaunch, |
| 44 | in Bundle options); |
| 45 | void addAcount(in IAccountManagerResponse response, String accountType, |
Fred Quintana | 3326920 | 2009-04-20 16:05:10 -0700 | [diff] [blame] | 46 | String authTokenType, in String[] requiredFeatures, boolean expectActivityLaunch, |
| 47 | in Bundle options); |
Fred Quintana | a698f42 | 2009-04-08 19:14:54 -0700 | [diff] [blame] | 48 | void updateCredentials(in IAccountManagerResponse response, in Account account, |
| 49 | String authTokenType, boolean expectActivityLaunch, in Bundle options); |
| 50 | void editProperties(in IAccountManagerResponse response, String accountType, |
| 51 | boolean expectActivityLaunch); |
| 52 | void confirmCredentials(in IAccountManagerResponse response, in Account account, |
| 53 | boolean expectActivityLaunch); |
Fred Quintana | 3326920 | 2009-04-20 16:05:10 -0700 | [diff] [blame] | 54 | void getAccountsByTypeAndFeatures(in IAccountManagerResponse response, String accountType, |
| 55 | in String[] features); |
Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 56 | |
Fred Quintana | a698f42 | 2009-04-08 19:14:54 -0700 | [diff] [blame] | 57 | /* |
Fred Quintana | 3326920 | 2009-04-20 16:05:10 -0700 | [diff] [blame] | 58 | * @deprecated |
Fred Quintana | a698f42 | 2009-04-08 19:14:54 -0700 | [diff] [blame] | 59 | */ |
| 60 | void confirmPassword(in IAccountManagerResponse response, in Account account, |
Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 61 | String password); |
Fred Quintana | 6030734 | 2009-03-24 22:48:12 -0700 | [diff] [blame] | 62 | } |