blob: 7acc83e2d375a343e520ecf2c836ecd9567227ec [file] [log] [blame]
Dianne Hackbornd6847842010-01-12 18:14:19 -08001/*
2**
3** Copyright 2010, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9** http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
Dianne Hackborn87bba1e2010-02-26 17:25:54 -080018package android.app.admin;
Dianne Hackbornd6847842010-01-12 18:14:19 -080019
20import android.content.ComponentName;
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080021import android.os.RemoteCallback;
Dianne Hackbornd6847842010-01-12 18:14:19 -080022
23/**
24 * Internal IPC interface to the device policy service.
25 * {@hide}
26 */
27interface IDevicePolicyManager {
Dianne Hackborn9327f4f2010-01-29 10:38:29 -080028 void setPasswordQuality(in ComponentName who, int quality);
29 int getPasswordQuality(in ComponentName who);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070030
Dianne Hackborn254cb442010-01-27 19:23:59 -080031 void setPasswordMinimumLength(in ComponentName who, int length);
32 int getPasswordMinimumLength(in ComponentName who);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070033
34 void setPasswordMinimumUpperCase(in ComponentName who, int length);
35 int getPasswordMinimumUpperCase(in ComponentName who);
36
37 void setPasswordMinimumLowerCase(in ComponentName who, int length);
38 int getPasswordMinimumLowerCase(in ComponentName who);
39
40 void setPasswordMinimumLetters(in ComponentName who, int length);
41 int getPasswordMinimumLetters(in ComponentName who);
42
43 void setPasswordMinimumNumeric(in ComponentName who, int length);
44 int getPasswordMinimumNumeric(in ComponentName who);
45
46 void setPasswordMinimumSymbols(in ComponentName who, int length);
47 int getPasswordMinimumSymbols(in ComponentName who);
Konstantin Lopyrevc8577402010-06-04 17:15:02 -070048
49 void setPasswordMinimumNonLetter(in ComponentName who, int length);
50 int getPasswordMinimumNonLetter(in ComponentName who);
Dianne Hackbornd6847842010-01-12 18:14:19 -080051
Konstantin Lopyrev32558232010-05-20 16:18:05 -070052 void setPasswordHistoryLength(in ComponentName who, int length);
53 int getPasswordHistoryLength(in ComponentName who);
54
Jim Millera4e28d12010-11-08 16:15:47 -080055 void setPasswordExpirationTimeout(in ComponentName who, long expiration);
56 long getPasswordExpirationTimeout(in ComponentName who);
57
58 long getPasswordExpiration(in ComponentName who);
59
Dianne Hackborndf83afa2010-01-20 13:37:26 -080060 boolean isActivePasswordSufficient();
Dianne Hackbornd6847842010-01-12 18:14:19 -080061 int getCurrentFailedPasswordAttempts();
Dianne Hackborn254cb442010-01-27 19:23:59 -080062
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080063 void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num);
Dianne Hackborn254cb442010-01-27 19:23:59 -080064 int getMaximumFailedPasswordsForWipe(in ComponentName admin);
Dianne Hackbornd6847842010-01-12 18:14:19 -080065
Dianne Hackborn87bba1e2010-02-26 17:25:54 -080066 boolean resetPassword(String password, int flags);
Dianne Hackborndf83afa2010-01-20 13:37:26 -080067
Dianne Hackbornd6847842010-01-12 18:14:19 -080068 void setMaximumTimeToLock(in ComponentName who, long timeMs);
Dianne Hackborn254cb442010-01-27 19:23:59 -080069 long getMaximumTimeToLock(in ComponentName who);
Dianne Hackbornd6847842010-01-12 18:14:19 -080070
Dianne Hackborndf83afa2010-01-20 13:37:26 -080071 void lockNow();
72
Dianne Hackbornd6847842010-01-12 18:14:19 -080073 void wipeData(int flags);
Oscar Montemayor69238c62010-08-03 10:51:06 -070074
75 ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList);
76 ComponentName getGlobalProxyAdmin();
Dianne Hackbornd6847842010-01-12 18:14:19 -080077
78 void setActiveAdmin(in ComponentName policyReceiver);
Dianne Hackbornd47c6ed2010-01-27 16:21:20 -080079 boolean isAdminActive(in ComponentName policyReceiver);
80 List<ComponentName> getActiveAdmins();
Dianne Hackborn21f1bd12010-02-19 17:02:21 -080081 boolean packageHasActiveAdmins(String packageName);
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080082 void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result);
Dianne Hackbornd6847842010-01-12 18:14:19 -080083 void removeActiveAdmin(in ComponentName policyReceiver);
84
Konstantin Lopyrevc8577402010-06-04 17:15:02 -070085 void setActivePasswordState(int quality, int length, int letters, int uppercase, int lowercase,
86 int numbers, int symbols, int nonletter);
Dianne Hackbornd6847842010-01-12 18:14:19 -080087 void reportFailedPasswordAttempt();
88 void reportSuccessfulPasswordAttempt();
89}