1bc03f14fSopenharmony_ci/*
2bc03f14fSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3bc03f14fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4bc03f14fSopenharmony_ci * you may not use this file except in compliance with the License.
5bc03f14fSopenharmony_ci * You may obtain a copy of the License at
6bc03f14fSopenharmony_ci *
7bc03f14fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
8bc03f14fSopenharmony_ci *
9bc03f14fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10bc03f14fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11bc03f14fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12bc03f14fSopenharmony_ci * See the License for the specific language governing permissions and
13bc03f14fSopenharmony_ci * limitations under the License.
14bc03f14fSopenharmony_ci */
15bc03f14fSopenharmony_ci
16bc03f14fSopenharmony_ci#ifndef SYSTEM_PASTEBOARD_IMPL_H
17bc03f14fSopenharmony_ci#define SYSTEM_PASTEBOARD_IMPL_H
18bc03f14fSopenharmony_ci
19bc03f14fSopenharmony_ci#include "ffi_remote_data.h"
20bc03f14fSopenharmony_ci#include "paste_data_impl.h"
21bc03f14fSopenharmony_ci
22bc03f14fSopenharmony_cinamespace OHOS {
23bc03f14fSopenharmony_cinamespace MiscServicesCj {
24bc03f14fSopenharmony_ci#define PASTEBOARD_SUCCESS 0
25bc03f14fSopenharmony_ci#define PASTEBOARD_IS_BEGING_PROCESSED 12900003
26bc03f14fSopenharmony_ci#define PASTEBOARD_COPY_FORBIDDEN 12900004
27bc03f14fSopenharmony_ci#define PASTEBOARD_INVALID_PARAMETERS 401
28bc03f14fSopenharmony_ci
29bc03f14fSopenharmony_ciclass SystemPasteboardImpl : public OHOS::FFI::FFIData {
30bc03f14fSopenharmony_cipublic:
31bc03f14fSopenharmony_ci    SystemPasteboardImpl();
32bc03f14fSopenharmony_ci    static int32_t GetSystemPasteboardImpl(int64_t &id);
33bc03f14fSopenharmony_ci    int32_t SetData(sptr<PasteDataImpl> dataImpl, std::shared_ptr<MiscServices::PasteData> data);
34bc03f14fSopenharmony_ci    sptr<PasteDataImpl> GetSystemPasteboardPasteDataImpl();
35bc03f14fSopenharmony_ci    int32_t GetData(MiscServices::PasteData &pasteData);
36bc03f14fSopenharmony_ci    bool HasData();
37bc03f14fSopenharmony_ci    void ClearData();
38bc03f14fSopenharmony_ci    bool IsRemoteData();
39bc03f14fSopenharmony_ci    bool HasDataType(std::string mimeType);
40bc03f14fSopenharmony_ci    std::string GetDataSource();
41bc03f14fSopenharmony_ci    OHOS::FFI::RuntimeType *GetRuntimeType() override
42bc03f14fSopenharmony_ci    {
43bc03f14fSopenharmony_ci        return GetClassType();
44bc03f14fSopenharmony_ci    }
45bc03f14fSopenharmony_ci
46bc03f14fSopenharmony_ciprivate:
47bc03f14fSopenharmony_ci    friend class OHOS::FFI::RuntimeType;
48bc03f14fSopenharmony_ci    friend class OHOS::FFI::TypeBase;
49bc03f14fSopenharmony_ci    static OHOS::FFI::RuntimeType *GetClassType();
50bc03f14fSopenharmony_ci    sptr<PasteDataImpl> value_;
51bc03f14fSopenharmony_ci    std::shared_ptr<MiscServices::PasteData> pasteData_;
52bc03f14fSopenharmony_ci};
53bc03f14fSopenharmony_ci
54bc03f14fSopenharmony_ci} // namespace MiscServicesCj
55bc03f14fSopenharmony_ci} // namespace OHOS
56bc03f14fSopenharmony_ci
57bc03f14fSopenharmony_ci#endif