Debian Codegraph @

core/java/android/service/textclassifier/ITextClassifierService.aidl

raw
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.ITextClassifierCallback;
20 import android.view.textclassifier.ConversationActions;
21 import android.view.textclassifier.SelectionEvent;
22 import android.view.textclassifier.TextClassification;
23 import android.view.textclassifier.TextClassificationContext;
24 import android.view.textclassifier.TextClassificationSessionId;
25 import android.view.textclassifier.TextClassifierEvent;
26 import android.view.textclassifier.TextLinks;
27 import android.view.textclassifier.TextLanguage;
28 import android.view.textclassifier.TextSelection;
29
30 /**
31 * TextClassifierService binder interface.
32 * See TextClassifier for interface documentation.
33 * {@hide}
34 */
35 oneway interface ITextClassifierService {
36
37 void onSuggestSelection(
38 in TextClassificationSessionId sessionId,
39 in TextSelection.Request request,
40 in ITextClassifierCallback callback);
41
42 void onClassifyText(
43 in TextClassificationSessionId sessionId,
44 in TextClassification.Request request,
45 in ITextClassifierCallback callback);
46
47 void onGenerateLinks(
48 in TextClassificationSessionId sessionId,
49 in TextLinks.Request request,
50 in ITextClassifierCallback callback);
51
52 // TODO: Remove
53 void onSelectionEvent(
54 in TextClassificationSessionId sessionId,
55 in SelectionEvent event);
56
57 void onTextClassifierEvent(
58 in TextClassificationSessionId sessionId,
59 in TextClassifierEvent event);
60
61 void onCreateTextClassificationSession(
62 in TextClassificationContext context,
63 in TextClassificationSessionId sessionId);
64
65 void onDestroyTextClassificationSession(
66 in TextClassificationSessionId sessionId);
67
68 void onDetectLanguage(
69 in TextClassificationSessionId sessionId,
70 in TextLanguage.Request request,
71 in ITextClassifierCallback callback);
72
73 void onSuggestConversationActions(
74 in TextClassificationSessionId sessionId,
75 in ConversationActions.Request request,
76 in ITextClassifierCallback callback);
77
78 void onConnectedStateChanged(int connected);
79 }