blob: 5e37a1fd46c2b396d79ec094d200eebf911bbfac [file] [log] [blame]
Fred Quintana60307342009-03-24 22:48:12 -07001/*
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
17package android.accounts;
18
19import android.accounts.IAccountManagerResponse;
20import android.accounts.Account;
21import android.os.Bundle;
22
23/**
24 * Central application service that provides account management.
Fred Quintana33269202009-04-20 16:05:10 -070025 * @hide
Fred Quintana60307342009-03-24 22:48:12 -070026 */
27interface IAccountManager {
28 String getPassword(in Account account);
29 String getUserData(in Account account, String key);
Fred Quintanaa698f422009-04-08 19:14:54 -070030 String[] getAuthenticatorTypes();
Fred Quintana60307342009-03-24 22:48:12 -070031 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 Quintanaa698f422009-04-08 19:14:54 -070042 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 Quintana33269202009-04-20 16:05:10 -070046 String authTokenType, in String[] requiredFeatures, boolean expectActivityLaunch,
47 in Bundle options);
Fred Quintanaa698f422009-04-08 19:14:54 -070048 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 Quintana33269202009-04-20 16:05:10 -070054 void getAccountsByTypeAndFeatures(in IAccountManagerResponse response, String accountType,
55 in String[] features);
Fred Quintana60307342009-03-24 22:48:12 -070056
Fred Quintanaa698f422009-04-08 19:14:54 -070057 /*
Fred Quintana33269202009-04-20 16:05:10 -070058 * @deprecated
Fred Quintanaa698f422009-04-08 19:14:54 -070059 */
60 void confirmPassword(in IAccountManagerResponse response, in Account account,
Fred Quintana60307342009-03-24 22:48:12 -070061 String password);
Fred Quintana60307342009-03-24 22:48:12 -070062}