1686862fbSopenharmony_ci/* 2686862fbSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 3686862fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4686862fbSopenharmony_ci * you may not use this file except in compliance with the License. 5686862fbSopenharmony_ci * You may obtain a copy of the License at 6686862fbSopenharmony_ci * 7686862fbSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8686862fbSopenharmony_ci * 9686862fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10686862fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11686862fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12686862fbSopenharmony_ci * See the License for the specific language governing permissions and 13686862fbSopenharmony_ci * limitations under the License. 14686862fbSopenharmony_ci */ 15686862fbSopenharmony_ci 16686862fbSopenharmony_ci#ifndef OHOS_DISTRIBUTED_CALLER_INFO_H 17686862fbSopenharmony_ci#define OHOS_DISTRIBUTED_CALLER_INFO_H 18686862fbSopenharmony_ci 19686862fbSopenharmony_ci#include "nlohmann/json.hpp" 20686862fbSopenharmony_ci 21686862fbSopenharmony_cinamespace OHOS { 22686862fbSopenharmony_cinamespace DistributedSchedule { 23686862fbSopenharmony_cienum { 24686862fbSopenharmony_ci CALLER_TYPE_NONE = 0, 25686862fbSopenharmony_ci CALLER_TYPE_HARMONY = 1, 26686862fbSopenharmony_ci}; 27686862fbSopenharmony_ci 28686862fbSopenharmony_cienum { 29686862fbSopenharmony_ci VERSION_BASE = 200, // begin for 200 and step for 200 30686862fbSopenharmony_ci VERSION = VERSION_BASE, 31686862fbSopenharmony_ci}; 32686862fbSopenharmony_cistruct CallerInfo { 33686862fbSopenharmony_ci int32_t uid = -1; 34686862fbSopenharmony_ci int32_t pid = -1; 35686862fbSopenharmony_ci int32_t callerType = CALLER_TYPE_NONE; 36686862fbSopenharmony_ci std::string sourceDeviceId; 37686862fbSopenharmony_ci int32_t duid = -1; 38686862fbSopenharmony_ci std::string callerAppId; 39686862fbSopenharmony_ci std::vector<std::string> bundleNames; 40686862fbSopenharmony_ci int32_t dmsVersion = -1; 41686862fbSopenharmony_ci uint32_t accessToken = 0; 42686862fbSopenharmony_ci nlohmann::json extraInfoJson; 43686862fbSopenharmony_ci}; 44686862fbSopenharmony_ci} // namespace DistributedSchedule 45686862fbSopenharmony_ci} // namespace OHOS 46686862fbSopenharmony_ci#endif // OHOS_DISTRIBUTED_CALLER_INFO_H