• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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
16sequenceable OHOS.Msdp.DeviceStatus.SequenceableCooperateOptions;
17sequenceable OHOS.Msdp.DeviceStatus.SequenceableDragData;
18sequenceable OHOS.Msdp.DeviceStatus.SequenceableDragResult;
19sequenceable OHOS.Msdp.DeviceStatus.SequenceableDragVisible;
20sequenceable OHOS.Msdp.DeviceStatus.SequenceablePreviewAnimation;
21sequenceable OHOS.Msdp.DeviceStatus.SequenceablePreviewStyle;
22sequenceable OHOS.Msdp.DeviceStatus.SequenceableRotateWindow;
23sequenceable OHOS.Msdp.DeviceStatus.SequenceablePostureData;
24sequenceable OHOS.Msdp.DeviceStatus.SequenceableDragSummaryInfo;
25sequenceable OHOS.Msdp.DeviceStatus.OnScreen.SequenceableContentOption;
26sequenceable OHOS.Msdp.DeviceStatus.OnScreen.SequenceableControlEvent;
27sequenceable OHOS.Msdp.DeviceStatus.OnScreen.SequenceablePageContent;
28interface OHOS.Msdp.DeviceStatus.IRemoteBoomerangCallback;
29interface OHOS.Msdp.DeviceStatus.IRemoteDevStaCallback;
30sequenceable OHOS.Media.PixelMap;
31
32interface OHOS.Msdp.IIntention {
33    // Socket
34    void Socket([in] String programName, [in] int moduleType, [out] FileDescriptor socketFd, [out] int tokenType);
35
36    // Cooperate
37    void EnableCooperate([in] int userData);
38    void DisableCooperate([in] int userData);
39    void StartCooperate([in] String remoteNetworkId, [in] int userData, [in] int startDeviceId, [in] boolean checkPermission);
40    void StartCooperateWithOptions([in] String remoteNetworkId, [in] int userData, [in] int startDeviceId,
41        [in] boolean checkPermission, [in] SequenceableCooperateOptions options);
42    void StopCooperate([in] int userData, [in] boolean isUnchained, [in] boolean checkPermission);
43    void RegisterCooperateListener();
44    void UnregisterCooperateListener();
45    void RegisterHotAreaListener([in] int userData, [in] boolean checkPermission);
46    void UnregisterHotAreaListener();
47    void RegisterMouseEventListener([in] String networkId);
48    void UnregisterMouseEventListener([in] String networkId);
49    void GetCooperateStateSync([in] String udid, [out] boolean state);
50    void GetCooperateStateAsync([in] String networkId, [in] int userData, [in] boolean isCheckPermission);
51    void SetDamplingCoefficient([in] unsigned int direction, [in] double coefficient);
52
53    // Drag
54    void StartDrag([in] SequenceableDragData sequenceableDragData);
55    void StopDrag([in] SequenceableDragResult sequenceableDragResult);
56    void EnableInternalDropAnimation([in] String animationInfo);
57    void AddDraglistener([in] boolean isJsCaller);
58    void RemoveDraglistener([in] boolean isJsCaller);
59    void AddSubscriptListener();
60    void RemoveSubscriptListener();
61    void SetDragWindowVisible([in] SequenceableDragVisible sequenceableDragVisible);
62    void UpdateDragStyle([in] int style, [in] int eventId);
63    void UpdateShadowPic([in] sharedptr<PixelMap> pixelMap, [in] int x, [in] int y);
64    void GetDragTargetPid([out] int targetPid);
65    void GetUdKey([out] String udKey);
66    void GetShadowOffset([out] int offsetX, [out] int offsetY, [out] int width, [out] int height);
67    void GetDragData([out] SequenceableDragData sequenceableDragData);
68    void UpdatePreviewStyle([in] SequenceablePreviewStyle sequenceablePreviewStyle);
69    void UpdatePreviewStyleWithAnimation([in] SequenceablePreviewAnimation sequenceablePreviewAnimation);
70    void RotateDragWindowSync([in] SequenceableRotateWindow sequenceableRotateWindow);
71    void SetDragWindowScreenId([in] unsigned long displayId, [in] unsigned long screenId);
72    void GetDragSummary([out] OrderedMap<String, long> summarys, [in] boolean isJsCaller);
73    void GetDragSummaryInfo([out] SequenceableDragSummaryInfo sequenceableDragSummaryInfo);
74    void SetDragSwitchState([in] boolean enable, [in] boolean isJsCaller);
75    void SetAppDragSwitchState([in] boolean enable, [in] String pkgName, [in] boolean isJsCaller);
76    void GetDragState([out] int dragState);
77    void EnableUpperCenterMode([in] boolean enable);
78    void GetDragAction([out] int dragAction);
79    void GetExtraInfo([out] String extraInfo);
80    void AddPrivilege();
81    void EraseMouseIcon();
82    void SetMouseDragMonitorState([in] boolean state);
83    void SetDraggableState([in] boolean state);
84    void GetAppDragSwitchState([out] boolean state);
85    void SetDraggableStateAsync([in] boolean state, [in] long downTime);
86    void GetDragBundleInfo([out] String bundleName, [out] boolean isCrossDevice);
87    void IsDragStart([out] boolean isStart);
88
89    // Boomerang
90    void SubscribeCallback([in] int type, [in] String bundleName, [in] IRemoteBoomerangCallback subCallback);
91    void UnsubscribeCallback([in] int type, [in] String bundleName, [in] IRemoteBoomerangCallback unsubCallback);
92    void NotifyMetadataBindingEvent([in] String bundleName, [in] IRemoteBoomerangCallback notifyCallback);
93    void SubmitMetadata([in] String metadata);
94    void BoomerangEncodeImage([in] sharedptr<PixelMap> pixelMap, [in] String metadata,
95        [in] IRemoteBoomerangCallback encodeCallback);
96    void BoomerangDecodeImage([in] sharedptr<PixelMap> pixelMap, [in] IRemoteBoomerangCallback decodeCallback);
97
98    // Stationary
99    void SubscribeStationaryCallback([in] int type, [in] int event, [in] int latency,
100        [in] IRemoteDevStaCallback subCallback);
101    void UnsubscribeStationaryCallback([in] int type, [in] int event,
102        [in] IRemoteDevStaCallback unsubCallback);
103    void GetDeviceStatusData([in] int type, [out] int replyType, [out] int replyValue);
104    void GetDevicePostureDataSync([out] SequenceablePostureData postureData);
105
106    // OnScreen
107    void GetPageContent([in] SequenceableContentOption contentOption, [out] SequenceablePageContent pageContent);
108    void SendControlEvent([in] SequenceableControlEvent event);
109}