/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
sequenceable OHOS.IRemoteObject;
sequenceable OHOS.MiscServices.PasteDataInfo;
interface OHOS.MiscServices.IPasteboardDelayGetter;
interface OHOS.MiscServices.IPasteboardEntryGetter;
interface OHOS.MiscServices.IPasteboardChangedObserver;
interface OHOS.MiscServices.IPasteboardDisposableObserver;
interface OHOS.MiscServices.IEntityRecognitionObserver;
import PasteboardTypes;
option_stub_hooks on;
interface OHOS.MiscServices.IPasteboardService {
[ipccode 1] void RegisterClientDeathObserver([in] IRemoteObject observer);
[ipccode 2] void SubscribeObserver([in] PasteboardObserverType type, [in] IPasteboardChangedObserver observer);
[ipccode 3] void UnsubscribeObserver([in] PasteboardObserverType type, [in] IPasteboardChangedObserver observer);
[ipccode 4] void UnsubscribeAllObserver([in] PasteboardObserverType type);
[ipccode 5] void SubscribeEntityObserver(
[in] EntityType entityType, [in] unsigned int expectedDataLength, [in] IEntityRecognitionObserver observer);
[ipccode 6] void UnsubscribeEntityObserver(
[in] EntityType entityType, [in] unsigned int expectedDataLength, [in] IEntityRecognitionObserver observer);
[ipccode 7] void SubscribeDisposableObserver([in] IPasteboardDisposableObserver observer,
[in] int targetWindowId, [in] DisposableType type, [in] unsigned int maxLength);
[ipccode 8] void ResubscribeObserver([in] PasteboardObserverType type, [in] IPasteboardChangedObserver observer);
[ipccode 9] void DetachPasteboard();
[ipccode 100] void Clear();
[ipccode 101] void SetPasteDataOnly([in] FileDescriptor fd, [in] long memSize, [in] unsigned char[] buffer);
[ipccode 102] void SetPasteDataDelayData([in] FileDescriptor fd, [in] long memSize, [in] unsigned char[] buffer,
[in] IPasteboardDelayGetter delayGetter);
[ipccode 103] void SetPasteDataEntryData([in] FileDescriptor fd, [in] long memSize, [in] unsigned char[] buffer,
[in] IPasteboardEntryGetter entryGetter);
[ipccode 104] void SetPasteData([in] FileDescriptor fd, [in] long memSize, [in] unsigned char[] buffer,
[in] IPasteboardDelayGetter delayGetter, [in] IPasteboardEntryGetter entryGetter);
[ipccode 105] void SyncDelayedData();
[ipccode 106] void ClearByUser([in] int userId);
[ipccode 200] void GetPasteData([out] FileDescriptorSan fd, [out] long memSize, [out] unsigned char[] buffer,
[in] unsigned int pasteSeqId, [out] int syncTime, [out] int realErrCode);
[ipccode 201] void GetRecordValueByType([in] unsigned int dataId, [in] unsigned int recordId,
[inout] long rawDataSize, [inout] unsigned char[] buffer, [inout] FileDescriptorSan fd);
[ipccode 202] void PasteStart([in] String pasteId);
[ipccode 203] void PasteComplete([in] String deviceId, [in] String pasteId);
[ipccode 204] void ShowProgress([in] String progressKey, [in] IRemoteObject observer);
[ipccode 300] void HasPasteData([out] boolean funcResult);
[ipccode 301] void HasDataType([in] String mimeType, [out] boolean funcResult);
[ipccode 302] void GetMimeTypes([out] String[] funcResult);
[ipccode 303] void GetDataSource([out] String bundleName);
[ipccode 304] void IsRemoteData([out] boolean funcResult);
[ipccode 305] void GetChangeCount([out] unsigned int changeCount);
[ipccode 306] void DetectPatterns([in] Pattern[] patternsToCheck, [out] Pattern[] funcResult);
[ipccode 307] void HasUtdType([in] String utdType, [out] boolean funcResult);
[ipccode 308] void HasRemoteData([out] boolean funcResult);
[ipccode 309] void GetPasteDataInfo([out] PasteDataInfo pasteDataInfo);
[ipccode 400] void SetGlobalShareOption([in] Map<unsigned int, int> globalShareOptions);
[ipccode 401] void RemoveGlobalShareOption([in] unsigned int[] tokenIds);
[ipccode 402] void GetGlobalShareOption([in] unsigned int[] tokenIds, [out] Map<unsigned int, int> funcResult);
[ipccode 403] void SetAppShareOptions([in] int shareOptions);
[ipccode 404] void RemoveAppShareOptions();
}