1417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughespackage SQLite;
2417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes
3417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes/**
4417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes * Callback interface for SQLite's authorizer function.
5417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes */
6417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes
7417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughespublic interface Authorizer {
8417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes
9417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes    /**
10417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * Callback to authorize access.
11417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     *
12417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @param what integer indicating type of access
13417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @param arg1 first argument (table, view, index, or trigger name)
14417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @param arg2 second argument (file, table, or column name)
15417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @param arg3 third argument (database name)
16417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @param arg4 third argument (trigger name)
17417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * @return Constants.SQLITE_OK for success, Constants.SQLITE_IGNORE
18417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * for don't allow access but don't raise an error, Constants.SQLITE_DENY
19417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     * for abort SQL statement with error.
20417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes     */
21417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes
22417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes    public int authorize(int what, String arg1, String arg2, String arg3,
237a647e8547e57ca573541be55b3728ef7ce376feElliott Hughes			 String arg4);
24417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes}
25417deb1db112103aff04231b6ca79772ff7d3a21Elliott Hughes
26