[120] | 1 | /** |
---|
| 2 | * Autogenerated by Thrift |
---|
| 3 | * |
---|
| 4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
---|
| 5 | */ |
---|
| 6 | #include "hadoopfs_types.h" |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | const char* ThriftHandle::ascii_fingerprint = "2317B51D4172A111734AAB85F990F7C6"; |
---|
| 11 | const uint8_t ThriftHandle::binary_fingerprint[16] = {0x23,0x17,0xB5,0x1D,0x41,0x72,0xA1,0x11,0x73,0x4A,0xAB,0x85,0xF9,0x90,0xF7,0xC6}; |
---|
| 12 | |
---|
| 13 | uint32_t ThriftHandle::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 14 | |
---|
| 15 | uint32_t xfer = 0; |
---|
| 16 | std::string fname; |
---|
| 17 | facebook::thrift::protocol::TType ftype; |
---|
| 18 | int16_t fid; |
---|
| 19 | |
---|
| 20 | xfer += iprot->readStructBegin(fname); |
---|
| 21 | |
---|
| 22 | using facebook::thrift::protocol::TProtocolException; |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | while (true) |
---|
| 26 | { |
---|
| 27 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 28 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 29 | break; |
---|
| 30 | } |
---|
| 31 | switch (fid) |
---|
| 32 | { |
---|
| 33 | case -1: |
---|
| 34 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 35 | xfer += iprot->readI64(this->id); |
---|
| 36 | this->__isset.id = true; |
---|
| 37 | } else { |
---|
| 38 | xfer += iprot->skip(ftype); |
---|
| 39 | } |
---|
| 40 | break; |
---|
| 41 | default: |
---|
| 42 | xfer += iprot->skip(ftype); |
---|
| 43 | break; |
---|
| 44 | } |
---|
| 45 | xfer += iprot->readFieldEnd(); |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | xfer += iprot->readStructEnd(); |
---|
| 49 | |
---|
| 50 | return xfer; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | uint32_t ThriftHandle::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 54 | uint32_t xfer = 0; |
---|
| 55 | xfer += oprot->writeStructBegin("ThriftHandle"); |
---|
| 56 | xfer += oprot->writeFieldBegin("id", facebook::thrift::protocol::T_I64, -1); |
---|
| 57 | xfer += oprot->writeI64(this->id); |
---|
| 58 | xfer += oprot->writeFieldEnd(); |
---|
| 59 | xfer += oprot->writeFieldStop(); |
---|
| 60 | xfer += oprot->writeStructEnd(); |
---|
| 61 | return xfer; |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | const char* Pathname::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D"; |
---|
| 65 | const uint8_t Pathname::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D}; |
---|
| 66 | |
---|
| 67 | uint32_t Pathname::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 68 | |
---|
| 69 | uint32_t xfer = 0; |
---|
| 70 | std::string fname; |
---|
| 71 | facebook::thrift::protocol::TType ftype; |
---|
| 72 | int16_t fid; |
---|
| 73 | |
---|
| 74 | xfer += iprot->readStructBegin(fname); |
---|
| 75 | |
---|
| 76 | using facebook::thrift::protocol::TProtocolException; |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | while (true) |
---|
| 80 | { |
---|
| 81 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 82 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 83 | break; |
---|
| 84 | } |
---|
| 85 | switch (fid) |
---|
| 86 | { |
---|
| 87 | case -1: |
---|
| 88 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 89 | xfer += iprot->readString(this->pathname); |
---|
| 90 | this->__isset.pathname = true; |
---|
| 91 | } else { |
---|
| 92 | xfer += iprot->skip(ftype); |
---|
| 93 | } |
---|
| 94 | break; |
---|
| 95 | default: |
---|
| 96 | xfer += iprot->skip(ftype); |
---|
| 97 | break; |
---|
| 98 | } |
---|
| 99 | xfer += iprot->readFieldEnd(); |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | xfer += iprot->readStructEnd(); |
---|
| 103 | |
---|
| 104 | return xfer; |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | uint32_t Pathname::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 108 | uint32_t xfer = 0; |
---|
| 109 | xfer += oprot->writeStructBegin("Pathname"); |
---|
| 110 | xfer += oprot->writeFieldBegin("pathname", facebook::thrift::protocol::T_STRING, -1); |
---|
| 111 | xfer += oprot->writeString(this->pathname); |
---|
| 112 | xfer += oprot->writeFieldEnd(); |
---|
| 113 | xfer += oprot->writeFieldStop(); |
---|
| 114 | xfer += oprot->writeStructEnd(); |
---|
| 115 | return xfer; |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | const char* FileStatus::ascii_fingerprint = "68FE7242A6727149B291A86FB9570D2B"; |
---|
| 119 | const uint8_t FileStatus::binary_fingerprint[16] = {0x68,0xFE,0x72,0x42,0xA6,0x72,0x71,0x49,0xB2,0x91,0xA8,0x6F,0xB9,0x57,0x0D,0x2B}; |
---|
| 120 | |
---|
| 121 | uint32_t FileStatus::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 122 | |
---|
| 123 | uint32_t xfer = 0; |
---|
| 124 | std::string fname; |
---|
| 125 | facebook::thrift::protocol::TType ftype; |
---|
| 126 | int16_t fid; |
---|
| 127 | |
---|
| 128 | xfer += iprot->readStructBegin(fname); |
---|
| 129 | |
---|
| 130 | using facebook::thrift::protocol::TProtocolException; |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | while (true) |
---|
| 134 | { |
---|
| 135 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 136 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 137 | break; |
---|
| 138 | } |
---|
| 139 | switch (fid) |
---|
| 140 | { |
---|
| 141 | case 1: |
---|
| 142 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 143 | xfer += iprot->readString(this->path); |
---|
| 144 | this->__isset.path = true; |
---|
| 145 | } else { |
---|
| 146 | xfer += iprot->skip(ftype); |
---|
| 147 | } |
---|
| 148 | break; |
---|
| 149 | case 2: |
---|
| 150 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 151 | xfer += iprot->readI64(this->length); |
---|
| 152 | this->__isset.length = true; |
---|
| 153 | } else { |
---|
| 154 | xfer += iprot->skip(ftype); |
---|
| 155 | } |
---|
| 156 | break; |
---|
| 157 | case 3: |
---|
| 158 | if (ftype == facebook::thrift::protocol::T_BOOL) { |
---|
| 159 | xfer += iprot->readBool(this->isdir); |
---|
| 160 | this->__isset.isdir = true; |
---|
| 161 | } else { |
---|
| 162 | xfer += iprot->skip(ftype); |
---|
| 163 | } |
---|
| 164 | break; |
---|
| 165 | case 4: |
---|
| 166 | if (ftype == facebook::thrift::protocol::T_I16) { |
---|
| 167 | xfer += iprot->readI16(this->block_replication); |
---|
| 168 | this->__isset.block_replication = true; |
---|
| 169 | } else { |
---|
| 170 | xfer += iprot->skip(ftype); |
---|
| 171 | } |
---|
| 172 | break; |
---|
| 173 | case 5: |
---|
| 174 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 175 | xfer += iprot->readI64(this->blocksize); |
---|
| 176 | this->__isset.blocksize = true; |
---|
| 177 | } else { |
---|
| 178 | xfer += iprot->skip(ftype); |
---|
| 179 | } |
---|
| 180 | break; |
---|
| 181 | case 6: |
---|
| 182 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 183 | xfer += iprot->readI64(this->modification_time); |
---|
| 184 | this->__isset.modification_time = true; |
---|
| 185 | } else { |
---|
| 186 | xfer += iprot->skip(ftype); |
---|
| 187 | } |
---|
| 188 | break; |
---|
| 189 | case 7: |
---|
| 190 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 191 | xfer += iprot->readString(this->permission); |
---|
| 192 | this->__isset.permission = true; |
---|
| 193 | } else { |
---|
| 194 | xfer += iprot->skip(ftype); |
---|
| 195 | } |
---|
| 196 | break; |
---|
| 197 | case 8: |
---|
| 198 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 199 | xfer += iprot->readString(this->owner); |
---|
| 200 | this->__isset.owner = true; |
---|
| 201 | } else { |
---|
| 202 | xfer += iprot->skip(ftype); |
---|
| 203 | } |
---|
| 204 | break; |
---|
| 205 | case 9: |
---|
| 206 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 207 | xfer += iprot->readString(this->group); |
---|
| 208 | this->__isset.group = true; |
---|
| 209 | } else { |
---|
| 210 | xfer += iprot->skip(ftype); |
---|
| 211 | } |
---|
| 212 | break; |
---|
| 213 | default: |
---|
| 214 | xfer += iprot->skip(ftype); |
---|
| 215 | break; |
---|
| 216 | } |
---|
| 217 | xfer += iprot->readFieldEnd(); |
---|
| 218 | } |
---|
| 219 | |
---|
| 220 | xfer += iprot->readStructEnd(); |
---|
| 221 | |
---|
| 222 | return xfer; |
---|
| 223 | } |
---|
| 224 | |
---|
| 225 | uint32_t FileStatus::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 226 | uint32_t xfer = 0; |
---|
| 227 | xfer += oprot->writeStructBegin("FileStatus"); |
---|
| 228 | xfer += oprot->writeFieldBegin("path", facebook::thrift::protocol::T_STRING, 1); |
---|
| 229 | xfer += oprot->writeString(this->path); |
---|
| 230 | xfer += oprot->writeFieldEnd(); |
---|
| 231 | xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 2); |
---|
| 232 | xfer += oprot->writeI64(this->length); |
---|
| 233 | xfer += oprot->writeFieldEnd(); |
---|
| 234 | xfer += oprot->writeFieldBegin("isdir", facebook::thrift::protocol::T_BOOL, 3); |
---|
| 235 | xfer += oprot->writeBool(this->isdir); |
---|
| 236 | xfer += oprot->writeFieldEnd(); |
---|
| 237 | xfer += oprot->writeFieldBegin("block_replication", facebook::thrift::protocol::T_I16, 4); |
---|
| 238 | xfer += oprot->writeI16(this->block_replication); |
---|
| 239 | xfer += oprot->writeFieldEnd(); |
---|
| 240 | xfer += oprot->writeFieldBegin("blocksize", facebook::thrift::protocol::T_I64, 5); |
---|
| 241 | xfer += oprot->writeI64(this->blocksize); |
---|
| 242 | xfer += oprot->writeFieldEnd(); |
---|
| 243 | xfer += oprot->writeFieldBegin("modification_time", facebook::thrift::protocol::T_I64, 6); |
---|
| 244 | xfer += oprot->writeI64(this->modification_time); |
---|
| 245 | xfer += oprot->writeFieldEnd(); |
---|
| 246 | xfer += oprot->writeFieldBegin("permission", facebook::thrift::protocol::T_STRING, 7); |
---|
| 247 | xfer += oprot->writeString(this->permission); |
---|
| 248 | xfer += oprot->writeFieldEnd(); |
---|
| 249 | xfer += oprot->writeFieldBegin("owner", facebook::thrift::protocol::T_STRING, 8); |
---|
| 250 | xfer += oprot->writeString(this->owner); |
---|
| 251 | xfer += oprot->writeFieldEnd(); |
---|
| 252 | xfer += oprot->writeFieldBegin("group", facebook::thrift::protocol::T_STRING, 9); |
---|
| 253 | xfer += oprot->writeString(this->group); |
---|
| 254 | xfer += oprot->writeFieldEnd(); |
---|
| 255 | xfer += oprot->writeFieldStop(); |
---|
| 256 | xfer += oprot->writeStructEnd(); |
---|
| 257 | return xfer; |
---|
| 258 | } |
---|
| 259 | |
---|
| 260 | const char* BlockLocation::ascii_fingerprint = "8BF3B16BED96367B21783389BDF8B1C0"; |
---|
| 261 | const uint8_t BlockLocation::binary_fingerprint[16] = {0x8B,0xF3,0xB1,0x6B,0xED,0x96,0x36,0x7B,0x21,0x78,0x33,0x89,0xBD,0xF8,0xB1,0xC0}; |
---|
| 262 | |
---|
| 263 | uint32_t BlockLocation::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 264 | |
---|
| 265 | uint32_t xfer = 0; |
---|
| 266 | std::string fname; |
---|
| 267 | facebook::thrift::protocol::TType ftype; |
---|
| 268 | int16_t fid; |
---|
| 269 | |
---|
| 270 | xfer += iprot->readStructBegin(fname); |
---|
| 271 | |
---|
| 272 | using facebook::thrift::protocol::TProtocolException; |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | while (true) |
---|
| 276 | { |
---|
| 277 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 278 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 279 | break; |
---|
| 280 | } |
---|
| 281 | switch (fid) |
---|
| 282 | { |
---|
| 283 | case 1: |
---|
| 284 | if (ftype == facebook::thrift::protocol::T_LIST) { |
---|
| 285 | { |
---|
| 286 | this->hosts.clear(); |
---|
| 287 | uint32_t _size0; |
---|
| 288 | facebook::thrift::protocol::TType _etype3; |
---|
| 289 | iprot->readListBegin(_etype3, _size0); |
---|
| 290 | this->hosts.resize(_size0); |
---|
| 291 | uint32_t _i4; |
---|
| 292 | for (_i4 = 0; _i4 < _size0; ++_i4) |
---|
| 293 | { |
---|
| 294 | xfer += iprot->readString(this->hosts[_i4]); |
---|
| 295 | } |
---|
| 296 | iprot->readListEnd(); |
---|
| 297 | } |
---|
| 298 | this->__isset.hosts = true; |
---|
| 299 | } else { |
---|
| 300 | xfer += iprot->skip(ftype); |
---|
| 301 | } |
---|
| 302 | break; |
---|
| 303 | case 2: |
---|
| 304 | if (ftype == facebook::thrift::protocol::T_LIST) { |
---|
| 305 | { |
---|
| 306 | this->names.clear(); |
---|
| 307 | uint32_t _size5; |
---|
| 308 | facebook::thrift::protocol::TType _etype8; |
---|
| 309 | iprot->readListBegin(_etype8, _size5); |
---|
| 310 | this->names.resize(_size5); |
---|
| 311 | uint32_t _i9; |
---|
| 312 | for (_i9 = 0; _i9 < _size5; ++_i9) |
---|
| 313 | { |
---|
| 314 | xfer += iprot->readString(this->names[_i9]); |
---|
| 315 | } |
---|
| 316 | iprot->readListEnd(); |
---|
| 317 | } |
---|
| 318 | this->__isset.names = true; |
---|
| 319 | } else { |
---|
| 320 | xfer += iprot->skip(ftype); |
---|
| 321 | } |
---|
| 322 | break; |
---|
| 323 | case 3: |
---|
| 324 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 325 | xfer += iprot->readI64(this->offset); |
---|
| 326 | this->__isset.offset = true; |
---|
| 327 | } else { |
---|
| 328 | xfer += iprot->skip(ftype); |
---|
| 329 | } |
---|
| 330 | break; |
---|
| 331 | case 4: |
---|
| 332 | if (ftype == facebook::thrift::protocol::T_I64) { |
---|
| 333 | xfer += iprot->readI64(this->length); |
---|
| 334 | this->__isset.length = true; |
---|
| 335 | } else { |
---|
| 336 | xfer += iprot->skip(ftype); |
---|
| 337 | } |
---|
| 338 | break; |
---|
| 339 | default: |
---|
| 340 | xfer += iprot->skip(ftype); |
---|
| 341 | break; |
---|
| 342 | } |
---|
| 343 | xfer += iprot->readFieldEnd(); |
---|
| 344 | } |
---|
| 345 | |
---|
| 346 | xfer += iprot->readStructEnd(); |
---|
| 347 | |
---|
| 348 | return xfer; |
---|
| 349 | } |
---|
| 350 | |
---|
| 351 | uint32_t BlockLocation::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 352 | uint32_t xfer = 0; |
---|
| 353 | xfer += oprot->writeStructBegin("BlockLocation"); |
---|
| 354 | xfer += oprot->writeFieldBegin("hosts", facebook::thrift::protocol::T_LIST, 1); |
---|
| 355 | { |
---|
| 356 | xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRING, this->hosts.size()); |
---|
| 357 | std::vector<std::string> ::const_iterator _iter10; |
---|
| 358 | for (_iter10 = this->hosts.begin(); _iter10 != this->hosts.end(); ++_iter10) |
---|
| 359 | { |
---|
| 360 | xfer += oprot->writeString((*_iter10)); |
---|
| 361 | } |
---|
| 362 | xfer += oprot->writeListEnd(); |
---|
| 363 | } |
---|
| 364 | xfer += oprot->writeFieldEnd(); |
---|
| 365 | xfer += oprot->writeFieldBegin("names", facebook::thrift::protocol::T_LIST, 2); |
---|
| 366 | { |
---|
| 367 | xfer += oprot->writeListBegin(facebook::thrift::protocol::T_STRING, this->names.size()); |
---|
| 368 | std::vector<std::string> ::const_iterator _iter11; |
---|
| 369 | for (_iter11 = this->names.begin(); _iter11 != this->names.end(); ++_iter11) |
---|
| 370 | { |
---|
| 371 | xfer += oprot->writeString((*_iter11)); |
---|
| 372 | } |
---|
| 373 | xfer += oprot->writeListEnd(); |
---|
| 374 | } |
---|
| 375 | xfer += oprot->writeFieldEnd(); |
---|
| 376 | xfer += oprot->writeFieldBegin("offset", facebook::thrift::protocol::T_I64, 3); |
---|
| 377 | xfer += oprot->writeI64(this->offset); |
---|
| 378 | xfer += oprot->writeFieldEnd(); |
---|
| 379 | xfer += oprot->writeFieldBegin("length", facebook::thrift::protocol::T_I64, 4); |
---|
| 380 | xfer += oprot->writeI64(this->length); |
---|
| 381 | xfer += oprot->writeFieldEnd(); |
---|
| 382 | xfer += oprot->writeFieldStop(); |
---|
| 383 | xfer += oprot->writeStructEnd(); |
---|
| 384 | return xfer; |
---|
| 385 | } |
---|
| 386 | |
---|
| 387 | const char* MalformedInputException::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D"; |
---|
| 388 | const uint8_t MalformedInputException::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D}; |
---|
| 389 | |
---|
| 390 | uint32_t MalformedInputException::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 391 | |
---|
| 392 | uint32_t xfer = 0; |
---|
| 393 | std::string fname; |
---|
| 394 | facebook::thrift::protocol::TType ftype; |
---|
| 395 | int16_t fid; |
---|
| 396 | |
---|
| 397 | xfer += iprot->readStructBegin(fname); |
---|
| 398 | |
---|
| 399 | using facebook::thrift::protocol::TProtocolException; |
---|
| 400 | |
---|
| 401 | |
---|
| 402 | while (true) |
---|
| 403 | { |
---|
| 404 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 405 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 406 | break; |
---|
| 407 | } |
---|
| 408 | switch (fid) |
---|
| 409 | { |
---|
| 410 | case -1: |
---|
| 411 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 412 | xfer += iprot->readString(this->message); |
---|
| 413 | this->__isset.message = true; |
---|
| 414 | } else { |
---|
| 415 | xfer += iprot->skip(ftype); |
---|
| 416 | } |
---|
| 417 | break; |
---|
| 418 | default: |
---|
| 419 | xfer += iprot->skip(ftype); |
---|
| 420 | break; |
---|
| 421 | } |
---|
| 422 | xfer += iprot->readFieldEnd(); |
---|
| 423 | } |
---|
| 424 | |
---|
| 425 | xfer += iprot->readStructEnd(); |
---|
| 426 | |
---|
| 427 | return xfer; |
---|
| 428 | } |
---|
| 429 | |
---|
| 430 | uint32_t MalformedInputException::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 431 | uint32_t xfer = 0; |
---|
| 432 | xfer += oprot->writeStructBegin("MalformedInputException"); |
---|
| 433 | xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, -1); |
---|
| 434 | xfer += oprot->writeString(this->message); |
---|
| 435 | xfer += oprot->writeFieldEnd(); |
---|
| 436 | xfer += oprot->writeFieldStop(); |
---|
| 437 | xfer += oprot->writeStructEnd(); |
---|
| 438 | return xfer; |
---|
| 439 | } |
---|
| 440 | |
---|
| 441 | const char* ThriftIOException::ascii_fingerprint = "E2167DA91A8F7459A2FE1B5F56D14B5D"; |
---|
| 442 | const uint8_t ThriftIOException::binary_fingerprint[16] = {0xE2,0x16,0x7D,0xA9,0x1A,0x8F,0x74,0x59,0xA2,0xFE,0x1B,0x5F,0x56,0xD1,0x4B,0x5D}; |
---|
| 443 | |
---|
| 444 | uint32_t ThriftIOException::read(facebook::thrift::protocol::TProtocol* iprot) { |
---|
| 445 | |
---|
| 446 | uint32_t xfer = 0; |
---|
| 447 | std::string fname; |
---|
| 448 | facebook::thrift::protocol::TType ftype; |
---|
| 449 | int16_t fid; |
---|
| 450 | |
---|
| 451 | xfer += iprot->readStructBegin(fname); |
---|
| 452 | |
---|
| 453 | using facebook::thrift::protocol::TProtocolException; |
---|
| 454 | |
---|
| 455 | |
---|
| 456 | while (true) |
---|
| 457 | { |
---|
| 458 | xfer += iprot->readFieldBegin(fname, ftype, fid); |
---|
| 459 | if (ftype == facebook::thrift::protocol::T_STOP) { |
---|
| 460 | break; |
---|
| 461 | } |
---|
| 462 | switch (fid) |
---|
| 463 | { |
---|
| 464 | case -1: |
---|
| 465 | if (ftype == facebook::thrift::protocol::T_STRING) { |
---|
| 466 | xfer += iprot->readString(this->message); |
---|
| 467 | this->__isset.message = true; |
---|
| 468 | } else { |
---|
| 469 | xfer += iprot->skip(ftype); |
---|
| 470 | } |
---|
| 471 | break; |
---|
| 472 | default: |
---|
| 473 | xfer += iprot->skip(ftype); |
---|
| 474 | break; |
---|
| 475 | } |
---|
| 476 | xfer += iprot->readFieldEnd(); |
---|
| 477 | } |
---|
| 478 | |
---|
| 479 | xfer += iprot->readStructEnd(); |
---|
| 480 | |
---|
| 481 | return xfer; |
---|
| 482 | } |
---|
| 483 | |
---|
| 484 | uint32_t ThriftIOException::write(facebook::thrift::protocol::TProtocol* oprot) const { |
---|
| 485 | uint32_t xfer = 0; |
---|
| 486 | xfer += oprot->writeStructBegin("ThriftIOException"); |
---|
| 487 | xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, -1); |
---|
| 488 | xfer += oprot->writeString(this->message); |
---|
| 489 | xfer += oprot->writeFieldEnd(); |
---|
| 490 | xfer += oprot->writeFieldStop(); |
---|
| 491 | xfer += oprot->writeStructEnd(); |
---|
| 492 | return xfer; |
---|
| 493 | } |
---|
| 494 | |
---|
| 495 | |
---|