1 /* 2 * Copyright (c) 2021 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 16 #ifndef OHOS_DISTRIBUTED_CALLER_INFO_H 17 #define OHOS_DISTRIBUTED_CALLER_INFO_H 18 19 namespace OHOS { 20 namespace DistributedSchedule { 21 enum { 22 CALLER_TYPE_NONE = 0, 23 CALLER_TYPE_HARMONY = 1, 24 }; 25 26 enum { 27 VERSION_BASE = 200, // begin for 200 and step for 200 28 VERSION = VERSION_BASE, 29 }; 30 struct CallerInfo { 31 int32_t uid = -1; 32 int32_t pid = -1; 33 int32_t callerType = CALLER_TYPE_NONE; 34 std::string sourceDeviceId; 35 int32_t duid = -1; 36 std::string callerAppId; 37 std::vector<std::string> bundleNames; 38 int32_t dmsVersion = -1; 39 uint32_t accessToken = 0; 40 }; 41 } // namespace DistributedSchedule 42 } // namespace OHOS 43 #endif // OHOS_DISTRIBUTED_CALLER_INFO_H