1 // Copyright (C) 2024 Huawei Device Co., Ltd.
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 //     http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 //! Safe Rust interface to OHOS IPC/RPC
15 #![allow(clippy::missing_safety_doc)]
16 #![allow(missing_docs, unused)]
17 
18 #[macro_use]
19 mod hilog;
20 
21 mod errors;
22 
23 pub mod ipc_async;
24 pub mod parcel;
25 pub mod process;
26 pub mod remote;
27 
28 pub mod cxx_share;
29 mod skeleton;
30 // Export types of this crate
31 pub use crate::errors::{parse_status_code, status_result, IpcResult, IpcStatusCode};
32 
33 /// First request code available for user IPC request(inclusive)
34 pub const FIRST_CALL_TRANSACTION: isize = 0x00000001;
35 /// Last request code available for user IPC request(inclusive)
36 pub const LAST_CALL_TRANSACTION: isize = 0x00ffffff;
37 use hilog_rust::{HiLogLabel, LogType};
38 pub use skeleton::Skeleton;
39 
40 const LOG_LABEL: HiLogLabel = HiLogLabel {
41     log_type: LogType::LogCore,
42     domain: 0xD0057CA,
43     tag: "IPC_RUST",
44 };
45