package com.secure.sandbox.server.interfaces;

import android.os.ParcelFileDescriptor;
import com.secure.sandbox.entity.InstallResult;
import com.secure.sandbox.entity.InstalledAppInfo;
import com.secure.sandbox.server.interfaces.IAppRequestListener;
import com.secure.sandbox.server.interfaces.IPackageObserver;
import android.os.ResultReceiver;
import java.util.List;

/**
 * @author Lody
 */
interface IAppManager{

    int[] getPackageInstalledUsers(String packageName);

    void scanApps();

    void addVisibleOutsidePackage(String pkg);

    void removeVisibleOutsidePackage(String pkg);

    boolean isOutsidePackageVisible(String pkg);

    int getUidForSharedUser(in String sharedUserName);

    InstalledAppInfo getInstalledAppInfo(String pkg, int flags);

    oneway void installPackage(String source,String path, int flags, in ResultReceiver receiver);

    void requestCopyPackage64(String packageName);

    boolean isPackageLaunched(int userId, String packageName);

    void setPackageHidden(int userId, String packageName, boolean hidden);

    boolean installPackageAsUser(int userId, String packageName);

    boolean uninstallPackageAsUser(String packageName, int userId);

    boolean uninstallPackage(String packageName);

    boolean forceUninstallPackage(String packageName);

    List<InstalledAppInfo> getInstalledApps(int flags);

    List<InstalledAppInfo> getInstalledAppsAsUser(int userId, int flags);

    int getInstalledAppCount();

    boolean isAppInstalled(String packageName);

    boolean isAppInstalledAsUser(int userId, String packageName);

    void registerObserver(in IPackageObserver observer);

    void unregisterObserver(in IPackageObserver observer);

    void setAppRequestListener(in IAppRequestListener listener);

    void clearAppRequestListener();

    IAppRequestListener getAppRequestListener();

    boolean isRun64BitProcess(String packageName);

    boolean isIORelocateWork();

    boolean cleanPackageData(in String pkg, int userId);
}
