193360723Sopenharmony_ci/* 293360723Sopenharmony_ci * Copyright (c) 2020 Huawei Device Co., Ltd. 393360723Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 493360723Sopenharmony_ci * you may not use this file except in compliance with the License. 593360723Sopenharmony_ci * You may obtain a copy of the License at 693360723Sopenharmony_ci * 793360723Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 893360723Sopenharmony_ci * 993360723Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1093360723Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1193360723Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1293360723Sopenharmony_ci * See the License for the specific language governing permissions and 1393360723Sopenharmony_ci * limitations under the License. 1493360723Sopenharmony_ci */ 1593360723Sopenharmony_ci 1693360723Sopenharmony_ci#ifndef OHOS_DISTRIBUTEDSCHEDULE_MSGPACK_H 1793360723Sopenharmony_ci#define OHOS_DISTRIBUTEDSCHEDULE_MSGPACK_H 1893360723Sopenharmony_ci 1993360723Sopenharmony_ci#include "dmslite_tlv_common.h" 2093360723Sopenharmony_ci#include <stdint.h> 2193360723Sopenharmony_ci#include <stdbool.h> 2293360723Sopenharmony_ci 2393360723Sopenharmony_ci#ifdef __cplusplus 2493360723Sopenharmony_ci#if __cplusplus 2593360723Sopenharmony_ciextern "C" { 2693360723Sopenharmony_ci#endif 2793360723Sopenharmony_ci#endif 2893360723Sopenharmony_ci 2993360723Sopenharmony_cibool PreprareBuild(); 3093360723Sopenharmony_cibool MarshallUint8(uint8_t field, FieldType fieldType); 3193360723Sopenharmony_cibool MarshallUint16(uint16_t field, FieldType fieldType); 3293360723Sopenharmony_cibool MarshallUint32(uint32_t field, FieldType fieldType); 3393360723Sopenharmony_cibool MarshallUint64(uint64_t field, FieldType fieldType); 3493360723Sopenharmony_cibool MarshallInt8(int8_t field, FieldType fieldType); 3593360723Sopenharmony_cibool MarshallInt16(int16_t field, FieldType fieldType); 3693360723Sopenharmony_cibool MarshallInt32(int32_t field, FieldType fieldType); 3793360723Sopenharmony_cibool MarshallInt64(int64_t field, FieldType fieldType); 3893360723Sopenharmony_cibool MarshallString(const char* field, uint8_t type); 3993360723Sopenharmony_cibool MarshallRawData(const void *field, uint8_t type, uint16_t length); 4093360723Sopenharmony_ciuint16_t GetPacketSize(); 4193360723Sopenharmony_ciconst char* GetPacketBufPtr(); 4293360723Sopenharmony_civoid CleanBuild(); 4393360723Sopenharmony_ci 4493360723Sopenharmony_ci#ifdef __cplusplus 4593360723Sopenharmony_ci#if __cplusplus 4693360723Sopenharmony_ci} 4793360723Sopenharmony_ci#endif 4893360723Sopenharmony_ci#endif 4993360723Sopenharmony_ci 5093360723Sopenharmony_ci#endif /* OHOS_DISTRIBUTEDSCHEDULE_MSGPACK_H */ 51