1 /* 2 * Copyright (C) 2009 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 package android.gesture.cts; 17 18 import android.gesture.Gesture; 19 import android.gesture.Prediction; 20 21 import java.util.ArrayList; 22 import java.util.Set; 23 24 /** 25 * Utility interface for making calls to a GestureStore or GestureLibrary fixture. 26 * <p/> 27 * Exposes API for methods which exist in both GestureStore and GestureLibrary, so tests can be 28 * shared. 29 */ 30 interface GestureStorageAccessor { 31 32 void addGesture(String entryName, Gesture gesture); 33 34 Set<String> getGestureEntries(); 35 36 ArrayList<Gesture> getGestures(String entryName); 37 38 int getOrientationStyle(); 39 40 int getSequenceType(); 41 42 ArrayList<Prediction> recognize(Gesture gesture); 43 44 void removeEntry(String entryName); 45 46 void removeGesture(String entryName, Gesture gesture); 47 48 void setOrientationStyle(int style); 49 50 void setSequenceType(int type); 51 52 } 53