/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef HDC_SERIAL_STRUCT_H #define HDC_SERIAL_STRUCT_H #include "common.h" #include "serial_struct_define.h" #include "transfer.h" namespace Hdc { namespace SerialStruct { constexpr int fieldOne = 1; constexpr int fieldTwo = 2; constexpr int fieldThree = 3; constexpr int fieldFour = 4; constexpr int fieldFive = 5; constexpr int fieldSix = 6; constexpr int fieldSeven = 7; constexpr int fieldEight = 8; constexpr int fieldNine = 9; constexpr int fieldTen = 10; constexpr int field11 = 11; constexpr int field12 = 12; constexpr int field13 = 13; template<> struct Descriptor { static auto type() { return Message(Field("fileSize"), Field("atime"), Field("mtime"), Field("options"), Field("path"), Field("optionalName"), Field("updateIfNew"), Field("compressType"), Field("holdTimestamp"), Field("functionName"), Field("clientCwd"), Field("reserve1"), Field("reserve2")); } }; template<> struct Descriptor { static auto type() { return Message(Field("perm"), Field("uId"), Field("gId"), Field("context"), Field("fullName")); } }; template<> struct Descriptor { static auto type() { return Message(Field("index"), Field("compressType"), Field("compressSize"), Field("uncompressSize")); } }; template<> struct Descriptor { static auto type() { return Message(Field("banner"), Field("authType"), Field("sessionId"), Field("connectKey"), Field("buf"), Field("version")); } }; template<> struct Descriptor { static auto type() { return Message(Field("channelId"), Field("commandFlag"), Field("checkSum"), Field("vCode")); } }; template<> struct Descriptor { static auto type() { return Message( Field("heartbeatCount"), Field("reserved")); } }; } // SerialStruct } // Hdc #endif // HDC_SERIAL_STRUCT_H