17418042dSoh_ci/*
27418042dSoh_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
37418042dSoh_ci * Licensed under the Apache License, Version 2.0 (the "License");
47418042dSoh_ci * you may not use this file except in compliance with the License.
57418042dSoh_ci * You may obtain a copy of the License at
67418042dSoh_ci *
77418042dSoh_ci *     http://www.apache.org/licenses/LICENSE-2.0
87418042dSoh_ci *
97418042dSoh_ci * Unless required by applicable law or agreed to in writing, software
107418042dSoh_ci * distributed under the License is distributed on an "AS IS" BASIS,
117418042dSoh_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127418042dSoh_ci * See the License for the specific language governing permissions and
137418042dSoh_ci * limitations under the License.
147418042dSoh_ci */
157418042dSoh_ci
167418042dSoh_ci#ifndef DISTRIBUTED_OBJECT_SERVICE_H
177418042dSoh_ci#define DISTRIBUTED_OBJECT_SERVICE_H
187418042dSoh_ci
197418042dSoh_ci#include <map>
207418042dSoh_ci#include <string>
217418042dSoh_ci#include <vector>
227418042dSoh_ci#include "distributeddata_object_store_ipc_interface_code.h"
237418042dSoh_ci#include "object_types.h"
247418042dSoh_ci
257418042dSoh_cinamespace OHOS::DistributedObject {
267418042dSoh_ciclass ObjectService {
277418042dSoh_cipublic:
287418042dSoh_ci    virtual int32_t ObjectStoreSave(const std::string &bundleName, const std::string &sessionId,
297418042dSoh_ci        const std::string &deviceId, const std::map<std::string, std::vector<uint8_t>> &data,
307418042dSoh_ci        sptr<IRemoteObject> callback) = 0;
317418042dSoh_ci    virtual int32_t ObjectStoreRetrieve(
327418042dSoh_ci        const std::string &bundleName, const std::string &sessionId, sptr<IRemoteObject> callback) = 0;
337418042dSoh_ci    virtual int32_t ObjectStoreRevokeSave(
347418042dSoh_ci        const std::string &bundleName, const std::string &sessionId, sptr<IRemoteObject> callback) = 0;
357418042dSoh_ci    virtual int32_t RegisterDataObserver(
367418042dSoh_ci        const std::string &bundleName, const std::string &sessionId, sptr<IRemoteObject> callback) = 0;
377418042dSoh_ci    virtual int32_t UnregisterDataChangeObserver(const std::string &bundleName, const std::string &sessionId) = 0;
387418042dSoh_ci    virtual int32_t OnAssetChanged(const std::string &bundleName, const std::string &sessionId,
397418042dSoh_ci        const std::string &deviceId, const ObjectStore::Asset &assetValue)  = 0;
407418042dSoh_ci    virtual int32_t BindAssetStore(const std::string &bundleName, const std::string &sessionId,
417418042dSoh_ci        ObjectStore::Asset &asset, ObjectStore::AssetBindInfo &bindInfo) = 0;
427418042dSoh_ci    virtual int32_t DeleteSnapshot(const std::string &bundleName, const std::string &sessionId) = 0;
437418042dSoh_ci    virtual int32_t IsContinue(bool &result) = 0;
447418042dSoh_ci};
457418042dSoh_ci} // namespace OHOS::DistributedObject
467418042dSoh_ci#endif
47