1 /* 2 * MessagePack unpacking routine template 3 * 4 * Copyright (C) 2008-2010 FURUHASHI Sadayuki 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 #ifndef MSGPACK_UNPACK_DEFINE_H 19 #define MSGPACK_UNPACK_DEFINE_H 20 21 #include "rpc/msgpack/sysdep.h" 22 #include <stdlib.h> 23 #include <string.h> 24 #include <assert.h> 25 #include <stdio.h> 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 32 #ifndef MSGPACK_EMBED_STACK_SIZE 33 #define MSGPACK_EMBED_STACK_SIZE 32 34 #endif 35 36 37 typedef enum { 38 MSGPACK_CS_HEADER = 0x00, // nil 39 40 //MSGPACK_CS_ = 0x01, 41 //MSGPACK_CS_ = 0x02, // false 42 //MSGPACK_CS_ = 0x03, // true 43 44 MSGPACK_CS_BIN_8 = 0x04, 45 MSGPACK_CS_BIN_16 = 0x05, 46 MSGPACK_CS_BIN_32 = 0x06, 47 48 MSGPACK_CS_EXT_8 = 0x07, 49 MSGPACK_CS_EXT_16 = 0x08, 50 MSGPACK_CS_EXT_32 = 0x09, 51 52 MSGPACK_CS_FLOAT = 0x0a, 53 MSGPACK_CS_DOUBLE = 0x0b, 54 MSGPACK_CS_UINT_8 = 0x0c, 55 MSGPACK_CS_UINT_16 = 0x0d, 56 MSGPACK_CS_UINT_32 = 0x0e, 57 MSGPACK_CS_UINT_64 = 0x0f, 58 MSGPACK_CS_INT_8 = 0x10, 59 MSGPACK_CS_INT_16 = 0x11, 60 MSGPACK_CS_INT_32 = 0x12, 61 MSGPACK_CS_INT_64 = 0x13, 62 63 MSGPACK_CS_FIXEXT_1 = 0x14, 64 MSGPACK_CS_FIXEXT_2 = 0x15, 65 MSGPACK_CS_FIXEXT_4 = 0x16, 66 MSGPACK_CS_FIXEXT_8 = 0x17, 67 MSGPACK_CS_FIXEXT_16 = 0x18, 68 69 MSGPACK_CS_STR_8 = 0x19, // str8 70 MSGPACK_CS_STR_16 = 0x1a, // str16 71 MSGPACK_CS_STR_32 = 0x1b, // str32 72 MSGPACK_CS_ARRAY_16 = 0x1c, 73 MSGPACK_CS_ARRAY_32 = 0x1d, 74 MSGPACK_CS_MAP_16 = 0x1e, 75 MSGPACK_CS_MAP_32 = 0x1f, 76 77 //MSGPACK_ACS_BIG_INT_VALUE, 78 //MSGPACK_ACS_BIG_FLOAT_VALUE, 79 MSGPACK_ACS_STR_VALUE, 80 MSGPACK_ACS_BIN_VALUE, 81 MSGPACK_ACS_EXT_VALUE 82 } msgpack_unpack_state; 83 84 85 typedef enum { 86 MSGPACK_CT_ARRAY_ITEM, 87 MSGPACK_CT_MAP_KEY, 88 MSGPACK_CT_MAP_VALUE 89 } msgpack_container_type; 90 91 92 #ifdef __cplusplus 93 } 94 #endif 95 96 #endif /* msgpack/unpack_define.h */ 97 98