1 package com.android.verifiedboot.globalstate.owner; 2 3 import javacard.framework.Shareable; 4 5 public interface OwnerInterface extends Shareable { 6 /** 7 * Stores the calling applet's AID which must implement the NotifyInterface. 8 * When a global data clear is requested, dataChanged() will be called. 9 * 10 * @param unregister whether to register or unregister for data change. 11 * 12 * Returns true if registered and false if not. 13 */ notifyOnDataClear(boolean unregister)14 boolean notifyOnDataClear(boolean unregister); 15 16 /** 17 * Stores that the calling applet completed onDataClear() call. 18 * If this is called, the applet will received a onDataClear() will 19 * be renotified on each isDataCleared() call from any other applet. 20 */ reportDataCleared()21 void reportDataCleared(); 22 23 /** 24 * Returns true if the caller has pending data to clear. 25 */ dataClearNeeded()26 boolean dataClearNeeded(); 27 28 /** 29 * Returns true if there is no pending clients needing to clear. 30 * 31 * This is often called by the boot support client to determine 32 * if a new notify call is needed. 33 */ globalDataClearComplete()34 boolean globalDataClearComplete(); 35 36 /** 37 * Notifies all applets that a dataClear is underway. 38 * (The calling applet will also be notified, if registered.) 39 * 40 * @param resume indicates renotifying only pending applets. 41 */ triggerDataClear(boolean resume)42 void triggerDataClear(boolean resume); 43 44 45 /** 46 * Returns true if the external signal indicates the bootloader 47 * is still in control of the application proceesor. 48 */ inBootloader()49 boolean inBootloader(); 50 51 /** 52 * Sets the {@link #production} value. 53 * 54 * @param val 55 * @return true if the value could be assigned. 56 */ setProduction(boolean val)57 boolean setProduction(boolean val); 58 59 /** 60 * Returns if the Interface has been transitioned to production mode. 61 * 62 * @return true if in production mode and false if in provisioning. 63 */ production()64 boolean production(); 65 }; 66