ohos_abilitykit_sys/runtime/ability_runtime_common/
ability_runtime_common_ffi.rs1#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6
7pub type AbilityRuntimeResult = Result<(), AbilityRuntimeErrorCode>;
8#[cfg(feature = "api-13")]
9#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
10impl AbilityRuntimeErrorCode {
11 #[cfg(feature = "api-15")]
15 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
16 pub const PERMISSION_DENIED: AbilityRuntimeErrorCode =
17 AbilityRuntimeErrorCode(const { core::num::NonZero::new(201).unwrap() });
18 pub const PARAM_INVALID: AbilityRuntimeErrorCode =
20 AbilityRuntimeErrorCode(const { core::num::NonZero::new(401).unwrap() });
21 #[cfg(feature = "api-15")]
25 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
26 pub const NOT_SUPPORTED: AbilityRuntimeErrorCode =
27 AbilityRuntimeErrorCode(const { core::num::NonZero::new(801).unwrap() });
28 #[cfg(feature = "api-15")]
32 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
33 pub const NO_SUCH_ABILITY: AbilityRuntimeErrorCode =
34 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000001).unwrap() });
35 #[cfg(feature = "api-15")]
39 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
40 pub const INCORRECT_ABILITY_TYPE: AbilityRuntimeErrorCode =
41 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000002).unwrap() });
42 #[cfg(feature = "api-15")]
46 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
47 pub const CROWDTEST_EXPIRED: AbilityRuntimeErrorCode =
48 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000008).unwrap() });
49 #[cfg(feature = "api-15")]
53 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
54 pub const WUKONG_MODE: AbilityRuntimeErrorCode =
55 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000009).unwrap() });
56 pub const CONTEXT_NOT_EXIST: AbilityRuntimeErrorCode =
58 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000011).unwrap() });
59 #[cfg(feature = "api-15")]
63 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
64 pub const CONTROLLED: AbilityRuntimeErrorCode =
65 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000012).unwrap() });
66 #[cfg(feature = "api-15")]
70 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
71 pub const EDM_CONTROLLED: AbilityRuntimeErrorCode =
72 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000013).unwrap() });
73 #[cfg(feature = "api-15")]
77 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
78 pub const CROSS_APP: AbilityRuntimeErrorCode =
79 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000018).unwrap() });
80 #[cfg(feature = "api-15")]
84 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
85 pub const INTERNAL: AbilityRuntimeErrorCode =
86 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000050).unwrap() });
87 #[cfg(feature = "api-15")]
91 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
92 pub const NOT_TOP_ABILITY: AbilityRuntimeErrorCode =
93 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000053).unwrap() });
94 #[cfg(feature = "api-17")]
98 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
99 pub const ABILITY_RUNTIME_ERROR_VISIBILITY_SETTING_DISABLED: AbilityRuntimeErrorCode =
100 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000067).unwrap() });
101 #[cfg(feature = "api-17")]
105 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
106 pub const MULTI_APP_NOT_SUPPORTED: AbilityRuntimeErrorCode =
107 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000072).unwrap() });
108 #[cfg(feature = "api-17")]
112 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
113 pub const INVALID_APP_INSTANCE_KEY: AbilityRuntimeErrorCode =
114 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000076).unwrap() });
115 #[cfg(feature = "api-17")]
119 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
120 pub const UPPER_LIMIT_REACHED: AbilityRuntimeErrorCode =
121 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000077).unwrap() });
122 #[cfg(feature = "api-17")]
126 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
127 pub const ABILITY_RUNTIME_ERROR_MULTI_INSTANCE_NOT_SUPPORTED: AbilityRuntimeErrorCode =
128 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000078).unwrap() });
129 #[cfg(feature = "api-17")]
133 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
134 pub const APP_INSTANCE_KEY_NOT_SUPPORTED: AbilityRuntimeErrorCode =
135 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000079).unwrap() });
136 #[cfg(feature = "api-21")]
140 #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
141 pub const GET_APPLICATION_INFO_FAILED: AbilityRuntimeErrorCode =
142 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000081).unwrap() });
143 #[cfg(feature = "api-21")]
147 #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
148 pub const START_TIMEOUT: AbilityRuntimeErrorCode =
149 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000133).unwrap() });
150 #[cfg(feature = "api-21")]
154 #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
155 pub const MAIN_THREAD_NOT_SUPPORTED: AbilityRuntimeErrorCode =
156 AbilityRuntimeErrorCode(const { core::num::NonZero::new(16000134).unwrap() });
157}
158#[repr(transparent)]
159#[cfg(feature = "api-13")]
164#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
165#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
166pub struct AbilityRuntimeErrorCode(pub core::num::NonZero<::core::ffi::c_uint>);