115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root/*
215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Copyright (C) 2009 The Android Open Source Project
315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Licensed under the Apache License, Version 2.0 (the "License");
515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * you may not use this file except in compliance with the License.
615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * You may obtain a copy of the License at
715a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
815a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *      http://www.apache.org/licenses/LICENSE-2.0
915a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
1015a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Unless required by applicable law or agreed to in writing, software
1115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * distributed under the License is distributed on an "AS IS" BASIS,
1215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * See the License for the specific language governing permissions and
1415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * limitations under the License.
1515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root */
1615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root
17c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintanapackage android.database.sqlite;
18c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana
19c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana/**
20c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana * A listener for transaction events.
21c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana */
22c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintanapublic interface SQLiteTransactionListener {
23c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    /**
24c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     * Called immediately after the transaction begins.
25c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     */
26c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    void onBegin();
27c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana
28c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    /**
29c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     * Called immediately before commiting the transaction.
30c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     */
31c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    void onCommit();
32c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana
33c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    /**
34c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     * Called if the transaction is about to be rolled back.
35c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana     */
36c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana    void onRollback();
37c4516a7b62de525e3d6d5e76851bdfaf12c11f05Fred Quintana}
38