1package org.opencv.android;
2
3/**
4 * Interface for callback object in case of asynchronous initialization of OpenCV.
5 */
6public interface LoaderCallbackInterface
7{
8    /**
9     * OpenCV initialization finished successfully.
10     */
11    static final int SUCCESS = 0;
12    /**
13     * Google Play Market cannot be invoked.
14     */
15    static final int MARKET_ERROR = 2;
16    /**
17     * OpenCV library installation has been canceled by the user.
18     */
19    static final int INSTALL_CANCELED = 3;
20    /**
21     * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required.
22     */
23    static final int INCOMPATIBLE_MANAGER_VERSION = 4;
24    /**
25     * OpenCV library initialization has failed.
26     */
27    static final int INIT_FAILED = 0xff;
28
29    /**
30     * Callback method, called after OpenCV library initialization.
31     * @param status status of initialization (see initialization status constants).
32     */
33    public void onManagerConnected(int status);
34
35    /**
36     * Callback method, called in case the package installation is needed.
37     * @param callback answer object with approve and cancel methods and the package description.
38     */
39    public void onPackageInstall(final int operation, InstallCallbackInterface callback);
40};
41