Home | History | Annotate | Download | only in database
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package android.database;
     18 
     19 public interface CrossProcessCursor extends Cursor{
     20     /**
     21      * returns a pre-filled window, return NULL if no such window
     22      */
     23     CursorWindow getWindow();
     24 
     25     /**
     26      * copies cursor data into the window start at pos
     27      */
     28     void fillWindow(int pos, CursorWindow winow);
     29 
     30     /**
     31      * This function is called every time the cursor is successfully scrolled
     32      * to a new position, giving the subclass a chance to update any state it
     33      * may have. If it returns false the move function will also do so and the
     34      * cursor will scroll to the beforeFirst position.
     35      *
     36      * @param oldPosition the position that we're moving from
     37      * @param newPosition the position that we're moving to
     38      * @return true if the move is successful, false otherwise
     39      */
     40     boolean onMove(int oldPosition, int newPosition);
     41 
     42 }
     43