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.accounts.AuthenticatorDescription; 22 import android.os.Bundle; 23 24 25 /** 26 * Central application service that provides account management. 27 * @hide 28 */ 29 interface IAccountManager { getPassword(in Account account)30 String getPassword(in Account account); getUserData(in Account account, String key)31 String getUserData(in Account account, String key); getAuthenticatorTypes()32 AuthenticatorDescription[] getAuthenticatorTypes(); getAccounts(String accountType)33 Account[] getAccounts(String accountType); hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features)34 void hasFeatures(in IAccountManagerResponse response, in Account account, in String[] features); getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features)35 void getAccountsByFeatures(in IAccountManagerResponse response, String accountType, in String[] features); addAccount(in Account account, String password, in Bundle extras)36 boolean addAccount(in Account account, String password, in Bundle extras); removeAccount(in IAccountManagerResponse response, in Account account)37 void removeAccount(in IAccountManagerResponse response, in Account account); invalidateAuthToken(String accountType, String authToken)38 void invalidateAuthToken(String accountType, String authToken); peekAuthToken(in Account account, String authTokenType)39 String peekAuthToken(in Account account, String authTokenType); setAuthToken(in Account account, String authTokenType, String authToken)40 void setAuthToken(in Account account, String authTokenType, String authToken); setPassword(in Account account, String password)41 void setPassword(in Account account, String password); clearPassword(in Account account)42 void clearPassword(in Account account); setUserData(in Account account, String key, String value)43 void setUserData(in Account account, String key, String value); 44 getAuthToken(in IAccountManagerResponse response, in Account account, String authTokenType, boolean notifyOnAuthFailure, boolean expectActivityLaunch, in Bundle options)45 void getAuthToken(in IAccountManagerResponse response, in Account account, 46 String authTokenType, boolean notifyOnAuthFailure, boolean expectActivityLaunch, 47 in Bundle options); addAcount(in IAccountManagerResponse response, String accountType, String authTokenType, in String[] requiredFeatures, boolean expectActivityLaunch, in Bundle options)48 void addAcount(in IAccountManagerResponse response, String accountType, 49 String authTokenType, in String[] requiredFeatures, boolean expectActivityLaunch, 50 in Bundle options); updateCredentials(in IAccountManagerResponse response, in Account account, String authTokenType, boolean expectActivityLaunch, in Bundle options)51 void updateCredentials(in IAccountManagerResponse response, in Account account, 52 String authTokenType, boolean expectActivityLaunch, in Bundle options); editProperties(in IAccountManagerResponse response, String accountType, boolean expectActivityLaunch)53 void editProperties(in IAccountManagerResponse response, String accountType, 54 boolean expectActivityLaunch); confirmCredentials(in IAccountManagerResponse response, in Account account, in Bundle options, boolean expectActivityLaunch)55 void confirmCredentials(in IAccountManagerResponse response, in Account account, 56 in Bundle options, boolean expectActivityLaunch); 57 } 58