• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FRAMEWORKS_INPUTMETHOD_ABILITY_INCLUDE_I_INPUT_METHOD_CORE_H
17 #define FRAMEWORKS_INPUTMETHOD_ABILITY_INCLUDE_I_INPUT_METHOD_CORE_H
18 
19 #include "global.h"
20 #include "i_input_control_channel.h"
21 #include "i_input_data_channel.h"
22 #include "input_attribute.h"
23 #include "input_channel.h"
24 #include "input_method_property.h"
25 #include "ipc_types.h"
26 #include "iremote_broker.h"
27 
28 /**
29  * brief Definition of interface IInputMethodCore
30  * It defines the remote calls from input method management service to input method service
31  */
32 namespace OHOS {
33 namespace MiscServices {
34 class IInputMethodCore : public IRemoteBroker {
35 public:
36     enum {
37         SHOW_KEYBOARD = FIRST_CALL_TRANSACTION,
38         STOP_INPUT_SERVICE,
39         HIDE_KEYBOARD,
40         INIT_INPUT_CONTROL_CHANNEL,
41         SET_SUBTYPE,
42         CLEAR_DATA_CHANNEL
43     };
44 
45     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.miscservices.inputmethod.IInputMethodCore");
46 
47     virtual int32_t ShowKeyboard(
48         const sptr<IInputDataChannel> &inputDataChannel, bool isShowKeyboard, bool attachFlag) = 0;
49     virtual int32_t HideKeyboard() = 0;
50     virtual int32_t InitInputControlChannel(
51         sptr<IInputControlChannel> &inputControlChannel, const std::string &imeId) = 0;
52     virtual void StopInputService(std::string imeId) = 0;
53     virtual int32_t SetSubtype(const SubProperty &property) = 0;
54     virtual int32_t ClearDataChannel(const sptr<IInputDataChannel> &channel) = 0;
55 };
56 } // namespace MiscServices
57 } // namespace OHOS
58 #endif // FRAMEWORKS_INPUTMETHOD_ABILITY_INCLUDE_I_INPUT_METHOD_CORE_H
59