15229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood/* 25229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Copyright (C) 2010 The Android Open Source Project 35229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * 45229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Licensed under the Apache License, Version 2.0 (the "License"); 55229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * you may not use this file except in compliance with the License. 65229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * You may obtain a copy of the License at 75229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * 85229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * http://www.apache.org/licenses/LICENSE-2.0 95229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * 105229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Unless required by applicable law or agreed to in writing, software 115229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * distributed under the License is distributed on an "AS IS" BASIS, 125229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * See the License for the specific language governing permissions and 145229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * limitations under the License. 155229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood */ 165229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwoodpackage com.android.quicksearchbox; 175229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 185229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwoodimport org.json.JSONException; 195229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 205229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwoodimport java.util.Collection; 215229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 225229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood/** 235229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Extra data that can be attached to a suggestion. 245229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood */ 255229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwoodpublic interface SuggestionExtras { 265229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 275229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood /** 285229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Return the names of custom columns present in these extras. 295229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood */ 305229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood Collection<String> getExtraColumnNames(); 315229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 325229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood /** 335229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * @param columnName The column to get a value from. 345229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood */ 355229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood String getExtra(String columnName); 365229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 375229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood /** 385229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood * Flatten these extras as a JSON object. 395229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood */ 405229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood String toJsonString() throws JSONException; 415229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood 425229b06f00d20aac76cd8519b37f2a579d61c54fMathew Inwood} 43