lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @file pb_msg.h |
| 3 | * @brief ÃûƬ¼ÐÓ¦ÓöÔÍâÌṩµÄÏûÏ¢¼°½á¹¹Ì壬Ö÷ҪʹÓÃÕß°üÀ¨webserver¼°tro69»òÆäËûÓ¦Óà |
| 4 | * |
| 5 | * Copyright (C) 2017 Sanechips Technology Co., Ltd. |
| 6 | * @author |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | */ |
| 13 | #ifndef __PB_MSG_H__ |
| 14 | #define __PB_MSG_H__ |
| 15 | |
| 16 | #include "message.h" |
| 17 | |
| 18 | #define ZPB_GROUP_SIZE 32 |
| 19 | #define ZPB_SNE_SIZE 32 |
| 20 | |
| 21 | #ifndef ZPB_MAX_DEL_LEN |
| 22 | #define ZPB_MAX_DEL_LEN 50 |
| 23 | #endif |
| 24 | |
| 25 | #ifndef ZPB_NUM_SIZE |
| 26 | #define ZPB_NUM_SIZE (ZPB_MAX_NUM_LENGTH+2) /* + and null for string */ |
| 27 | #endif |
| 28 | |
| 29 | #ifndef ZPB_MAX_NUM_LENGTH |
| 30 | #define ZPB_MAX_NUM_LENGTH 40 |
| 31 | #endif |
| 32 | |
| 33 | //name length |
| 34 | #ifndef ZPB_MAX_TEXT_LENGTH |
| 35 | #define ZPB_MAX_TEXT_LENGTH 90 |
| 36 | #endif |
| 37 | |
| 38 | #ifndef ZPB_TEXT_SIZE_CHARS |
| 39 | #define ZPB_TEXT_SIZE_CHARS (ZPB_MAX_TEXT_LENGTH+1) /* Null terminated string */ |
| 40 | #endif |
| 41 | |
| 42 | #ifndef ZPB_TEXT_SIZE_BYTES |
| 43 | #define ZPB_TEXT_SIZE_BYTES (ZPB_TEXT_SIZE_CHARS*sizeof(short)) /* size in bytes */ |
| 44 | #endif |
| 45 | |
| 46 | enum pb_msg_cmd { |
| 47 | MSG_CMD_WRITE_PB = MSG_CMD_PB_BASE,//Ôö¼ÓÒ»ÌõÃûƬ¼Ð£¬¶ÔÓ¦½á¹¹ÌåT_zPb_WebContact |
| 48 | MSG_CMD_DEL_A_PB, //¶ÔÓ¦½á¹¹ÌåT_zPb_DelInfo |
| 49 | MSG_CMD_DEL_MUTI_PB, //¶ÔÓ¦½á¹¹ÌåT_zPb_DelInfo |
| 50 | MSG_CMD_DEL_ALL_PB, //¶ÔÓ¦½á¹¹ÌåT_zPb_DelInfo |
| 51 | }; |
| 52 | |
| 53 | typedef struct { |
| 54 | signed long pbId; //the id in the pbm table,unique,ASC |
| 55 | signed long pbIndex; |
| 56 | signed long pbLocation; |
| 57 | char name[ZPB_TEXT_SIZE_BYTES]; |
| 58 | char mobilNumber[ZPB_NUM_SIZE]; |
| 59 | signed long pbType; |
| 60 | char homeNumber[ZPB_NUM_SIZE]; |
| 61 | char officeNumber[ZPB_NUM_SIZE]; |
| 62 | char email[ZPB_TEXT_SIZE_BYTES]; |
| 63 | char sne[ZPB_SNE_SIZE]; |
| 64 | char group[ZPB_GROUP_SIZE]; |
| 65 | signed long del_id; |
| 66 | } T_zPb_WebContact; |
| 67 | |
| 68 | typedef struct { |
| 69 | signed long delId[ZPB_MAX_DEL_LEN]; |
| 70 | signed long delTotal; |
| 71 | signed long delLocation; |
| 72 | signed long delIndex[ZPB_MAX_DEL_LEN]; |
| 73 | } T_zPb_DelInfo; |
| 74 | |
| 75 | #endif |