• 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         };
43 
44         DECLARE_INTERFACE_DESCRIPTOR(u"ohos.miscservices.inputmethod.IInputMethodCore");
45 
46         virtual int32_t showKeyboard(
47             const sptr<IInputDataChannel> &inputDataChannel, bool isShowKeyboard, const SubProperty &subProperty) = 0;
48         virtual bool hideKeyboard(int32_t flags) = 0;
49         virtual int32_t InitInputControlChannel(
50             sptr<IInputControlChannel> &inputControlChannel, const std::string &imeId) = 0;
51         virtual void StopInputService(std::string imeId) = 0;
52         virtual int32_t SetSubtype(const SubProperty &property) = 0;
53     };
54 } // namespace MiscServices
55 } // namespace OHOS
56 #endif // FRAMEWORKS_INPUTMETHOD_ABILITY_INCLUDE_I_INPUT_METHOD_CORE_H
57