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