ITextClassifierService.aidl revision 080c8542b68cf17a0441862c404cb49ce0e86cfe
1/* 2 * Copyright (C) 2018 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 17package android.service.textclassifier; 18 19import android.service.textclassifier.ITextClassificationCallback; 20import android.service.textclassifier.ITextLinksCallback; 21import android.service.textclassifier.ITextSelectionCallback; 22import android.view.textclassifier.SelectionEvent; 23import android.view.textclassifier.TextClassification; 24import android.view.textclassifier.TextClassificationContext; 25import android.view.textclassifier.TextClassificationSessionId; 26import android.view.textclassifier.TextLinks; 27import android.view.textclassifier.TextSelection; 28 29/** 30 * TextClassifierService binder interface. 31 * See TextClassifier for interface documentation. 32 * {@hide} 33 */ 34oneway interface ITextClassifierService { 35 36 void onSuggestSelection( 37 in TextClassificationSessionId sessionId, 38 in TextSelection.Request request, 39 in ITextSelectionCallback callback); 40 41 void onClassifyText( 42 in TextClassificationSessionId sessionId, 43 in TextClassification.Request request, 44 in ITextClassificationCallback callback); 45 46 void onGenerateLinks( 47 in TextClassificationSessionId sessionId, 48 in TextLinks.Request request, 49 in ITextLinksCallback callback); 50 51 void onSelectionEvent( 52 in TextClassificationSessionId sessionId, 53 in SelectionEvent event); 54 55 void onCreateTextClassificationSession( 56 in TextClassificationContext context, 57 in TextClassificationSessionId sessionId); 58 59 void onDestroyTextClassificationSession( 60 in TextClassificationSessionId sessionId); 61} 62