1 /* 2 * Copyright (c) 2025 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_IPC_TEST_SMALL_COMMON_H 17 #define OHOS_IPC_TEST_SMALL_COMMON_H 18 19 #define IPC_BUFFER_SIZE 2048 20 #define OBJ_NUM 20 21 // deviceManager permission @permossion_lite 22 #ifdef __LITEOS_A__ 23 #define IPC_TEST_SMALL "dev_mgr_svc" 24 #else 25 #define IPC_TEST_SMALL "ai_service" 26 #endif 27 28 enum DataType { 29 TYPE_START = 0, 30 REGISTER_ON_SERVICE, 31 ON_RECV_SERVER, 32 // base type 33 BOOL_TYPE, 34 INT8_TYPE, 35 INT16_TYPE, 36 INT32_TYPE, 37 INT64_TYPE, 38 UINT8_TYPE, 39 UINT16_TYPE, 40 UINT32_TYPE, 41 UINT64_TYPE, 42 FLOAT_TYPE, 43 DOUBLE_TYPE, 44 // vector 45 VECTOR_INT8_TYPE, 46 VECTOR_INT16_TYPE, 47 VECTOR_INT32_TYPE, 48 VECTOR_INT64_TYPE, 49 VECTOR_UINT8_TYPE, 50 VECTOR_UINT16_TYPE, 51 VECTOR_UINT32_TYPE, 52 VECTOR_UINT64_TYPE, 53 VECTOR_FLOAT_TYPE, 54 VECTOR_DOUBLE_TYPE, 55 // string 56 CHAR_TYPE, 57 // fileDescriptor 58 FD_TYPE, 59 // rawData 60 RAW_DATA_TYPE, 61 // buffer 62 BUFFER_TYPE, 63 TYPE_END, 64 }; 65 66 typedef struct { 67 enum DataType id; 68 } Reply; 69 70 #endif // OHOS_IPC_TEST_SMALL_COMMON_H