Home
last modified time | relevance | path

Searched refs:u32 (Results 1 – 25 of 132) sorted by relevance

123456

/base/request/request/services/src/service/
Dinterface.rs17 pub(crate) const CONSTRUCT: u32 = 0;
18 pub(crate) const PAUSE: u32 = 1;
19 pub(crate) const QUERY: u32 = 2;
20 pub(crate) const QUERY_MIME_TYPE: u32 = 3;
21 pub(crate) const REMOVE: u32 = 4;
22 pub(crate) const RESUME: u32 = 5;
23 pub(crate) const START: u32 = 6;
24 pub(crate) const STOP: u32 = 7;
25 pub(crate) const SHOW: u32 = 8;
26 pub(crate) const TOUCH: u32 = 9;
[all …]
Dmod.rs56 fn on_remote_request(&self, code: u32, data: &mut MsgParcel, reply: &mut MsgParcel) -> i32 { in on_remote_request() argument
106 reply.write(&(tf.common_data.action as u32))?; in serialize_task_info()
107 reply.write(&(tf.common_data.mode as u32))?; in serialize_task_info()
108 reply.write(&(tf.common_data.reason as u32))?; in serialize_task_info()
122 reply.write(&(tf.form_items.len() as u32))?; in serialize_task_info()
128 reply.write(&(tf.file_specs.len() as u32))?; in serialize_task_info()
136 reply.write(&(tf.progress.common_data.state as u32))?; in serialize_task_info()
138 reply.write(&(index as u32))?; in serialize_task_info()
143 reply.write(&(tf.progress.extras.len() as u32))?; in serialize_task_info()
149 reply.write(&(tf.extras.len() as u32))?; in serialize_task_info()
[all …]
/base/msdp/device_status/rust/ipc/service/src/
Didentity.rs47 const PARAMBITS: u32 = 12;
48 const PARAMMASK: u32 = (1u32 << PARAMBITS) - 1u32;
49 const INTENTIONSHIFT: u32 = PARAMBITS;
50 const INTENTIONBITS: u32 = 8;
51 const INTENTIONMASK: u32 = (1u32 << INTENTIONBITS) - 1u32;
52 const ACTIONSHIFT: u32 = INTENTIONSHIFT + INTENTIONBITS;
53 const ACTIONBITS: u32 = 4;
54 const ACTIONMASK: u32 = (1u32 << ACTIONBITS) - 1u32;
56 pub fn compose_param_id(action: CommonAction, intention: Intention, param: u32) -> u32 in compose_param_id() argument
59 ((action as u32 & ACTIONMASK) << ACTIONSHIFT) | in compose_param_id()
[all …]
/base/security/asset/services/plugin/src/
Dasset_plugin.rs89 fn init(&mut self, user_id: i32) -> std::result::Result<(), u32> { in init() argument
91 asset_file_operator::create_user_db_dir(user_id).map_err(|e| e.code as u32)?; in init()
93 let db = Database::build(user_id).map_err(|e| e.code as u32)?; in init()
99 fn add(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> { in add() argument
100 self.data_base.as_mut().ok_or(ErrCode::InvalidArgument as u32)? in add()
102 .map_err(|e| e.code as u32) in add()
106 fn query(&mut self, attributes: &ExtDbMap) -> std::result::Result<Vec<ExtDbMap>, u32> { in query() argument
107 self.data_base.as_mut().ok_or(ErrCode::InvalidArgument as u32)? in query()
109 .map_err(|e| e.code as u32) in query()
113 fn remove(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> { in remove() argument
[all …]
/base/security/asset/services/crypto_manager/src/
Dcrypto.rs28 …fn InitKey(keyId: *const KeyId, valid_time: u32, challenge: *mut OutBlob, handle: *mut OutBlob) ->… in InitKey() argument
49 valid_time: u32,
55 pub fn build(key: SecretKey, valid_time: u32) -> Result<Self> { in build()
67 … let key_alias = HksBlob { size: self.key.alias().len() as u32, data: self.key.alias().as_ptr() }; in init_key()
68 …let mut challenge = OutBlob { size: self.challenge.len() as u32, data: self.challenge.as_mut_ptr()… in init_key()
69 let mut handle = OutBlob { size: self.handle.len() as u32, data: self.handle.as_mut_ptr() }; in init_key()
82 _ => Err(transfer_error_code(ErrCode::try_from(ret as u32)?)), in init_key()
92 let aad = HksBlob { size: aad.len() as u32, data: aad.as_ptr() }; in exec_crypt()
93 let auth_token = HksBlob { size: auth_token.len() as u32, data: auth_token.as_ptr() }; in exec_crypt()
94 let handle = HksBlob { size: self.handle.len() as u32, data: self.handle.as_ptr() }; in exec_crypt()
[all …]
/base/security/asset/interfaces/inner_api/rs/src/
Dplugin_interface.rs75 fn init(&mut self, user_id: i32) -> Result<(), u32>; in init() argument
78 fn add(&mut self, attributes: &ExtDbMap) -> Result<i32, u32>; in add() argument
81 fn query(&mut self, attributes: &ExtDbMap) -> Result<Vec<ExtDbMap>, u32>; in query() argument
84 fn remove(&mut self, attributes: &ExtDbMap) -> Result<i32, u32>; in remove() argument
87 fn update(&mut self, attributes: &ExtDbMap, attrs_to_update: &ExtDbMap) -> Result<i32, u32>; in update() argument
90 fn begin_transaction(&mut self) -> Result<(), u32>; in begin_transaction() argument
93 fn commit_transaction(&mut self) -> Result<(), u32>; in commit_transaction() argument
96 fn rollback_transaction(&mut self) -> Result<(), u32>; in rollback_transaction() argument
105 fn init(&self, ctx: Box<dyn IAssetPluginCtx>) -> Result<(), u32>; in init() argument
111 fn process_event(&self, event_type: EventType, params: &ExtDbMap) -> Result<(), u32>; in process_event() argument
/base/security/asset/test/unittest/module_test/src/
Dasset_system_api_test.cpp89 … { .tag = SEC_ASSET_TAG_ACCESSIBILITY, .value.u32 = SEC_ASSET_ACCESSIBILITY_DEVICE_UNLOCKED },
90 { .tag = SEC_ASSET_TAG_USER_ID, .value.u32 = SPECIFIC_USER_ID },
92 { .tag = SEC_ASSET_TAG_AUTH_TYPE, .value.u32 = SEC_ASSET_AUTH_TYPE_NONE },
93 { .tag = SEC_ASSET_TAG_SYNC_TYPE, .value.u32 = SEC_ASSET_SYNC_TYPE_NEVER },
94 { .tag = SEC_ASSET_TAG_CONFLICT_RESOLUTION, .value.u32 = SEC_ASSET_CONFLICT_OVERWRITE },
130 { .tag = SEC_ASSET_TAG_USER_ID, .value.u32 = SPECIFIC_USER_ID },
131 … { .tag = SEC_ASSET_TAG_ACCESSIBILITY, .value.u32 = SEC_ASSET_ACCESSIBILITY_DEVICE_UNLOCKED },
138 { .tag = SEC_ASSET_TAG_USER_ID, .value.u32 = SPECIFIC_USER_ID },
139 { .tag = SEC_ASSET_TAG_RETURN_TYPE, .value.u32 = SEC_ASSET_RETURN_ALL }
160 … { .tag = SEC_ASSET_TAG_ACCESSIBILITY, .value.u32 = SEC_ASSET_ACCESSIBILITY_DEVICE_UNLOCKED },
[all …]
/base/security/code_signature/services/key_enable/src/
Dcert_path_utils.rs52 fn from_str(s: &str) -> Result<u32, ()> { in from_str() argument
54 "Platform" => Ok(ReleaseCertPathType::Platform as u32), in from_str()
55 "Authed" => Ok(ReleaseCertPathType::Authed as u32), in from_str()
56 "Developer" => Ok(ReleaseCertPathType::Developer as u32), in from_str()
57 "Block" => Ok(ReleaseCertPathType::Block as u32), in from_str()
75 fn from_str(s: &str) -> Result<u32, ()> { in from_str() argument
77 "Platform" => Ok(DebugCertPathType::Platform as u32), in from_str()
78 "Authed" => Ok(DebugCertPathType::Authed as u32), in from_str()
79 "Developer" => Ok(DebugCertPathType::Developer as u32), in from_str()
80 "Debug" => Ok(DebugCertPathType::Debug as u32), in from_str()
[all …]
/base/request/request/services/src/manage/events/
Dmod.rs48 pub(crate) fn construct(config: TaskConfig) -> (Self, Recv<Result<u32, ErrorCode>>) { in construct() argument
49 let (tx, rx) = channel::<Result<u32, ErrorCode>>(); in construct()
59 pub(crate) fn pause(uid: u64, task_id: u32) -> (Self, Recv<ErrorCode>) { in pause()
67 pub(crate) fn query(task_id: u32, action: Action) -> (Self, Recv<Option<TaskInfo>>) { in query() argument
75 pub(crate) fn query_mime_type(uid: u64, task_id: u32) -> (Self, Recv<String>) { in query_mime_type()
83 pub(crate) fn start(uid: u64, task_id: u32) -> (Self, Recv<ErrorCode>) { in start()
91 pub(crate) fn stop(uid: u64, task_id: u32) -> (Self, Recv<ErrorCode>) { in stop()
99 pub(crate) fn show(uid: u64, task_id: u32) -> (Self, Recv<Option<TaskInfo>>) { in show()
107 pub(crate) fn search(filter: Filter) -> (Self, Recv<Vec<u32>>) { in search() argument
108 let (tx, rx) = channel::<Vec<u32>>(); in search()
[all …]
/base/security/asset/frameworks/ipc/src/
Dlib.rs29 pub const IPC_SUCCESS: u32 = 0;
31 const MAX_MAP_CAPACITY: u32 = 64;
32 const MAX_VEC_CAPACITY: u32 = 0x10000;
55 if map.len() as u32 > MAX_MAP_CAPACITY { in serialize_map()
58 parcel.write(&(map.len() as u32)).map_err(ipc_err_handle)?; in serialize_map()
68 parcel.write(&(tag as u32)).map_err(ipc_err_handle)?; in serialize_map()
71 Value::Number(n) => parcel.write::<u32>(n).map_err(ipc_err_handle)?, in serialize_map()
80 let len = parcel.read::<u32>().map_err(ipc_err_handle)?; in deserialize_map()
86 let tag = parcel.read::<u32>().map_err(ipc_err_handle)?; in deserialize_map()
94 let v = parcel.read::<u32>().map_err(ipc_err_handle)?; in deserialize_map()
[all …]
/base/security/asset/frameworks/utils/src/
Dhasher.rs18 const LOWER_BYTES_MASK: u32 = 0xff;
24 const SHA256_H: [u32; 8] =
27 const SHA256_K: [u32; 64] = [
38 fn expand_chunk(plain_chunk: [u8; BYTES_PER_CHUNK]) -> [u32; BYTES_PER_CHUNK] { in expand_chunk()
42 *item = ((plain_chunk[offset] as u32) << 24)
43 | ((plain_chunk[offset + 1] as u32) << 16)
44 | ((plain_chunk[offset + 2] as u32) << 8)
45 | (plain_chunk[offset + 3] as u32);
61 fn compress_chunk(expanded_chunk: [u32; 64]) -> [u32; 8] { in compress_chunk()
62 let mut compressed_chunk: [u32; 8] = SHA256_H;
[all …]
/base/request/request/services/src/service/client/
Dmod.rs29 const REQUEST_MAGIC_NUM: u32 = 0x43434646;
31 const POSITION_OF_LENGTH: u32 = 10;
35 Subscribe(u32, u64, u64, u64, Sender<ErrorCode>),
36 Unsubscribe(u32, Sender<ErrorCode>),
37 TaskFinished(u32),
39 SendResponse(u32, String, u32, String, Headers),
66 pub(crate) fn subscribe(&self, tid: u32, pid: u64, uid: u64, token_id: u64) -> ErrorCode { in subscribe() argument
82 pub(crate) fn unsubscribe(&self, tid: u32) -> ErrorCode { in unsubscribe()
98 pub(crate) fn notify_task_finished(&self, tid: u32) { in notify_task_finished() argument
121 tid: u32, in send_response() argument
[all …]
/base/security/asset/frameworks/definition/src/
Dmacros.rs40 impl std::convert::TryFrom<u32> for $name {
43 fn try_from(v: u32) -> std::result::Result<Self, Self::Error> {
45 $(x if x == $name::$vname as u32 => Ok($name::$vname),)*
88 impl std::convert::TryFrom<u32> for $name {
91 fn try_from(v: u32) -> std::result::Result<Self, Self::Error> {
93 $(x if x == $name::$vname as u32 => Ok($name::$vname),)*
118 $crate::Value::Number(self as u32)
171 impl From<$t> for u32 {
174 value as u32
Dextension.rs28 const DATA_TYPE_MASK: u32 = 0xF << 28;
32 let mask = (*self as u32) & DATA_TYPE_MASK; in data_type()
34 _ if DataType::Bool as u32 == mask => DataType::Bool, in data_type()
35 _ if DataType::Number as u32 == mask => DataType::Number, in data_type()
36 _ if DataType::Bytes as u32 == mask => DataType::Bytes, in data_type()
44 Value::Number(self as u32) in into_value()
82 impl Conversion for u32 { implementation
108 fn get_enum_attr<T: TryFrom<u32, Error = AssetError>>(&self, key: &K) -> Result<T> { in get_enum_attr() argument
116 fn get_num_attr(&self, key: &K) -> Result<u32> { in get_num_attr() argument
/base/hiviewdfx/hilog/interfaces/rust/src/
Dlib.rs70 pub domain: u32,
78 pub fn HiLogIsLoggable(domain: u32, tag: *const c_char, level: u32) -> bool; in HiLogIsLoggable() argument
83 domain: u32, in HiLogPrint() argument
87 ) -> u32; in HiLogPrint() argument
/base/security/asset/interfaces/inner_api/c/src/
Dlib.rs26 fn AssetMalloc(size: u32) -> *mut c_void; in AssetMalloc()
29 fn into_map(attributes: *const AssetAttr, attr_cnt: u32) -> Option<AssetMap> { in into_map()
67 pub extern "C" fn add_asset(attributes: *const AssetAttr, attr_cnt: u32) -> i32 { in add_asset()
87 pub extern "C" fn remove_asset(query: *const AssetAttr, query_cnt: u32) -> i32 { in remove_asset()
109 query_cnt: u32, in update_asset() argument
111 update_cnt: u32, in update_asset() argument
141 pub unsafe extern "C" fn pre_query_asset(query: *const AssetAttr, query_cnt: u32, challenge: *mut A… in pre_query_asset() argument
177 pub unsafe extern "C" fn query_asset(query: *const AssetAttr, query_cnt: u32, result_set: *mut Asse… in query_asset() argument
209 pub extern "C" fn post_query_asset(handle: *const AssetAttr, handle_cnt: u32) -> i32 { in post_query_asset()
230 tag: u32,
[all …]
/base/request/request/services/src/task/
Dffi.rs43 pub(crate) form_items_len: u32,
45 pub(crate) file_specs_len: u32,
47 pub(crate) body_file_names_len: u32,
49 pub(crate) certs_path_len: u32,
55 pub(crate) task_id: u32,
66 pub(crate) index: u32,
71 pub(crate) priority: u32,
139 pub(crate) form_items_len: u32,
141 pub(crate) file_specs_len: u32,
147 pub(crate) each_file_status_len: u32,
[all …]
/base/request/request/services/src/service/command/
Dconstruct.rs39 let action: u32 = data.read()?; in construct()
42 let version: u32 = data.read()?; in construct()
45 let mode: u32 = data.read()?; in construct()
50 let network: u32 = data.read()?; in construct()
63 let index: u32 = data.read()?; in construct()
73 let priority: u32 = data.read()?; in construct()
97 let certs_path_size: u32 = data.read()?; in construct()
98 if certs_path_size > data.readable() as u32 { in construct()
109 let form_size: u32 = data.read()?; in construct()
110 if form_size > data.readable() as u32 { in construct()
[all …]
/base/request/request/services/src/manage/
Ddatabase.rs34 user_file_tasks: HashMap<u32, Arc<RequestTask>>,
51 pub(crate) fn contains_task(&self, task_id: u32) -> bool { in contains_task()
113 pub(crate) fn change_task_state(&self, task_id: u32, uid: u64, state: State, reason: Reason) { in change_task_state() argument
117 pub(crate) fn get_task_info(&self, task_id: u32) -> Option<TaskInfo> { in get_task_info()
131 pub(crate) fn search_tasks(&self, filter: Filter) -> Vec<u32> { in search_tasks() argument
156 pub(crate) fn get_all_uncompleted_task_config(&self) -> Option<HashMap<u32, TaskConfig>> { in get_all_uncompleted_task_config() argument
181 pub(crate) fn get_task_config(&self, task_id: u32) -> Option<TaskConfig> { in get_task_config()
211 pub(crate) fn get_token_id(&self, task_id: u32) -> Option<u64> { in get_token_id()
224 pub(crate) fn get_task_qos_info(&self, uid: u64, task_id: u32) -> Option<TaskQosInfo> { in get_task_qos_info()
292 task_id: u32, in get_task() argument
[all …]
/base/hiviewdfx/hicollie/interfaces/rust/src/
Dlib.rs26 timeout: u32, in SetTimerRust() argument
29 flag: u32, in SetTimerRust() argument
42 timeout: u32, in set_timer() argument
45 flag: u32, in set_timer() argument
/base/msdp/device_status/rust/data/sys/src/
Dplugin_manager.rs45 …fn add_watch(&self, context: &CallingContext, id: u32, data: &BorrowedMsgParcel, reply: &mut Borro… in add_watch() argument
47 …fn remove_watch(&self, context: &CallingContext, id: u32, data: &BorrowedMsgParcel, reply: &mut Bo… in remove_watch() argument
49 …fn set_param(&self, context: &CallingContext, id: u32, data: &BorrowedMsgParcel, reply: &mut Borro… in set_param() argument
51 …fn get_param(&self, context: &CallingContext, id: u32, data: &BorrowedMsgParcel, reply: &mut Borro… in get_param() argument
54 …fn control(&self, context: &CallingContext, id: u32, data: &BorrowedMsgParcel, reply: &mut Borrowe… in control() argument
/base/security/asset/test/unittest/common/src/
Dasset_test_common.cpp43 { .tag = SEC_ASSET_TAG_USER_ID, .value.u32 = SPECIFIC_USER_ID } in RemoveByAliasSdk()
59 .value.u32 = ASSET_RETURN_ALL in QueryByAliasNdk()
71 { .tag = SEC_ASSET_TAG_RETURN_TYPE, .value.u32 = SEC_ASSET_RETURN_ALL }, in QueryByAliasSdk()
72 { .tag = SEC_ASSET_TAG_USER_ID, .value.u32 = SPECIFIC_USER_ID } in QueryByAliasSdk()
113 if (attrs[i].value.u32 != res->value.u32) { in CheckMatchAttrResultSdk()
114 printf("tag is %x, %u vs %u", attrs[i].tag, attrs[i].value.u32, res->value.u32); in CheckMatchAttrResultSdk()
/base/security/asset/services/core_service/src/
Dstub.rs30 const UPGRADE_CODE: u32 = 18100;
36 code: u32, in on_remote_request() argument
60 …fn GetCallingName(userId: i32, name: *mut u8, nameLen: *mut u32, isHap: *mut bool, appIndex: *mut … in GetCallingName() argument
84 params.insert(PARAM_NAME_USER_ID, Value::Number(user_id as u32)); in on_app_request()
88 params.insert(PARAM_NAME_APP_INDEX, Value::Number(app_index as u32)); in on_app_request()
98 fn on_remote_request(stub: &AssetService, code: u32, data: &mut MsgParcel, reply: &mut MsgParcel) -… in on_remote_request() argument
136 fn on_extension_request(_stub: &AssetService, _code: u32, data: &mut MsgParcel, _reply: &mut MsgPar… in on_extension_request() argument
151 params.insert(PARAM_NAME_USER_ID, Value::Number(user_id as u32)); in on_extension_request()
170 Ok(_) => reply.write::<u32>(&IPC_SUCCESS), in reply_handle()
172 reply.write::<u32>(&(e.code as u32))?; in reply_handle()
/base/security/asset/test/unittest/inner_api_rust/src/
Dcommon.rs31 pub(crate) const MIN_NUMBER_VALUE: u32 = 0;
32 pub(crate) const MAX_RETURN_LIMIT: u32 = 0x10000; // 65536
33 pub(crate) const MAX_AUTH_VALID_PERIOD: u32 = 600; // 10min
34 pub(crate) const CRYPTO_CAPACITY: u32 = 16;
44 pub(crate) const SYNC_TYPE_MIN_BITS: u32 = 0;
45 pub(crate) const SYNC_TYPE_MAX_BITS: u32 = 3;
78 (Tag::ReturnType, Value::Number(ReturnType::All as u32)), in query_all_by_alias()
85 (Tag::ReturnType, Value::Number(ReturnType::Attributes as u32)), in query_attr_by_alias()
93 (Tag::Accessibility, Value::Number(Accessibility::DevicePowerOn as u32)), in add_default_asset()
101 (Tag::Accessibility, Value::Number(Accessibility::DevicePowerOn as u32)), in add_default_auth_asset()
[all …]
/base/msdp/device_status/rust/utils/src/
Dmacros.rs31 #[repr(u32)]
39 impl TryFrom<u32> for $name {
41 fn try_from(code: u32) -> std::result::Result<Self, Self::Error> {
44 _ if code == Self::$item as u32 => {
60 (Self::$item as u32).serialize(parcel)
69 match u32::deserialize(parcel) {

123456