1/* 2 * Copyright (C) 2024 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 IPC_RUST_CXX_SKELETON_H 17#define IPC_RUST_CXX_SKELETON_H 18 19#include "cxx.h" 20#include "ipc_skeleton.h" 21#include "remote_object_wrapper.h" 22 23namespace OHOS { 24namespace IpcRust { 25bool SetMaxWorkThreadNum(int maxThreadNum); 26 27void JoinWorkThread(); 28 29void StopWorkThread(); 30 31uint64_t GetCallingPid(); 32 33uint64_t GetCallingRealPid(); 34 35uint64_t GetCallingUid(); 36 37uint32_t GetCallingTokenID(); 38 39uint64_t GetCallingFullTokenID(); 40 41uint32_t GetFirstTokenID(); 42 43uint64_t GetFirstFullTokenID(); 44 45uint64_t GetSelfTokenID(); 46 47rust::string GetLocalDeviceID(); 48 49rust::string GetCallingDeviceID(); 50 51bool IsLocalCalling(); 52 53std::unique_ptr<IRemoteObjectWrapper> GetContextObject(); 54 55int FlushCommands(IRemoteObjectWrapper &object); 56 57rust::string ResetCallingIdentity(); 58 59bool SetCallingIdentity(rust::str identity); 60 61bool IsHandlingTransaction(); 62 63} // namespace IpcRust 64} // namespace OHOS 65 66#endif