Jeff Thompson | 47eecfc | 2013-07-07 22:56:46 -0700 | [diff] [blame] | 1 | /** |
Jeff Thompson | 7687dc0 | 2013-09-13 11:54:07 -0700 | [diff] [blame] | 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
Jeff Thompson | 47eecfc | 2013-07-07 22:56:46 -0700 | [diff] [blame] | 4 | * See COPYING for copyright and distribution information. |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef NDN_BINARYXMLDECODER_H |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 8 | #define NDN_BINARYXMLDECODER_H |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 9 | |
Jeff Thompson | 25b4e61 | 2013-10-10 16:03:24 -0700 | [diff] [blame] | 10 | #include <ndn-cpp/c/common.h> |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 11 | #include "../errors.h" |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 12 | #include "../util/blob.h" |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 13 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 14 | #ifdef __cplusplus |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 15 | extern "C" { |
| 16 | #endif |
| 17 | |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 18 | struct ndn_BinaryXmlDecoder { |
Jeff Thompson | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame] | 19 | uint8_t *input; |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 20 | size_t inputLength; |
| 21 | size_t offset; |
Jeff Thompson | 5424ab3 | 2013-12-04 15:51:15 -0800 | [diff] [blame] | 22 | // peekDTag sets and checks these, and readElementStartDTag uses them to avoid reading again. |
| 23 | size_t previouslyPeekedDTagStartOffset; |
| 24 | size_t previouslyPeekedDTagEndOffset; |
| 25 | unsigned int previouslyPeekedDTag; |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 26 | }; |
| 27 | |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 28 | static inline void ndn_BinaryXmlDecoder_initialize(struct ndn_BinaryXmlDecoder *self, uint8_t *input, size_t inputLength) |
Jeff Thompson | 6c9b651 | 2013-06-27 15:59:47 -0700 | [diff] [blame] | 29 | { |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 30 | self->input = input; |
Jeff Thompson | f731669 | 2013-06-26 21:31:42 -0700 | [diff] [blame] | 31 | self->inputLength = inputLength; |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 32 | self->offset = 0; |
Jeff Thompson | 5424ab3 | 2013-12-04 15:51:15 -0800 | [diff] [blame] | 33 | self->previouslyPeekedDTagStartOffset = (size_t)-1; |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Jeff Thompson | 179d050 | 2013-06-28 11:36:00 -0700 | [diff] [blame] | 36 | /** |
| 37 | * Decode the header's type and value from self's input starting at offset. Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 38 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 179d050 | 2013-06-28 11:36:00 -0700 | [diff] [blame] | 39 | * @param type output for the header type |
| 40 | * @param value output for the header value |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 41 | * @return 0 for success, else an error code for read past the end of the input or if the initial byte is zero |
Jeff Thompson | 179d050 | 2013-06-28 11:36:00 -0700 | [diff] [blame] | 42 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 43 | ndn_Error ndn_BinaryXmlDecoder_decodeTypeAndValue(struct ndn_BinaryXmlDecoder *self, unsigned int *type, unsigned int *value); |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 44 | |
Jeff Thompson | f731669 | 2013-06-26 21:31:42 -0700 | [diff] [blame] | 45 | /** |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 46 | * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag. |
| 47 | * Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 48 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 49 | * @param expectedTag the expected value for DTAG |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 50 | * @return 0 for success, else an error code, including an error if not the expected tag |
Jeff Thompson | 179d050 | 2013-06-28 11:36:00 -0700 | [diff] [blame] | 51 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 52 | ndn_Error ndn_BinaryXmlDecoder_readElementStartDTag(struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag); |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * Read one byte from self's input starting at offset, expecting it to be the element close. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 56 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 57 | * @return 0 for success, else an error code, including an error if not the element close |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 58 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 59 | ndn_Error ndn_BinaryXmlDecoder_readElementClose(struct ndn_BinaryXmlDecoder *self); |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Decode the header from self's input starting at offset, and if it is a DTAG where the value is the expectedTag, |
| 63 | * then set gotExpectedTag to 1, else 0. Do not update offset, including if returning an error. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 64 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 65 | * @param expectedTag the expected value for DTAG |
| 66 | * @param gotExpectedTag output a 1 if got the expected tag, else 0 |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 67 | * @return 0 for success, else an error code for read past the end of the input |
Jeff Thompson | 74ab081 | 2013-06-28 12:25:04 -0700 | [diff] [blame] | 68 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 69 | ndn_Error ndn_BinaryXmlDecoder_peekDTag(struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, int *gotExpectedTag); |
Jeff Thompson | 179d050 | 2013-06-28 11:36:00 -0700 | [diff] [blame] | 70 | |
| 71 | /** |
Jeff Thompson | b4ee400 | 2013-06-28 13:41:43 -0700 | [diff] [blame] | 72 | * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag. |
| 73 | * Then read one item of any type (presumably BLOB, UDATA, TAG or ATTR) and return the item's value and length. |
| 74 | * However, if allowNull is 1, then the item may be absent. |
| 75 | * Finally, read the element close. Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 76 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | b4ee400 | 2013-06-28 13:41:43 -0700 | [diff] [blame] | 77 | * @param expectedTag the expected value for DTAG |
| 78 | * @param allowNull 1 if the binary item may be missing |
| 79 | * @param value output a pointer to the binary data inside self's input buffer. However, if allowNull is 1 and the |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 80 | * binary data item is absent, then set value and length to 0. |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 81 | * @return 0 for success, else an error code, including an error if not the expected tag, or if allowNull is 0 |
Jeff Thompson | b4ee400 | 2013-06-28 13:41:43 -0700 | [diff] [blame] | 82 | * and the binary data is absent |
| 83 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 84 | ndn_Error ndn_BinaryXmlDecoder_readBinaryDTagElement |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 85 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, int allowNull, struct ndn_Blob *value); |
Jeff Thompson | 033d7fd | 2013-07-11 10:44:03 -0700 | [diff] [blame] | 86 | |
| 87 | /** |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 88 | * Peek at the next element and if it is the expectedTag, call ndn_BinaryXmlDecoder_readBinaryDTagElement. |
Jeff Thompson | 033d7fd | 2013-07-11 10:44:03 -0700 | [diff] [blame] | 89 | * Otherwise, set value and valueLength to 0. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 90 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 033d7fd | 2013-07-11 10:44:03 -0700 | [diff] [blame] | 91 | * @param expectedTag the expected value for DTAG |
| 92 | * @param allowNull 1 if the binary item may be missing |
| 93 | * @param value output a pointer to the binary data inside self's input buffer. However, if allowNull is 1 and the |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 94 | * binary data item is absent, then set value and length to 0. |
Jeff Thompson | 033d7fd | 2013-07-11 10:44:03 -0700 | [diff] [blame] | 95 | * @return 0 for success, else an error code, including if allowNull is 0 and the binary data is absent |
| 96 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 97 | ndn_Error ndn_BinaryXmlDecoder_readOptionalBinaryDTagElement |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 98 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, int allowNull, struct ndn_Blob *value); |
Jeff Thompson | b4ee400 | 2013-06-28 13:41:43 -0700 | [diff] [blame] | 99 | |
| 100 | /** |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 101 | * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag. |
| 102 | * Then read one item expecting it to be type UDATA, and return the item's value and length. |
| 103 | * Finally, read the element close. Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 104 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 105 | * @param expectedTag the expected value for DTAG |
| 106 | * @param value output a pointer to the binary data inside self's input buffer. |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 107 | * @return 0 for success, else an error code, including an error if not the expected tag, or if the item is not UDATA. |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 108 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 109 | ndn_Error ndn_BinaryXmlDecoder_readUDataDTagElement |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 110 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, struct ndn_Blob *value); |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 111 | |
| 112 | /** |
Jeff Thompson | 57be78e | 2013-08-27 13:40:23 -0700 | [diff] [blame] | 113 | * Peek at the next element and if it is the expectedTag, call ndn_BinaryXmlDecoder_readUDataDTagElement. |
| 114 | * Otherwise, set value and valueLength to 0. |
| 115 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
| 116 | * @param expectedTag the expected value for DTAG |
| 117 | * @param value output a pointer to the binary data inside self's input buffer. However, if allowNull is 1 and the |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 118 | * binary data item is absent, then set value and length to 0. |
Jeff Thompson | 57be78e | 2013-08-27 13:40:23 -0700 | [diff] [blame] | 119 | * @return 0 for success, else an error code. |
| 120 | */ |
| 121 | ndn_Error ndn_BinaryXmlDecoder_readOptionalUDataDTagElement |
Jeff Thompson | 9303453 | 2013-10-08 11:52:43 -0700 | [diff] [blame] | 122 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, struct ndn_Blob *value); |
Jeff Thompson | 57be78e | 2013-08-27 13:40:23 -0700 | [diff] [blame] | 123 | |
| 124 | /** |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 125 | * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag. |
| 126 | * Then read one item expecting it to be type UDATA, parse it as an unsigned decimal integer and return the integer. |
| 127 | * Finally, read the element close. Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 128 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 129 | * @param expectedTag the expected value for DTAG |
| 130 | * @param value output the unsigned integer |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 131 | * @return 0 for success, else an error code, including an error if not the expected tag, or if the item is not UDATA, |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 132 | * or can't parse the integer |
| 133 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 134 | ndn_Error ndn_BinaryXmlDecoder_readUnsignedIntegerDTagElement |
| 135 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, unsigned int *value); |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 136 | |
| 137 | /** |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 138 | * Peek at the next element, and if it has the expectedTag then call ndn_BinaryXmlDecoder_readUnsignedIntegerDTagElement. |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 139 | * Otherwise, set value to -1. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 140 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 141 | * @param expectedTag the expected value for DTAG |
| 142 | * @param value output the unsigned integer cast to int, or -1 if the next element doesn't have expectedTag. |
Jeff Thompson | 8b66600 | 2013-07-08 01:16:26 -0700 | [diff] [blame] | 143 | * @return 0 for success, else an error code, including an error if the item is not UDATA, |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 144 | * or can't parse the integer |
| 145 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 146 | ndn_Error ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement |
| 147 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, int *value); |
Jeff Thompson | 167ca5a | 2013-07-07 20:45:43 -0700 | [diff] [blame] | 148 | |
| 149 | /** |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 150 | * Decode the header from self's input starting at offset, expecting the type to be DTAG and the value to be expectedTag. |
| 151 | * Then read one item, parse it as an unsigned big endian integer in 4096 ticks per second, and convert it to milliseconds. |
| 152 | * Finally, read the element close. Update offset. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 153 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 154 | * @param expectedTag the expected value for DTAG |
Jeff Thompson | e32dc5d | 2013-07-11 17:56:57 -0700 | [diff] [blame] | 155 | * @param milliseconds output the number of milliseconds |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 156 | * @return 0 for success, else an error code, including an error if not the expected tag |
| 157 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 158 | ndn_Error ndn_BinaryXmlDecoder_readTimeMillisecondsDTagElement |
| 159 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, double *milliseconds); |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 160 | |
| 161 | /** |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 162 | * Peek at the next element, and if it has the expectedTag then call ndn_BinaryXmlDecoder_readTimeMillisecondsDTagElement. |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 163 | * Otherwise, set value to -1.0 . |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 164 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 165 | * @param expectedTag the expected value for DTAG |
Jeff Thompson | e32dc5d | 2013-07-11 17:56:57 -0700 | [diff] [blame] | 166 | * @param milliseconds output the number of milliseconds, or -1.0 if the next element doesn't have expectedTag. |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 167 | * @return 0 for success, else an error code |
| 168 | */ |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 169 | ndn_Error ndn_BinaryXmlDecoder_readOptionalTimeMillisecondsDTagElement |
| 170 | (struct ndn_BinaryXmlDecoder *self, unsigned int expectedTag, double *milliseconds); |
Jeff Thompson | 9693d39 | 2013-07-11 14:58:53 -0700 | [diff] [blame] | 171 | |
| 172 | /** |
Jeff Thompson | 5553d99 | 2013-07-11 14:35:45 -0700 | [diff] [blame] | 173 | * Interpret the bytes as an unsigned big endian integer and convert to a double. Don't check for overflow. |
| 174 | * We use a double because it is large enough to represent NDN time (4096 ticks per second since 1970). |
Jeff Thompson | 5abaaca | 2013-07-07 21:16:04 -0700 | [diff] [blame] | 175 | * @param bytes pointer to the array of bytes |
| 176 | * @param bytesLength the length of bytes |
Jeff Thompson | 5553d99 | 2013-07-11 14:35:45 -0700 | [diff] [blame] | 177 | * @return the result |
Jeff Thompson | 5abaaca | 2013-07-07 21:16:04 -0700 | [diff] [blame] | 178 | */ |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 179 | double ndn_BinaryXmlDecoder_unsignedBigEndianToDouble(uint8_t *bytes, size_t bytesLength); |
Jeff Thompson | 5abaaca | 2013-07-07 21:16:04 -0700 | [diff] [blame] | 180 | |
| 181 | /** |
Jeff Thompson | f731669 | 2013-06-26 21:31:42 -0700 | [diff] [blame] | 182 | * Set the offset into the input, used for the next read. |
Jeff Thompson | f0fea00 | 2013-07-30 17:22:42 -0700 | [diff] [blame] | 183 | * @param self pointer to the ndn_BinaryXmlDecoder struct |
Jeff Thompson | f731669 | 2013-06-26 21:31:42 -0700 | [diff] [blame] | 184 | * @param offset the new offset |
| 185 | */ |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 186 | static inline void ndn_BinaryXmlDecoder_seek(struct ndn_BinaryXmlDecoder *self, size_t offset) |
Jeff Thompson | 6c9b651 | 2013-06-27 15:59:47 -0700 | [diff] [blame] | 187 | { |
Jeff Thompson | f731669 | 2013-06-26 21:31:42 -0700 | [diff] [blame] | 188 | self->offset = offset; |
| 189 | } |
| 190 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 191 | #ifdef __cplusplus |
Jeff Thompson | 76317aa | 2013-06-25 19:11:48 -0700 | [diff] [blame] | 192 | } |
| 193 | #endif |
| 194 | |
| 195 | #endif |