Overview

Packages

  • None
  • thrift
    • transport

Classes

  • Argument
  • ContainerType
  • FacebookBase
  • FacebookService_aliveSince_args
  • FacebookService_aliveSince_result
  • FacebookService_getCounter_args
  • FacebookService_getCounter_result
  • FacebookService_getCounters_args
  • FacebookService_getCounters_result
  • FacebookService_getCpuProfile_args
  • FacebookService_getCpuProfile_result
  • FacebookService_getLimitedReflection_args
  • FacebookService_getLimitedReflection_result
  • FacebookService_getName_args
  • FacebookService_getName_result
  • FacebookService_getOption_args
  • FacebookService_getOption_result
  • FacebookService_getOptions_args
  • FacebookService_getOptions_result
  • FacebookService_getStatus_args
  • FacebookService_getStatus_result
  • FacebookService_getStatusDetails_args
  • FacebookService_getStatusDetails_result
  • FacebookService_getVersion_args
  • FacebookService_getVersion_result
  • FacebookService_reinitialize_args
  • FacebookService_setOption_args
  • FacebookService_setOption_result
  • FacebookService_shutdown_args
  • FacebookServiceClient
  • FacebookServiceProcessor
  • fb_status
  • Method
  • Service
  • SimpleType
  • TBase
  • TBinaryProtocol
  • TBinaryProtocolAccelerated
  • TBinaryProtocolFactory
  • ThriftType
  • TMessageType
  • TProtocol
  • TType
  • TTypeTag

Interfaces

  • FacebookServiceIf
  • Horde_Thrift
  • TProtocolFactory

Exceptions

  • TApplicationException
  • TException
  • TProtocolException
  • TTransportException

Functions

  • apc_fetch
  • apc_store
  • Overview
  • Package
  • Class
  • Tree
   1: <?php
   2: /**
   3:  * Autogenerated by Thrift
   4:  *
   5:  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
   6:  */
   7: include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
   8: 
   9: include_once $GLOBALS['THRIFT_ROOT'].'/packages/fb303/fb303_types.php';
  10: 
  11: interface FacebookServiceIf {
  12:   public function getName();
  13:   public function getVersion();
  14:   public function getStatus();
  15:   public function getStatusDetails();
  16:   public function getCounters();
  17:   public function getCounter($key);
  18:   public function setOption($key, $value);
  19:   public function getOption($key);
  20:   public function getOptions();
  21:   public function getCpuProfile($profileDurationInSec);
  22:   public function aliveSince();
  23:   public function getLimitedReflection();
  24:   public function reinitialize();
  25:   public function shutdown();
  26: }
  27: 
  28: class FacebookServiceClient implements FacebookServiceIf {
  29:   protected $input_ = null;
  30:   protected $output_ = null;
  31: 
  32:   protected $seqid_ = 0;
  33: 
  34:   public function __construct($input, $output=null) {
  35:     $this->input_ = $input;
  36:     $this->output_ = $output ? $output : $input;
  37:   }
  38: 
  39:   public function getName()
  40:   {
  41:     $this->send_getName();
  42:     return $this->recv_getName();
  43:   }
  44: 
  45:   public function send_getName()
  46:   {
  47:     $args = new FacebookService_getName_args();
  48:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  49:     if ($bin_accel)
  50:     {
  51:       thrift_protocol_write_binary($this->output_, 'getName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  52:     }
  53:     else
  54:     {
  55:       $this->output_->writeMessageBegin('getName', TMessageType::CALL, $this->seqid_);
  56:       $args->write($this->output_);
  57:       $this->output_->writeMessageEnd();
  58:       $this->output_->getTransport()->flush();
  59:     }
  60:   }
  61: 
  62:   public function recv_getName()
  63:   {
  64:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
  65:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getName_result', $this->input_->isStrictRead());
  66:     else
  67:     {
  68:       $rseqid = 0;
  69:       $fname = null;
  70:       $mtype = 0;
  71: 
  72:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  73:       if ($mtype == TMessageType::EXCEPTION) {
  74:         $x = new TApplicationException();
  75:         $x->read($this->input_);
  76:         $this->input_->readMessageEnd();
  77:         throw $x;
  78:       }
  79:       $result = new FacebookService_getName_result();
  80:       $result->read($this->input_);
  81:       $this->input_->readMessageEnd();
  82:     }
  83:     if ($result->success !== null) {
  84:       return $result->success;
  85:     }
  86:     throw new Exception("getName failed: unknown result");
  87:   }
  88: 
  89:   public function getVersion()
  90:   {
  91:     $this->send_getVersion();
  92:     return $this->recv_getVersion();
  93:   }
  94: 
  95:   public function send_getVersion()
  96:   {
  97:     $args = new FacebookService_getVersion_args();
  98:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
  99:     if ($bin_accel)
 100:     {
 101:       thrift_protocol_write_binary($this->output_, 'getVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 102:     }
 103:     else
 104:     {
 105:       $this->output_->writeMessageBegin('getVersion', TMessageType::CALL, $this->seqid_);
 106:       $args->write($this->output_);
 107:       $this->output_->writeMessageEnd();
 108:       $this->output_->getTransport()->flush();
 109:     }
 110:   }
 111: 
 112:   public function recv_getVersion()
 113:   {
 114:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 115:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getVersion_result', $this->input_->isStrictRead());
 116:     else
 117:     {
 118:       $rseqid = 0;
 119:       $fname = null;
 120:       $mtype = 0;
 121: 
 122:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 123:       if ($mtype == TMessageType::EXCEPTION) {
 124:         $x = new TApplicationException();
 125:         $x->read($this->input_);
 126:         $this->input_->readMessageEnd();
 127:         throw $x;
 128:       }
 129:       $result = new FacebookService_getVersion_result();
 130:       $result->read($this->input_);
 131:       $this->input_->readMessageEnd();
 132:     }
 133:     if ($result->success !== null) {
 134:       return $result->success;
 135:     }
 136:     throw new Exception("getVersion failed: unknown result");
 137:   }
 138: 
 139:   public function getStatus()
 140:   {
 141:     $this->send_getStatus();
 142:     return $this->recv_getStatus();
 143:   }
 144: 
 145:   public function send_getStatus()
 146:   {
 147:     $args = new FacebookService_getStatus_args();
 148:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 149:     if ($bin_accel)
 150:     {
 151:       thrift_protocol_write_binary($this->output_, 'getStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 152:     }
 153:     else
 154:     {
 155:       $this->output_->writeMessageBegin('getStatus', TMessageType::CALL, $this->seqid_);
 156:       $args->write($this->output_);
 157:       $this->output_->writeMessageEnd();
 158:       $this->output_->getTransport()->flush();
 159:     }
 160:   }
 161: 
 162:   public function recv_getStatus()
 163:   {
 164:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 165:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getStatus_result', $this->input_->isStrictRead());
 166:     else
 167:     {
 168:       $rseqid = 0;
 169:       $fname = null;
 170:       $mtype = 0;
 171: 
 172:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 173:       if ($mtype == TMessageType::EXCEPTION) {
 174:         $x = new TApplicationException();
 175:         $x->read($this->input_);
 176:         $this->input_->readMessageEnd();
 177:         throw $x;
 178:       }
 179:       $result = new FacebookService_getStatus_result();
 180:       $result->read($this->input_);
 181:       $this->input_->readMessageEnd();
 182:     }
 183:     if ($result->success !== null) {
 184:       return $result->success;
 185:     }
 186:     throw new Exception("getStatus failed: unknown result");
 187:   }
 188: 
 189:   public function getStatusDetails()
 190:   {
 191:     $this->send_getStatusDetails();
 192:     return $this->recv_getStatusDetails();
 193:   }
 194: 
 195:   public function send_getStatusDetails()
 196:   {
 197:     $args = new FacebookService_getStatusDetails_args();
 198:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 199:     if ($bin_accel)
 200:     {
 201:       thrift_protocol_write_binary($this->output_, 'getStatusDetails', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 202:     }
 203:     else
 204:     {
 205:       $this->output_->writeMessageBegin('getStatusDetails', TMessageType::CALL, $this->seqid_);
 206:       $args->write($this->output_);
 207:       $this->output_->writeMessageEnd();
 208:       $this->output_->getTransport()->flush();
 209:     }
 210:   }
 211: 
 212:   public function recv_getStatusDetails()
 213:   {
 214:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 215:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getStatusDetails_result', $this->input_->isStrictRead());
 216:     else
 217:     {
 218:       $rseqid = 0;
 219:       $fname = null;
 220:       $mtype = 0;
 221: 
 222:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 223:       if ($mtype == TMessageType::EXCEPTION) {
 224:         $x = new TApplicationException();
 225:         $x->read($this->input_);
 226:         $this->input_->readMessageEnd();
 227:         throw $x;
 228:       }
 229:       $result = new FacebookService_getStatusDetails_result();
 230:       $result->read($this->input_);
 231:       $this->input_->readMessageEnd();
 232:     }
 233:     if ($result->success !== null) {
 234:       return $result->success;
 235:     }
 236:     throw new Exception("getStatusDetails failed: unknown result");
 237:   }
 238: 
 239:   public function getCounters()
 240:   {
 241:     $this->send_getCounters();
 242:     return $this->recv_getCounters();
 243:   }
 244: 
 245:   public function send_getCounters()
 246:   {
 247:     $args = new FacebookService_getCounters_args();
 248:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 249:     if ($bin_accel)
 250:     {
 251:       thrift_protocol_write_binary($this->output_, 'getCounters', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 252:     }
 253:     else
 254:     {
 255:       $this->output_->writeMessageBegin('getCounters', TMessageType::CALL, $this->seqid_);
 256:       $args->write($this->output_);
 257:       $this->output_->writeMessageEnd();
 258:       $this->output_->getTransport()->flush();
 259:     }
 260:   }
 261: 
 262:   public function recv_getCounters()
 263:   {
 264:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 265:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getCounters_result', $this->input_->isStrictRead());
 266:     else
 267:     {
 268:       $rseqid = 0;
 269:       $fname = null;
 270:       $mtype = 0;
 271: 
 272:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 273:       if ($mtype == TMessageType::EXCEPTION) {
 274:         $x = new TApplicationException();
 275:         $x->read($this->input_);
 276:         $this->input_->readMessageEnd();
 277:         throw $x;
 278:       }
 279:       $result = new FacebookService_getCounters_result();
 280:       $result->read($this->input_);
 281:       $this->input_->readMessageEnd();
 282:     }
 283:     if ($result->success !== null) {
 284:       return $result->success;
 285:     }
 286:     throw new Exception("getCounters failed: unknown result");
 287:   }
 288: 
 289:   public function getCounter($key)
 290:   {
 291:     $this->send_getCounter($key);
 292:     return $this->recv_getCounter();
 293:   }
 294: 
 295:   public function send_getCounter($key)
 296:   {
 297:     $args = new FacebookService_getCounter_args();
 298:     $args->key = $key;
 299:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 300:     if ($bin_accel)
 301:     {
 302:       thrift_protocol_write_binary($this->output_, 'getCounter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 303:     }
 304:     else
 305:     {
 306:       $this->output_->writeMessageBegin('getCounter', TMessageType::CALL, $this->seqid_);
 307:       $args->write($this->output_);
 308:       $this->output_->writeMessageEnd();
 309:       $this->output_->getTransport()->flush();
 310:     }
 311:   }
 312: 
 313:   public function recv_getCounter()
 314:   {
 315:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 316:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getCounter_result', $this->input_->isStrictRead());
 317:     else
 318:     {
 319:       $rseqid = 0;
 320:       $fname = null;
 321:       $mtype = 0;
 322: 
 323:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 324:       if ($mtype == TMessageType::EXCEPTION) {
 325:         $x = new TApplicationException();
 326:         $x->read($this->input_);
 327:         $this->input_->readMessageEnd();
 328:         throw $x;
 329:       }
 330:       $result = new FacebookService_getCounter_result();
 331:       $result->read($this->input_);
 332:       $this->input_->readMessageEnd();
 333:     }
 334:     if ($result->success !== null) {
 335:       return $result->success;
 336:     }
 337:     throw new Exception("getCounter failed: unknown result");
 338:   }
 339: 
 340:   public function setOption($key, $value)
 341:   {
 342:     $this->send_setOption($key, $value);
 343:     $this->recv_setOption();
 344:   }
 345: 
 346:   public function send_setOption($key, $value)
 347:   {
 348:     $args = new FacebookService_setOption_args();
 349:     $args->key = $key;
 350:     $args->value = $value;
 351:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 352:     if ($bin_accel)
 353:     {
 354:       thrift_protocol_write_binary($this->output_, 'setOption', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 355:     }
 356:     else
 357:     {
 358:       $this->output_->writeMessageBegin('setOption', TMessageType::CALL, $this->seqid_);
 359:       $args->write($this->output_);
 360:       $this->output_->writeMessageEnd();
 361:       $this->output_->getTransport()->flush();
 362:     }
 363:   }
 364: 
 365:   public function recv_setOption()
 366:   {
 367:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 368:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_setOption_result', $this->input_->isStrictRead());
 369:     else
 370:     {
 371:       $rseqid = 0;
 372:       $fname = null;
 373:       $mtype = 0;
 374: 
 375:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 376:       if ($mtype == TMessageType::EXCEPTION) {
 377:         $x = new TApplicationException();
 378:         $x->read($this->input_);
 379:         $this->input_->readMessageEnd();
 380:         throw $x;
 381:       }
 382:       $result = new FacebookService_setOption_result();
 383:       $result->read($this->input_);
 384:       $this->input_->readMessageEnd();
 385:     }
 386:     return;
 387:   }
 388: 
 389:   public function getOption($key)
 390:   {
 391:     $this->send_getOption($key);
 392:     return $this->recv_getOption();
 393:   }
 394: 
 395:   public function send_getOption($key)
 396:   {
 397:     $args = new FacebookService_getOption_args();
 398:     $args->key = $key;
 399:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 400:     if ($bin_accel)
 401:     {
 402:       thrift_protocol_write_binary($this->output_, 'getOption', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 403:     }
 404:     else
 405:     {
 406:       $this->output_->writeMessageBegin('getOption', TMessageType::CALL, $this->seqid_);
 407:       $args->write($this->output_);
 408:       $this->output_->writeMessageEnd();
 409:       $this->output_->getTransport()->flush();
 410:     }
 411:   }
 412: 
 413:   public function recv_getOption()
 414:   {
 415:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 416:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getOption_result', $this->input_->isStrictRead());
 417:     else
 418:     {
 419:       $rseqid = 0;
 420:       $fname = null;
 421:       $mtype = 0;
 422: 
 423:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 424:       if ($mtype == TMessageType::EXCEPTION) {
 425:         $x = new TApplicationException();
 426:         $x->read($this->input_);
 427:         $this->input_->readMessageEnd();
 428:         throw $x;
 429:       }
 430:       $result = new FacebookService_getOption_result();
 431:       $result->read($this->input_);
 432:       $this->input_->readMessageEnd();
 433:     }
 434:     if ($result->success !== null) {
 435:       return $result->success;
 436:     }
 437:     throw new Exception("getOption failed: unknown result");
 438:   }
 439: 
 440:   public function getOptions()
 441:   {
 442:     $this->send_getOptions();
 443:     return $this->recv_getOptions();
 444:   }
 445: 
 446:   public function send_getOptions()
 447:   {
 448:     $args = new FacebookService_getOptions_args();
 449:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 450:     if ($bin_accel)
 451:     {
 452:       thrift_protocol_write_binary($this->output_, 'getOptions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 453:     }
 454:     else
 455:     {
 456:       $this->output_->writeMessageBegin('getOptions', TMessageType::CALL, $this->seqid_);
 457:       $args->write($this->output_);
 458:       $this->output_->writeMessageEnd();
 459:       $this->output_->getTransport()->flush();
 460:     }
 461:   }
 462: 
 463:   public function recv_getOptions()
 464:   {
 465:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 466:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getOptions_result', $this->input_->isStrictRead());
 467:     else
 468:     {
 469:       $rseqid = 0;
 470:       $fname = null;
 471:       $mtype = 0;
 472: 
 473:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 474:       if ($mtype == TMessageType::EXCEPTION) {
 475:         $x = new TApplicationException();
 476:         $x->read($this->input_);
 477:         $this->input_->readMessageEnd();
 478:         throw $x;
 479:       }
 480:       $result = new FacebookService_getOptions_result();
 481:       $result->read($this->input_);
 482:       $this->input_->readMessageEnd();
 483:     }
 484:     if ($result->success !== null) {
 485:       return $result->success;
 486:     }
 487:     throw new Exception("getOptions failed: unknown result");
 488:   }
 489: 
 490:   public function getCpuProfile($profileDurationInSec)
 491:   {
 492:     $this->send_getCpuProfile($profileDurationInSec);
 493:     return $this->recv_getCpuProfile();
 494:   }
 495: 
 496:   public function send_getCpuProfile($profileDurationInSec)
 497:   {
 498:     $args = new FacebookService_getCpuProfile_args();
 499:     $args->profileDurationInSec = $profileDurationInSec;
 500:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 501:     if ($bin_accel)
 502:     {
 503:       thrift_protocol_write_binary($this->output_, 'getCpuProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 504:     }
 505:     else
 506:     {
 507:       $this->output_->writeMessageBegin('getCpuProfile', TMessageType::CALL, $this->seqid_);
 508:       $args->write($this->output_);
 509:       $this->output_->writeMessageEnd();
 510:       $this->output_->getTransport()->flush();
 511:     }
 512:   }
 513: 
 514:   public function recv_getCpuProfile()
 515:   {
 516:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 517:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getCpuProfile_result', $this->input_->isStrictRead());
 518:     else
 519:     {
 520:       $rseqid = 0;
 521:       $fname = null;
 522:       $mtype = 0;
 523: 
 524:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 525:       if ($mtype == TMessageType::EXCEPTION) {
 526:         $x = new TApplicationException();
 527:         $x->read($this->input_);
 528:         $this->input_->readMessageEnd();
 529:         throw $x;
 530:       }
 531:       $result = new FacebookService_getCpuProfile_result();
 532:       $result->read($this->input_);
 533:       $this->input_->readMessageEnd();
 534:     }
 535:     if ($result->success !== null) {
 536:       return $result->success;
 537:     }
 538:     throw new Exception("getCpuProfile failed: unknown result");
 539:   }
 540: 
 541:   public function aliveSince()
 542:   {
 543:     $this->send_aliveSince();
 544:     return $this->recv_aliveSince();
 545:   }
 546: 
 547:   public function send_aliveSince()
 548:   {
 549:     $args = new FacebookService_aliveSince_args();
 550:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 551:     if ($bin_accel)
 552:     {
 553:       thrift_protocol_write_binary($this->output_, 'aliveSince', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 554:     }
 555:     else
 556:     {
 557:       $this->output_->writeMessageBegin('aliveSince', TMessageType::CALL, $this->seqid_);
 558:       $args->write($this->output_);
 559:       $this->output_->writeMessageEnd();
 560:       $this->output_->getTransport()->flush();
 561:     }
 562:   }
 563: 
 564:   public function recv_aliveSince()
 565:   {
 566:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 567:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_aliveSince_result', $this->input_->isStrictRead());
 568:     else
 569:     {
 570:       $rseqid = 0;
 571:       $fname = null;
 572:       $mtype = 0;
 573: 
 574:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 575:       if ($mtype == TMessageType::EXCEPTION) {
 576:         $x = new TApplicationException();
 577:         $x->read($this->input_);
 578:         $this->input_->readMessageEnd();
 579:         throw $x;
 580:       }
 581:       $result = new FacebookService_aliveSince_result();
 582:       $result->read($this->input_);
 583:       $this->input_->readMessageEnd();
 584:     }
 585:     if ($result->success !== null) {
 586:       return $result->success;
 587:     }
 588:     throw new Exception("aliveSince failed: unknown result");
 589:   }
 590: 
 591:   public function getLimitedReflection()
 592:   {
 593:     $this->send_getLimitedReflection();
 594:     return $this->recv_getLimitedReflection();
 595:   }
 596: 
 597:   public function send_getLimitedReflection()
 598:   {
 599:     $args = new FacebookService_getLimitedReflection_args();
 600:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 601:     if ($bin_accel)
 602:     {
 603:       thrift_protocol_write_binary($this->output_, 'getLimitedReflection', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 604:     }
 605:     else
 606:     {
 607:       $this->output_->writeMessageBegin('getLimitedReflection', TMessageType::CALL, $this->seqid_);
 608:       $args->write($this->output_);
 609:       $this->output_->writeMessageEnd();
 610:       $this->output_->getTransport()->flush();
 611:     }
 612:   }
 613: 
 614:   public function recv_getLimitedReflection()
 615:   {
 616:     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
 617:     if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'FacebookService_getLimitedReflection_result', $this->input_->isStrictRead());
 618:     else
 619:     {
 620:       $rseqid = 0;
 621:       $fname = null;
 622:       $mtype = 0;
 623: 
 624:       $this->input_->readMessageBegin($fname, $mtype, $rseqid);
 625:       if ($mtype == TMessageType::EXCEPTION) {
 626:         $x = new TApplicationException();
 627:         $x->read($this->input_);
 628:         $this->input_->readMessageEnd();
 629:         throw $x;
 630:       }
 631:       $result = new FacebookService_getLimitedReflection_result();
 632:       $result->read($this->input_);
 633:       $this->input_->readMessageEnd();
 634:     }
 635:     if ($result->success !== null) {
 636:       return $result->success;
 637:     }
 638:     throw new Exception("getLimitedReflection failed: unknown result");
 639:   }
 640: 
 641:   public function reinitialize()
 642:   {
 643:     $this->send_reinitialize();
 644:   }
 645: 
 646:   public function send_reinitialize()
 647:   {
 648:     $args = new FacebookService_reinitialize_args();
 649:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 650:     if ($bin_accel)
 651:     {
 652:       thrift_protocol_write_binary($this->output_, 'reinitialize', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 653:     }
 654:     else
 655:     {
 656:       $this->output_->writeMessageBegin('reinitialize', TMessageType::CALL, $this->seqid_);
 657:       $args->write($this->output_);
 658:       $this->output_->writeMessageEnd();
 659:       $this->output_->getTransport()->flush();
 660:     }
 661:   }
 662:   public function shutdown()
 663:   {
 664:     $this->send_shutdown();
 665:   }
 666: 
 667:   public function send_shutdown()
 668:   {
 669:     $args = new FacebookService_shutdown_args();
 670:     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
 671:     if ($bin_accel)
 672:     {
 673:       thrift_protocol_write_binary($this->output_, 'shutdown', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
 674:     }
 675:     else
 676:     {
 677:       $this->output_->writeMessageBegin('shutdown', TMessageType::CALL, $this->seqid_);
 678:       $args->write($this->output_);
 679:       $this->output_->writeMessageEnd();
 680:       $this->output_->getTransport()->flush();
 681:     }
 682:   }
 683: }
 684: 
 685: // HELPER FUNCTIONS AND STRUCTURES
 686: 
 687: class FacebookService_getName_args {
 688:   static $_TSPEC;
 689: 
 690: 
 691:   public function __construct() {
 692:     if (!isset(self::$_TSPEC)) {
 693:       self::$_TSPEC = array(
 694:         );
 695:     }
 696:   }
 697: 
 698:   public function getName() {
 699:     return 'FacebookService_getName_args';
 700:   }
 701: 
 702:   public function read($input)
 703:   {
 704:     $xfer = 0;
 705:     $fname = null;
 706:     $ftype = 0;
 707:     $fid = 0;
 708:     $xfer += $input->readStructBegin($fname);
 709:     while (true)
 710:     {
 711:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
 712:       if ($ftype == TType::STOP) {
 713:         break;
 714:       }
 715:       switch ($fid)
 716:       {
 717:         default:
 718:           $xfer += $input->skip($ftype);
 719:           break;
 720:       }
 721:       $xfer += $input->readFieldEnd();
 722:     }
 723:     $xfer += $input->readStructEnd();
 724:     return $xfer;
 725:   }
 726: 
 727:   public function write($output) {
 728:     $xfer = 0;
 729:     $xfer += $output->writeStructBegin('FacebookService_getName_args');
 730:     $xfer += $output->writeFieldStop();
 731:     $xfer += $output->writeStructEnd();
 732:     return $xfer;
 733:   }
 734: 
 735: }
 736: 
 737: class FacebookService_getName_result {
 738:   static $_TSPEC;
 739: 
 740:   public $success = null;
 741: 
 742:   public function __construct($vals=null) {
 743:     if (!isset(self::$_TSPEC)) {
 744:       self::$_TSPEC = array(
 745:         0 => array(
 746:           'var' => 'success',
 747:           'type' => TType::STRING,
 748:           ),
 749:         );
 750:     }
 751:     if (is_array($vals)) {
 752:       if (isset($vals['success'])) {
 753:         $this->success = $vals['success'];
 754:       }
 755:     }
 756:   }
 757: 
 758:   public function getName() {
 759:     return 'FacebookService_getName_result';
 760:   }
 761: 
 762:   public function read($input)
 763:   {
 764:     $xfer = 0;
 765:     $fname = null;
 766:     $ftype = 0;
 767:     $fid = 0;
 768:     $xfer += $input->readStructBegin($fname);
 769:     while (true)
 770:     {
 771:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
 772:       if ($ftype == TType::STOP) {
 773:         break;
 774:       }
 775:       switch ($fid)
 776:       {
 777:         case 0:
 778:           if ($ftype == TType::STRING) {
 779:             $xfer += $input->readString($this->success);
 780:           } else {
 781:             $xfer += $input->skip($ftype);
 782:           }
 783:           break;
 784:         default:
 785:           $xfer += $input->skip($ftype);
 786:           break;
 787:       }
 788:       $xfer += $input->readFieldEnd();
 789:     }
 790:     $xfer += $input->readStructEnd();
 791:     return $xfer;
 792:   }
 793: 
 794:   public function write($output) {
 795:     $xfer = 0;
 796:     $xfer += $output->writeStructBegin('FacebookService_getName_result');
 797:     if ($this->success !== null) {
 798:       $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
 799:       $xfer += $output->writeString($this->success);
 800:       $xfer += $output->writeFieldEnd();
 801:     }
 802:     $xfer += $output->writeFieldStop();
 803:     $xfer += $output->writeStructEnd();
 804:     return $xfer;
 805:   }
 806: 
 807: }
 808: 
 809: class FacebookService_getVersion_args {
 810:   static $_TSPEC;
 811: 
 812: 
 813:   public function __construct() {
 814:     if (!isset(self::$_TSPEC)) {
 815:       self::$_TSPEC = array(
 816:         );
 817:     }
 818:   }
 819: 
 820:   public function getName() {
 821:     return 'FacebookService_getVersion_args';
 822:   }
 823: 
 824:   public function read($input)
 825:   {
 826:     $xfer = 0;
 827:     $fname = null;
 828:     $ftype = 0;
 829:     $fid = 0;
 830:     $xfer += $input->readStructBegin($fname);
 831:     while (true)
 832:     {
 833:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
 834:       if ($ftype == TType::STOP) {
 835:         break;
 836:       }
 837:       switch ($fid)
 838:       {
 839:         default:
 840:           $xfer += $input->skip($ftype);
 841:           break;
 842:       }
 843:       $xfer += $input->readFieldEnd();
 844:     }
 845:     $xfer += $input->readStructEnd();
 846:     return $xfer;
 847:   }
 848: 
 849:   public function write($output) {
 850:     $xfer = 0;
 851:     $xfer += $output->writeStructBegin('FacebookService_getVersion_args');
 852:     $xfer += $output->writeFieldStop();
 853:     $xfer += $output->writeStructEnd();
 854:     return $xfer;
 855:   }
 856: 
 857: }
 858: 
 859: class FacebookService_getVersion_result {
 860:   static $_TSPEC;
 861: 
 862:   public $success = null;
 863: 
 864:   public function __construct($vals=null) {
 865:     if (!isset(self::$_TSPEC)) {
 866:       self::$_TSPEC = array(
 867:         0 => array(
 868:           'var' => 'success',
 869:           'type' => TType::STRING,
 870:           ),
 871:         );
 872:     }
 873:     if (is_array($vals)) {
 874:       if (isset($vals['success'])) {
 875:         $this->success = $vals['success'];
 876:       }
 877:     }
 878:   }
 879: 
 880:   public function getName() {
 881:     return 'FacebookService_getVersion_result';
 882:   }
 883: 
 884:   public function read($input)
 885:   {
 886:     $xfer = 0;
 887:     $fname = null;
 888:     $ftype = 0;
 889:     $fid = 0;
 890:     $xfer += $input->readStructBegin($fname);
 891:     while (true)
 892:     {
 893:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
 894:       if ($ftype == TType::STOP) {
 895:         break;
 896:       }
 897:       switch ($fid)
 898:       {
 899:         case 0:
 900:           if ($ftype == TType::STRING) {
 901:             $xfer += $input->readString($this->success);
 902:           } else {
 903:             $xfer += $input->skip($ftype);
 904:           }
 905:           break;
 906:         default:
 907:           $xfer += $input->skip($ftype);
 908:           break;
 909:       }
 910:       $xfer += $input->readFieldEnd();
 911:     }
 912:     $xfer += $input->readStructEnd();
 913:     return $xfer;
 914:   }
 915: 
 916:   public function write($output) {
 917:     $xfer = 0;
 918:     $xfer += $output->writeStructBegin('FacebookService_getVersion_result');
 919:     if ($this->success !== null) {
 920:       $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
 921:       $xfer += $output->writeString($this->success);
 922:       $xfer += $output->writeFieldEnd();
 923:     }
 924:     $xfer += $output->writeFieldStop();
 925:     $xfer += $output->writeStructEnd();
 926:     return $xfer;
 927:   }
 928: 
 929: }
 930: 
 931: class FacebookService_getStatus_args {
 932:   static $_TSPEC;
 933: 
 934: 
 935:   public function __construct() {
 936:     if (!isset(self::$_TSPEC)) {
 937:       self::$_TSPEC = array(
 938:         );
 939:     }
 940:   }
 941: 
 942:   public function getName() {
 943:     return 'FacebookService_getStatus_args';
 944:   }
 945: 
 946:   public function read($input)
 947:   {
 948:     $xfer = 0;
 949:     $fname = null;
 950:     $ftype = 0;
 951:     $fid = 0;
 952:     $xfer += $input->readStructBegin($fname);
 953:     while (true)
 954:     {
 955:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
 956:       if ($ftype == TType::STOP) {
 957:         break;
 958:       }
 959:       switch ($fid)
 960:       {
 961:         default:
 962:           $xfer += $input->skip($ftype);
 963:           break;
 964:       }
 965:       $xfer += $input->readFieldEnd();
 966:     }
 967:     $xfer += $input->readStructEnd();
 968:     return $xfer;
 969:   }
 970: 
 971:   public function write($output) {
 972:     $xfer = 0;
 973:     $xfer += $output->writeStructBegin('FacebookService_getStatus_args');
 974:     $xfer += $output->writeFieldStop();
 975:     $xfer += $output->writeStructEnd();
 976:     return $xfer;
 977:   }
 978: 
 979: }
 980: 
 981: class FacebookService_getStatus_result {
 982:   static $_TSPEC;
 983: 
 984:   public $success = null;
 985: 
 986:   public function __construct($vals=null) {
 987:     if (!isset(self::$_TSPEC)) {
 988:       self::$_TSPEC = array(
 989:         0 => array(
 990:           'var' => 'success',
 991:           'type' => TType::I32,
 992:           ),
 993:         );
 994:     }
 995:     if (is_array($vals)) {
 996:       if (isset($vals['success'])) {
 997:         $this->success = $vals['success'];
 998:       }
 999:     }
1000:   }
1001: 
1002:   public function getName() {
1003:     return 'FacebookService_getStatus_result';
1004:   }
1005: 
1006:   public function read($input)
1007:   {
1008:     $xfer = 0;
1009:     $fname = null;
1010:     $ftype = 0;
1011:     $fid = 0;
1012:     $xfer += $input->readStructBegin($fname);
1013:     while (true)
1014:     {
1015:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1016:       if ($ftype == TType::STOP) {
1017:         break;
1018:       }
1019:       switch ($fid)
1020:       {
1021:         case 0:
1022:           if ($ftype == TType::I32) {
1023:             $xfer += $input->readI32($this->success);
1024:           } else {
1025:             $xfer += $input->skip($ftype);
1026:           }
1027:           break;
1028:         default:
1029:           $xfer += $input->skip($ftype);
1030:           break;
1031:       }
1032:       $xfer += $input->readFieldEnd();
1033:     }
1034:     $xfer += $input->readStructEnd();
1035:     return $xfer;
1036:   }
1037: 
1038:   public function write($output) {
1039:     $xfer = 0;
1040:     $xfer += $output->writeStructBegin('FacebookService_getStatus_result');
1041:     if ($this->success !== null) {
1042:       $xfer += $output->writeFieldBegin('success', TType::I32, 0);
1043:       $xfer += $output->writeI32($this->success);
1044:       $xfer += $output->writeFieldEnd();
1045:     }
1046:     $xfer += $output->writeFieldStop();
1047:     $xfer += $output->writeStructEnd();
1048:     return $xfer;
1049:   }
1050: 
1051: }
1052: 
1053: class FacebookService_getStatusDetails_args {
1054:   static $_TSPEC;
1055: 
1056: 
1057:   public function __construct() {
1058:     if (!isset(self::$_TSPEC)) {
1059:       self::$_TSPEC = array(
1060:         );
1061:     }
1062:   }
1063: 
1064:   public function getName() {
1065:     return 'FacebookService_getStatusDetails_args';
1066:   }
1067: 
1068:   public function read($input)
1069:   {
1070:     $xfer = 0;
1071:     $fname = null;
1072:     $ftype = 0;
1073:     $fid = 0;
1074:     $xfer += $input->readStructBegin($fname);
1075:     while (true)
1076:     {
1077:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1078:       if ($ftype == TType::STOP) {
1079:         break;
1080:       }
1081:       switch ($fid)
1082:       {
1083:         default:
1084:           $xfer += $input->skip($ftype);
1085:           break;
1086:       }
1087:       $xfer += $input->readFieldEnd();
1088:     }
1089:     $xfer += $input->readStructEnd();
1090:     return $xfer;
1091:   }
1092: 
1093:   public function write($output) {
1094:     $xfer = 0;
1095:     $xfer += $output->writeStructBegin('FacebookService_getStatusDetails_args');
1096:     $xfer += $output->writeFieldStop();
1097:     $xfer += $output->writeStructEnd();
1098:     return $xfer;
1099:   }
1100: 
1101: }
1102: 
1103: class FacebookService_getStatusDetails_result {
1104:   static $_TSPEC;
1105: 
1106:   public $success = null;
1107: 
1108:   public function __construct($vals=null) {
1109:     if (!isset(self::$_TSPEC)) {
1110:       self::$_TSPEC = array(
1111:         0 => array(
1112:           'var' => 'success',
1113:           'type' => TType::STRING,
1114:           ),
1115:         );
1116:     }
1117:     if (is_array($vals)) {
1118:       if (isset($vals['success'])) {
1119:         $this->success = $vals['success'];
1120:       }
1121:     }
1122:   }
1123: 
1124:   public function getName() {
1125:     return 'FacebookService_getStatusDetails_result';
1126:   }
1127: 
1128:   public function read($input)
1129:   {
1130:     $xfer = 0;
1131:     $fname = null;
1132:     $ftype = 0;
1133:     $fid = 0;
1134:     $xfer += $input->readStructBegin($fname);
1135:     while (true)
1136:     {
1137:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1138:       if ($ftype == TType::STOP) {
1139:         break;
1140:       }
1141:       switch ($fid)
1142:       {
1143:         case 0:
1144:           if ($ftype == TType::STRING) {
1145:             $xfer += $input->readString($this->success);
1146:           } else {
1147:             $xfer += $input->skip($ftype);
1148:           }
1149:           break;
1150:         default:
1151:           $xfer += $input->skip($ftype);
1152:           break;
1153:       }
1154:       $xfer += $input->readFieldEnd();
1155:     }
1156:     $xfer += $input->readStructEnd();
1157:     return $xfer;
1158:   }
1159: 
1160:   public function write($output) {
1161:     $xfer = 0;
1162:     $xfer += $output->writeStructBegin('FacebookService_getStatusDetails_result');
1163:     if ($this->success !== null) {
1164:       $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
1165:       $xfer += $output->writeString($this->success);
1166:       $xfer += $output->writeFieldEnd();
1167:     }
1168:     $xfer += $output->writeFieldStop();
1169:     $xfer += $output->writeStructEnd();
1170:     return $xfer;
1171:   }
1172: 
1173: }
1174: 
1175: class FacebookService_getCounters_args {
1176:   static $_TSPEC;
1177: 
1178: 
1179:   public function __construct() {
1180:     if (!isset(self::$_TSPEC)) {
1181:       self::$_TSPEC = array(
1182:         );
1183:     }
1184:   }
1185: 
1186:   public function getName() {
1187:     return 'FacebookService_getCounters_args';
1188:   }
1189: 
1190:   public function read($input)
1191:   {
1192:     $xfer = 0;
1193:     $fname = null;
1194:     $ftype = 0;
1195:     $fid = 0;
1196:     $xfer += $input->readStructBegin($fname);
1197:     while (true)
1198:     {
1199:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1200:       if ($ftype == TType::STOP) {
1201:         break;
1202:       }
1203:       switch ($fid)
1204:       {
1205:         default:
1206:           $xfer += $input->skip($ftype);
1207:           break;
1208:       }
1209:       $xfer += $input->readFieldEnd();
1210:     }
1211:     $xfer += $input->readStructEnd();
1212:     return $xfer;
1213:   }
1214: 
1215:   public function write($output) {
1216:     $xfer = 0;
1217:     $xfer += $output->writeStructBegin('FacebookService_getCounters_args');
1218:     $xfer += $output->writeFieldStop();
1219:     $xfer += $output->writeStructEnd();
1220:     return $xfer;
1221:   }
1222: 
1223: }
1224: 
1225: class FacebookService_getCounters_result {
1226:   static $_TSPEC;
1227: 
1228:   public $success = null;
1229: 
1230:   public function __construct($vals=null) {
1231:     if (!isset(self::$_TSPEC)) {
1232:       self::$_TSPEC = array(
1233:         0 => array(
1234:           'var' => 'success',
1235:           'type' => TType::MAP,
1236:           'ktype' => TType::STRING,
1237:           'vtype' => TType::I64,
1238:           'key' => array(
1239:             'type' => TType::STRING,
1240:           ),
1241:           'val' => array(
1242:             'type' => TType::I64,
1243:             ),
1244:           ),
1245:         );
1246:     }
1247:     if (is_array($vals)) {
1248:       if (isset($vals['success'])) {
1249:         $this->success = $vals['success'];
1250:       }
1251:     }
1252:   }
1253: 
1254:   public function getName() {
1255:     return 'FacebookService_getCounters_result';
1256:   }
1257: 
1258:   public function read($input)
1259:   {
1260:     $xfer = 0;
1261:     $fname = null;
1262:     $ftype = 0;
1263:     $fid = 0;
1264:     $xfer += $input->readStructBegin($fname);
1265:     while (true)
1266:     {
1267:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1268:       if ($ftype == TType::STOP) {
1269:         break;
1270:       }
1271:       switch ($fid)
1272:       {
1273:         case 0:
1274:           if ($ftype == TType::MAP) {
1275:             $this->success = array();
1276:             $_size0 = 0;
1277:             $_ktype1 = 0;
1278:             $_vtype2 = 0;
1279:             $xfer += $input->readMapBegin($_ktype1, $_vtype2, $_size0);
1280:             for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
1281:             {
1282:               $key5 = '';
1283:               $val6 = 0;
1284:               $xfer += $input->readString($key5);
1285:               $xfer += $input->readI64($val6);
1286:               $this->success[$key5] = $val6;
1287:             }
1288:             $xfer += $input->readMapEnd();
1289:           } else {
1290:             $xfer += $input->skip($ftype);
1291:           }
1292:           break;
1293:         default:
1294:           $xfer += $input->skip($ftype);
1295:           break;
1296:       }
1297:       $xfer += $input->readFieldEnd();
1298:     }
1299:     $xfer += $input->readStructEnd();
1300:     return $xfer;
1301:   }
1302: 
1303:   public function write($output) {
1304:     $xfer = 0;
1305:     $xfer += $output->writeStructBegin('FacebookService_getCounters_result');
1306:     if ($this->success !== null) {
1307:       if (!is_array($this->success)) {
1308:         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1309:       }
1310:       $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
1311:       {
1312:         $output->writeMapBegin(TType::STRING, TType::I64, count($this->success));
1313:         {
1314:           foreach ($this->success as $kiter7 => $viter8)
1315:           {
1316:             $xfer += $output->writeString($kiter7);
1317:             $xfer += $output->writeI64($viter8);
1318:           }
1319:         }
1320:         $output->writeMapEnd();
1321:       }
1322:       $xfer += $output->writeFieldEnd();
1323:     }
1324:     $xfer += $output->writeFieldStop();
1325:     $xfer += $output->writeStructEnd();
1326:     return $xfer;
1327:   }
1328: 
1329: }
1330: 
1331: class FacebookService_getCounter_args {
1332:   static $_TSPEC;
1333: 
1334:   public $key = null;
1335: 
1336:   public function __construct($vals=null) {
1337:     if (!isset(self::$_TSPEC)) {
1338:       self::$_TSPEC = array(
1339:         1 => array(
1340:           'var' => 'key',
1341:           'type' => TType::STRING,
1342:           ),
1343:         );
1344:     }
1345:     if (is_array($vals)) {
1346:       if (isset($vals['key'])) {
1347:         $this->key = $vals['key'];
1348:       }
1349:     }
1350:   }
1351: 
1352:   public function getName() {
1353:     return 'FacebookService_getCounter_args';
1354:   }
1355: 
1356:   public function read($input)
1357:   {
1358:     $xfer = 0;
1359:     $fname = null;
1360:     $ftype = 0;
1361:     $fid = 0;
1362:     $xfer += $input->readStructBegin($fname);
1363:     while (true)
1364:     {
1365:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1366:       if ($ftype == TType::STOP) {
1367:         break;
1368:       }
1369:       switch ($fid)
1370:       {
1371:         case 1:
1372:           if ($ftype == TType::STRING) {
1373:             $xfer += $input->readString($this->key);
1374:           } else {
1375:             $xfer += $input->skip($ftype);
1376:           }
1377:           break;
1378:         default:
1379:           $xfer += $input->skip($ftype);
1380:           break;
1381:       }
1382:       $xfer += $input->readFieldEnd();
1383:     }
1384:     $xfer += $input->readStructEnd();
1385:     return $xfer;
1386:   }
1387: 
1388:   public function write($output) {
1389:     $xfer = 0;
1390:     $xfer += $output->writeStructBegin('FacebookService_getCounter_args');
1391:     if ($this->key !== null) {
1392:       $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
1393:       $xfer += $output->writeString($this->key);
1394:       $xfer += $output->writeFieldEnd();
1395:     }
1396:     $xfer += $output->writeFieldStop();
1397:     $xfer += $output->writeStructEnd();
1398:     return $xfer;
1399:   }
1400: 
1401: }
1402: 
1403: class FacebookService_getCounter_result {
1404:   static $_TSPEC;
1405: 
1406:   public $success = null;
1407: 
1408:   public function __construct($vals=null) {
1409:     if (!isset(self::$_TSPEC)) {
1410:       self::$_TSPEC = array(
1411:         0 => array(
1412:           'var' => 'success',
1413:           'type' => TType::I64,
1414:           ),
1415:         );
1416:     }
1417:     if (is_array($vals)) {
1418:       if (isset($vals['success'])) {
1419:         $this->success = $vals['success'];
1420:       }
1421:     }
1422:   }
1423: 
1424:   public function getName() {
1425:     return 'FacebookService_getCounter_result';
1426:   }
1427: 
1428:   public function read($input)
1429:   {
1430:     $xfer = 0;
1431:     $fname = null;
1432:     $ftype = 0;
1433:     $fid = 0;
1434:     $xfer += $input->readStructBegin($fname);
1435:     while (true)
1436:     {
1437:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1438:       if ($ftype == TType::STOP) {
1439:         break;
1440:       }
1441:       switch ($fid)
1442:       {
1443:         case 0:
1444:           if ($ftype == TType::I64) {
1445:             $xfer += $input->readI64($this->success);
1446:           } else {
1447:             $xfer += $input->skip($ftype);
1448:           }
1449:           break;
1450:         default:
1451:           $xfer += $input->skip($ftype);
1452:           break;
1453:       }
1454:       $xfer += $input->readFieldEnd();
1455:     }
1456:     $xfer += $input->readStructEnd();
1457:     return $xfer;
1458:   }
1459: 
1460:   public function write($output) {
1461:     $xfer = 0;
1462:     $xfer += $output->writeStructBegin('FacebookService_getCounter_result');
1463:     if ($this->success !== null) {
1464:       $xfer += $output->writeFieldBegin('success', TType::I64, 0);
1465:       $xfer += $output->writeI64($this->success);
1466:       $xfer += $output->writeFieldEnd();
1467:     }
1468:     $xfer += $output->writeFieldStop();
1469:     $xfer += $output->writeStructEnd();
1470:     return $xfer;
1471:   }
1472: 
1473: }
1474: 
1475: class FacebookService_setOption_args {
1476:   static $_TSPEC;
1477: 
1478:   public $key = null;
1479:   public $value = null;
1480: 
1481:   public function __construct($vals=null) {
1482:     if (!isset(self::$_TSPEC)) {
1483:       self::$_TSPEC = array(
1484:         1 => array(
1485:           'var' => 'key',
1486:           'type' => TType::STRING,
1487:           ),
1488:         2 => array(
1489:           'var' => 'value',
1490:           'type' => TType::STRING,
1491:           ),
1492:         );
1493:     }
1494:     if (is_array($vals)) {
1495:       if (isset($vals['key'])) {
1496:         $this->key = $vals['key'];
1497:       }
1498:       if (isset($vals['value'])) {
1499:         $this->value = $vals['value'];
1500:       }
1501:     }
1502:   }
1503: 
1504:   public function getName() {
1505:     return 'FacebookService_setOption_args';
1506:   }
1507: 
1508:   public function read($input)
1509:   {
1510:     $xfer = 0;
1511:     $fname = null;
1512:     $ftype = 0;
1513:     $fid = 0;
1514:     $xfer += $input->readStructBegin($fname);
1515:     while (true)
1516:     {
1517:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1518:       if ($ftype == TType::STOP) {
1519:         break;
1520:       }
1521:       switch ($fid)
1522:       {
1523:         case 1:
1524:           if ($ftype == TType::STRING) {
1525:             $xfer += $input->readString($this->key);
1526:           } else {
1527:             $xfer += $input->skip($ftype);
1528:           }
1529:           break;
1530:         case 2:
1531:           if ($ftype == TType::STRING) {
1532:             $xfer += $input->readString($this->value);
1533:           } else {
1534:             $xfer += $input->skip($ftype);
1535:           }
1536:           break;
1537:         default:
1538:           $xfer += $input->skip($ftype);
1539:           break;
1540:       }
1541:       $xfer += $input->readFieldEnd();
1542:     }
1543:     $xfer += $input->readStructEnd();
1544:     return $xfer;
1545:   }
1546: 
1547:   public function write($output) {
1548:     $xfer = 0;
1549:     $xfer += $output->writeStructBegin('FacebookService_setOption_args');
1550:     if ($this->key !== null) {
1551:       $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
1552:       $xfer += $output->writeString($this->key);
1553:       $xfer += $output->writeFieldEnd();
1554:     }
1555:     if ($this->value !== null) {
1556:       $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
1557:       $xfer += $output->writeString($this->value);
1558:       $xfer += $output->writeFieldEnd();
1559:     }
1560:     $xfer += $output->writeFieldStop();
1561:     $xfer += $output->writeStructEnd();
1562:     return $xfer;
1563:   }
1564: 
1565: }
1566: 
1567: class FacebookService_setOption_result {
1568:   static $_TSPEC;
1569: 
1570: 
1571:   public function __construct() {
1572:     if (!isset(self::$_TSPEC)) {
1573:       self::$_TSPEC = array(
1574:         );
1575:     }
1576:   }
1577: 
1578:   public function getName() {
1579:     return 'FacebookService_setOption_result';
1580:   }
1581: 
1582:   public function read($input)
1583:   {
1584:     $xfer = 0;
1585:     $fname = null;
1586:     $ftype = 0;
1587:     $fid = 0;
1588:     $xfer += $input->readStructBegin($fname);
1589:     while (true)
1590:     {
1591:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1592:       if ($ftype == TType::STOP) {
1593:         break;
1594:       }
1595:       switch ($fid)
1596:       {
1597:         default:
1598:           $xfer += $input->skip($ftype);
1599:           break;
1600:       }
1601:       $xfer += $input->readFieldEnd();
1602:     }
1603:     $xfer += $input->readStructEnd();
1604:     return $xfer;
1605:   }
1606: 
1607:   public function write($output) {
1608:     $xfer = 0;
1609:     $xfer += $output->writeStructBegin('FacebookService_setOption_result');
1610:     $xfer += $output->writeFieldStop();
1611:     $xfer += $output->writeStructEnd();
1612:     return $xfer;
1613:   }
1614: 
1615: }
1616: 
1617: class FacebookService_getOption_args {
1618:   static $_TSPEC;
1619: 
1620:   public $key = null;
1621: 
1622:   public function __construct($vals=null) {
1623:     if (!isset(self::$_TSPEC)) {
1624:       self::$_TSPEC = array(
1625:         1 => array(
1626:           'var' => 'key',
1627:           'type' => TType::STRING,
1628:           ),
1629:         );
1630:     }
1631:     if (is_array($vals)) {
1632:       if (isset($vals['key'])) {
1633:         $this->key = $vals['key'];
1634:       }
1635:     }
1636:   }
1637: 
1638:   public function getName() {
1639:     return 'FacebookService_getOption_args';
1640:   }
1641: 
1642:   public function read($input)
1643:   {
1644:     $xfer = 0;
1645:     $fname = null;
1646:     $ftype = 0;
1647:     $fid = 0;
1648:     $xfer += $input->readStructBegin($fname);
1649:     while (true)
1650:     {
1651:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1652:       if ($ftype == TType::STOP) {
1653:         break;
1654:       }
1655:       switch ($fid)
1656:       {
1657:         case 1:
1658:           if ($ftype == TType::STRING) {
1659:             $xfer += $input->readString($this->key);
1660:           } else {
1661:             $xfer += $input->skip($ftype);
1662:           }
1663:           break;
1664:         default:
1665:           $xfer += $input->skip($ftype);
1666:           break;
1667:       }
1668:       $xfer += $input->readFieldEnd();
1669:     }
1670:     $xfer += $input->readStructEnd();
1671:     return $xfer;
1672:   }
1673: 
1674:   public function write($output) {
1675:     $xfer = 0;
1676:     $xfer += $output->writeStructBegin('FacebookService_getOption_args');
1677:     if ($this->key !== null) {
1678:       $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
1679:       $xfer += $output->writeString($this->key);
1680:       $xfer += $output->writeFieldEnd();
1681:     }
1682:     $xfer += $output->writeFieldStop();
1683:     $xfer += $output->writeStructEnd();
1684:     return $xfer;
1685:   }
1686: 
1687: }
1688: 
1689: class FacebookService_getOption_result {
1690:   static $_TSPEC;
1691: 
1692:   public $success = null;
1693: 
1694:   public function __construct($vals=null) {
1695:     if (!isset(self::$_TSPEC)) {
1696:       self::$_TSPEC = array(
1697:         0 => array(
1698:           'var' => 'success',
1699:           'type' => TType::STRING,
1700:           ),
1701:         );
1702:     }
1703:     if (is_array($vals)) {
1704:       if (isset($vals['success'])) {
1705:         $this->success = $vals['success'];
1706:       }
1707:     }
1708:   }
1709: 
1710:   public function getName() {
1711:     return 'FacebookService_getOption_result';
1712:   }
1713: 
1714:   public function read($input)
1715:   {
1716:     $xfer = 0;
1717:     $fname = null;
1718:     $ftype = 0;
1719:     $fid = 0;
1720:     $xfer += $input->readStructBegin($fname);
1721:     while (true)
1722:     {
1723:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1724:       if ($ftype == TType::STOP) {
1725:         break;
1726:       }
1727:       switch ($fid)
1728:       {
1729:         case 0:
1730:           if ($ftype == TType::STRING) {
1731:             $xfer += $input->readString($this->success);
1732:           } else {
1733:             $xfer += $input->skip($ftype);
1734:           }
1735:           break;
1736:         default:
1737:           $xfer += $input->skip($ftype);
1738:           break;
1739:       }
1740:       $xfer += $input->readFieldEnd();
1741:     }
1742:     $xfer += $input->readStructEnd();
1743:     return $xfer;
1744:   }
1745: 
1746:   public function write($output) {
1747:     $xfer = 0;
1748:     $xfer += $output->writeStructBegin('FacebookService_getOption_result');
1749:     if ($this->success !== null) {
1750:       $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
1751:       $xfer += $output->writeString($this->success);
1752:       $xfer += $output->writeFieldEnd();
1753:     }
1754:     $xfer += $output->writeFieldStop();
1755:     $xfer += $output->writeStructEnd();
1756:     return $xfer;
1757:   }
1758: 
1759: }
1760: 
1761: class FacebookService_getOptions_args {
1762:   static $_TSPEC;
1763: 
1764: 
1765:   public function __construct() {
1766:     if (!isset(self::$_TSPEC)) {
1767:       self::$_TSPEC = array(
1768:         );
1769:     }
1770:   }
1771: 
1772:   public function getName() {
1773:     return 'FacebookService_getOptions_args';
1774:   }
1775: 
1776:   public function read($input)
1777:   {
1778:     $xfer = 0;
1779:     $fname = null;
1780:     $ftype = 0;
1781:     $fid = 0;
1782:     $xfer += $input->readStructBegin($fname);
1783:     while (true)
1784:     {
1785:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1786:       if ($ftype == TType::STOP) {
1787:         break;
1788:       }
1789:       switch ($fid)
1790:       {
1791:         default:
1792:           $xfer += $input->skip($ftype);
1793:           break;
1794:       }
1795:       $xfer += $input->readFieldEnd();
1796:     }
1797:     $xfer += $input->readStructEnd();
1798:     return $xfer;
1799:   }
1800: 
1801:   public function write($output) {
1802:     $xfer = 0;
1803:     $xfer += $output->writeStructBegin('FacebookService_getOptions_args');
1804:     $xfer += $output->writeFieldStop();
1805:     $xfer += $output->writeStructEnd();
1806:     return $xfer;
1807:   }
1808: 
1809: }
1810: 
1811: class FacebookService_getOptions_result {
1812:   static $_TSPEC;
1813: 
1814:   public $success = null;
1815: 
1816:   public function __construct($vals=null) {
1817:     if (!isset(self::$_TSPEC)) {
1818:       self::$_TSPEC = array(
1819:         0 => array(
1820:           'var' => 'success',
1821:           'type' => TType::MAP,
1822:           'ktype' => TType::STRING,
1823:           'vtype' => TType::STRING,
1824:           'key' => array(
1825:             'type' => TType::STRING,
1826:           ),
1827:           'val' => array(
1828:             'type' => TType::STRING,
1829:             ),
1830:           ),
1831:         );
1832:     }
1833:     if (is_array($vals)) {
1834:       if (isset($vals['success'])) {
1835:         $this->success = $vals['success'];
1836:       }
1837:     }
1838:   }
1839: 
1840:   public function getName() {
1841:     return 'FacebookService_getOptions_result';
1842:   }
1843: 
1844:   public function read($input)
1845:   {
1846:     $xfer = 0;
1847:     $fname = null;
1848:     $ftype = 0;
1849:     $fid = 0;
1850:     $xfer += $input->readStructBegin($fname);
1851:     while (true)
1852:     {
1853:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1854:       if ($ftype == TType::STOP) {
1855:         break;
1856:       }
1857:       switch ($fid)
1858:       {
1859:         case 0:
1860:           if ($ftype == TType::MAP) {
1861:             $this->success = array();
1862:             $_size9 = 0;
1863:             $_ktype10 = 0;
1864:             $_vtype11 = 0;
1865:             $xfer += $input->readMapBegin($_ktype10, $_vtype11, $_size9);
1866:             for ($_i13 = 0; $_i13 < $_size9; ++$_i13)
1867:             {
1868:               $key14 = '';
1869:               $val15 = '';
1870:               $xfer += $input->readString($key14);
1871:               $xfer += $input->readString($val15);
1872:               $this->success[$key14] = $val15;
1873:             }
1874:             $xfer += $input->readMapEnd();
1875:           } else {
1876:             $xfer += $input->skip($ftype);
1877:           }
1878:           break;
1879:         default:
1880:           $xfer += $input->skip($ftype);
1881:           break;
1882:       }
1883:       $xfer += $input->readFieldEnd();
1884:     }
1885:     $xfer += $input->readStructEnd();
1886:     return $xfer;
1887:   }
1888: 
1889:   public function write($output) {
1890:     $xfer = 0;
1891:     $xfer += $output->writeStructBegin('FacebookService_getOptions_result');
1892:     if ($this->success !== null) {
1893:       if (!is_array($this->success)) {
1894:         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1895:       }
1896:       $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
1897:       {
1898:         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
1899:         {
1900:           foreach ($this->success as $kiter16 => $viter17)
1901:           {
1902:             $xfer += $output->writeString($kiter16);
1903:             $xfer += $output->writeString($viter17);
1904:           }
1905:         }
1906:         $output->writeMapEnd();
1907:       }
1908:       $xfer += $output->writeFieldEnd();
1909:     }
1910:     $xfer += $output->writeFieldStop();
1911:     $xfer += $output->writeStructEnd();
1912:     return $xfer;
1913:   }
1914: 
1915: }
1916: 
1917: class FacebookService_getCpuProfile_args {
1918:   static $_TSPEC;
1919: 
1920:   public $profileDurationInSec = null;
1921: 
1922:   public function __construct($vals=null) {
1923:     if (!isset(self::$_TSPEC)) {
1924:       self::$_TSPEC = array(
1925:         1 => array(
1926:           'var' => 'profileDurationInSec',
1927:           'type' => TType::I32,
1928:           ),
1929:         );
1930:     }
1931:     if (is_array($vals)) {
1932:       if (isset($vals['profileDurationInSec'])) {
1933:         $this->profileDurationInSec = $vals['profileDurationInSec'];
1934:       }
1935:     }
1936:   }
1937: 
1938:   public function getName() {
1939:     return 'FacebookService_getCpuProfile_args';
1940:   }
1941: 
1942:   public function read($input)
1943:   {
1944:     $xfer = 0;
1945:     $fname = null;
1946:     $ftype = 0;
1947:     $fid = 0;
1948:     $xfer += $input->readStructBegin($fname);
1949:     while (true)
1950:     {
1951:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1952:       if ($ftype == TType::STOP) {
1953:         break;
1954:       }
1955:       switch ($fid)
1956:       {
1957:         case 1:
1958:           if ($ftype == TType::I32) {
1959:             $xfer += $input->readI32($this->profileDurationInSec);
1960:           } else {
1961:             $xfer += $input->skip($ftype);
1962:           }
1963:           break;
1964:         default:
1965:           $xfer += $input->skip($ftype);
1966:           break;
1967:       }
1968:       $xfer += $input->readFieldEnd();
1969:     }
1970:     $xfer += $input->readStructEnd();
1971:     return $xfer;
1972:   }
1973: 
1974:   public function write($output) {
1975:     $xfer = 0;
1976:     $xfer += $output->writeStructBegin('FacebookService_getCpuProfile_args');
1977:     if ($this->profileDurationInSec !== null) {
1978:       $xfer += $output->writeFieldBegin('profileDurationInSec', TType::I32, 1);
1979:       $xfer += $output->writeI32($this->profileDurationInSec);
1980:       $xfer += $output->writeFieldEnd();
1981:     }
1982:     $xfer += $output->writeFieldStop();
1983:     $xfer += $output->writeStructEnd();
1984:     return $xfer;
1985:   }
1986: 
1987: }
1988: 
1989: class FacebookService_getCpuProfile_result {
1990:   static $_TSPEC;
1991: 
1992:   public $success = null;
1993: 
1994:   public function __construct($vals=null) {
1995:     if (!isset(self::$_TSPEC)) {
1996:       self::$_TSPEC = array(
1997:         0 => array(
1998:           'var' => 'success',
1999:           'type' => TType::STRING,
2000:           ),
2001:         );
2002:     }
2003:     if (is_array($vals)) {
2004:       if (isset($vals['success'])) {
2005:         $this->success = $vals['success'];
2006:       }
2007:     }
2008:   }
2009: 
2010:   public function getName() {
2011:     return 'FacebookService_getCpuProfile_result';
2012:   }
2013: 
2014:   public function read($input)
2015:   {
2016:     $xfer = 0;
2017:     $fname = null;
2018:     $ftype = 0;
2019:     $fid = 0;
2020:     $xfer += $input->readStructBegin($fname);
2021:     while (true)
2022:     {
2023:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2024:       if ($ftype == TType::STOP) {
2025:         break;
2026:       }
2027:       switch ($fid)
2028:       {
2029:         case 0:
2030:           if ($ftype == TType::STRING) {
2031:             $xfer += $input->readString($this->success);
2032:           } else {
2033:             $xfer += $input->skip($ftype);
2034:           }
2035:           break;
2036:         default:
2037:           $xfer += $input->skip($ftype);
2038:           break;
2039:       }
2040:       $xfer += $input->readFieldEnd();
2041:     }
2042:     $xfer += $input->readStructEnd();
2043:     return $xfer;
2044:   }
2045: 
2046:   public function write($output) {
2047:     $xfer = 0;
2048:     $xfer += $output->writeStructBegin('FacebookService_getCpuProfile_result');
2049:     if ($this->success !== null) {
2050:       $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
2051:       $xfer += $output->writeString($this->success);
2052:       $xfer += $output->writeFieldEnd();
2053:     }
2054:     $xfer += $output->writeFieldStop();
2055:     $xfer += $output->writeStructEnd();
2056:     return $xfer;
2057:   }
2058: 
2059: }
2060: 
2061: class FacebookService_aliveSince_args {
2062:   static $_TSPEC;
2063: 
2064: 
2065:   public function __construct() {
2066:     if (!isset(self::$_TSPEC)) {
2067:       self::$_TSPEC = array(
2068:         );
2069:     }
2070:   }
2071: 
2072:   public function getName() {
2073:     return 'FacebookService_aliveSince_args';
2074:   }
2075: 
2076:   public function read($input)
2077:   {
2078:     $xfer = 0;
2079:     $fname = null;
2080:     $ftype = 0;
2081:     $fid = 0;
2082:     $xfer += $input->readStructBegin($fname);
2083:     while (true)
2084:     {
2085:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2086:       if ($ftype == TType::STOP) {
2087:         break;
2088:       }
2089:       switch ($fid)
2090:       {
2091:         default:
2092:           $xfer += $input->skip($ftype);
2093:           break;
2094:       }
2095:       $xfer += $input->readFieldEnd();
2096:     }
2097:     $xfer += $input->readStructEnd();
2098:     return $xfer;
2099:   }
2100: 
2101:   public function write($output) {
2102:     $xfer = 0;
2103:     $xfer += $output->writeStructBegin('FacebookService_aliveSince_args');
2104:     $xfer += $output->writeFieldStop();
2105:     $xfer += $output->writeStructEnd();
2106:     return $xfer;
2107:   }
2108: 
2109: }
2110: 
2111: class FacebookService_aliveSince_result {
2112:   static $_TSPEC;
2113: 
2114:   public $success = null;
2115: 
2116:   public function __construct($vals=null) {
2117:     if (!isset(self::$_TSPEC)) {
2118:       self::$_TSPEC = array(
2119:         0 => array(
2120:           'var' => 'success',
2121:           'type' => TType::I64,
2122:           ),
2123:         );
2124:     }
2125:     if (is_array($vals)) {
2126:       if (isset($vals['success'])) {
2127:         $this->success = $vals['success'];
2128:       }
2129:     }
2130:   }
2131: 
2132:   public function getName() {
2133:     return 'FacebookService_aliveSince_result';
2134:   }
2135: 
2136:   public function read($input)
2137:   {
2138:     $xfer = 0;
2139:     $fname = null;
2140:     $ftype = 0;
2141:     $fid = 0;
2142:     $xfer += $input->readStructBegin($fname);
2143:     while (true)
2144:     {
2145:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2146:       if ($ftype == TType::STOP) {
2147:         break;
2148:       }
2149:       switch ($fid)
2150:       {
2151:         case 0:
2152:           if ($ftype == TType::I64) {
2153:             $xfer += $input->readI64($this->success);
2154:           } else {
2155:             $xfer += $input->skip($ftype);
2156:           }
2157:           break;
2158:         default:
2159:           $xfer += $input->skip($ftype);
2160:           break;
2161:       }
2162:       $xfer += $input->readFieldEnd();
2163:     }
2164:     $xfer += $input->readStructEnd();
2165:     return $xfer;
2166:   }
2167: 
2168:   public function write($output) {
2169:     $xfer = 0;
2170:     $xfer += $output->writeStructBegin('FacebookService_aliveSince_result');
2171:     if ($this->success !== null) {
2172:       $xfer += $output->writeFieldBegin('success', TType::I64, 0);
2173:       $xfer += $output->writeI64($this->success);
2174:       $xfer += $output->writeFieldEnd();
2175:     }
2176:     $xfer += $output->writeFieldStop();
2177:     $xfer += $output->writeStructEnd();
2178:     return $xfer;
2179:   }
2180: 
2181: }
2182: 
2183: class FacebookService_getLimitedReflection_args {
2184:   static $_TSPEC;
2185: 
2186: 
2187:   public function __construct() {
2188:     if (!isset(self::$_TSPEC)) {
2189:       self::$_TSPEC = array(
2190:         );
2191:     }
2192:   }
2193: 
2194:   public function getName() {
2195:     return 'FacebookService_getLimitedReflection_args';
2196:   }
2197: 
2198:   public function read($input)
2199:   {
2200:     $xfer = 0;
2201:     $fname = null;
2202:     $ftype = 0;
2203:     $fid = 0;
2204:     $xfer += $input->readStructBegin($fname);
2205:     while (true)
2206:     {
2207:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2208:       if ($ftype == TType::STOP) {
2209:         break;
2210:       }
2211:       switch ($fid)
2212:       {
2213:         default:
2214:           $xfer += $input->skip($ftype);
2215:           break;
2216:       }
2217:       $xfer += $input->readFieldEnd();
2218:     }
2219:     $xfer += $input->readStructEnd();
2220:     return $xfer;
2221:   }
2222: 
2223:   public function write($output) {
2224:     $xfer = 0;
2225:     $xfer += $output->writeStructBegin('FacebookService_getLimitedReflection_args');
2226:     $xfer += $output->writeFieldStop();
2227:     $xfer += $output->writeStructEnd();
2228:     return $xfer;
2229:   }
2230: 
2231: }
2232: 
2233: class FacebookService_getLimitedReflection_result {
2234:   static $_TSPEC;
2235: 
2236:   public $success = null;
2237: 
2238:   public function __construct($vals=null) {
2239:     if (!isset(self::$_TSPEC)) {
2240:       self::$_TSPEC = array(
2241:         0 => array(
2242:           'var' => 'success',
2243:           'type' => TType::STRUCT,
2244:           'class' => 'Service',
2245:           ),
2246:         );
2247:     }
2248:     if (is_array($vals)) {
2249:       if (isset($vals['success'])) {
2250:         $this->success = $vals['success'];
2251:       }
2252:     }
2253:   }
2254: 
2255:   public function getName() {
2256:     return 'FacebookService_getLimitedReflection_result';
2257:   }
2258: 
2259:   public function read($input)
2260:   {
2261:     $xfer = 0;
2262:     $fname = null;
2263:     $ftype = 0;
2264:     $fid = 0;
2265:     $xfer += $input->readStructBegin($fname);
2266:     while (true)
2267:     {
2268:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2269:       if ($ftype == TType::STOP) {
2270:         break;
2271:       }
2272:       switch ($fid)
2273:       {
2274:         case 0:
2275:           if ($ftype == TType::STRUCT) {
2276:             $this->success = new Service();
2277:             $xfer += $this->success->read($input);
2278:           } else {
2279:             $xfer += $input->skip($ftype);
2280:           }
2281:           break;
2282:         default:
2283:           $xfer += $input->skip($ftype);
2284:           break;
2285:       }
2286:       $xfer += $input->readFieldEnd();
2287:     }
2288:     $xfer += $input->readStructEnd();
2289:     return $xfer;
2290:   }
2291: 
2292:   public function write($output) {
2293:     $xfer = 0;
2294:     $xfer += $output->writeStructBegin('FacebookService_getLimitedReflection_result');
2295:     if ($this->success !== null) {
2296:       if (!is_object($this->success)) {
2297:         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2298:       }
2299:       $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
2300:       $xfer += $this->success->write($output);
2301:       $xfer += $output->writeFieldEnd();
2302:     }
2303:     $xfer += $output->writeFieldStop();
2304:     $xfer += $output->writeStructEnd();
2305:     return $xfer;
2306:   }
2307: 
2308: }
2309: 
2310: class FacebookService_reinitialize_args {
2311:   static $_TSPEC;
2312: 
2313: 
2314:   public function __construct() {
2315:     if (!isset(self::$_TSPEC)) {
2316:       self::$_TSPEC = array(
2317:         );
2318:     }
2319:   }
2320: 
2321:   public function getName() {
2322:     return 'FacebookService_reinitialize_args';
2323:   }
2324: 
2325:   public function read($input)
2326:   {
2327:     $xfer = 0;
2328:     $fname = null;
2329:     $ftype = 0;
2330:     $fid = 0;
2331:     $xfer += $input->readStructBegin($fname);
2332:     while (true)
2333:     {
2334:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2335:       if ($ftype == TType::STOP) {
2336:         break;
2337:       }
2338:       switch ($fid)
2339:       {
2340:         default:
2341:           $xfer += $input->skip($ftype);
2342:           break;
2343:       }
2344:       $xfer += $input->readFieldEnd();
2345:     }
2346:     $xfer += $input->readStructEnd();
2347:     return $xfer;
2348:   }
2349: 
2350:   public function write($output) {
2351:     $xfer = 0;
2352:     $xfer += $output->writeStructBegin('FacebookService_reinitialize_args');
2353:     $xfer += $output->writeFieldStop();
2354:     $xfer += $output->writeStructEnd();
2355:     return $xfer;
2356:   }
2357: 
2358: }
2359: 
2360: class FacebookService_shutdown_args {
2361:   static $_TSPEC;
2362: 
2363: 
2364:   public function __construct() {
2365:     if (!isset(self::$_TSPEC)) {
2366:       self::$_TSPEC = array(
2367:         );
2368:     }
2369:   }
2370: 
2371:   public function getName() {
2372:     return 'FacebookService_shutdown_args';
2373:   }
2374: 
2375:   public function read($input)
2376:   {
2377:     $xfer = 0;
2378:     $fname = null;
2379:     $ftype = 0;
2380:     $fid = 0;
2381:     $xfer += $input->readStructBegin($fname);
2382:     while (true)
2383:     {
2384:       $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2385:       if ($ftype == TType::STOP) {
2386:         break;
2387:       }
2388:       switch ($fid)
2389:       {
2390:         default:
2391:           $xfer += $input->skip($ftype);
2392:           break;
2393:       }
2394:       $xfer += $input->readFieldEnd();
2395:     }
2396:     $xfer += $input->readStructEnd();
2397:     return $xfer;
2398:   }
2399: 
2400:   public function write($output) {
2401:     $xfer = 0;
2402:     $xfer += $output->writeStructBegin('FacebookService_shutdown_args');
2403:     $xfer += $output->writeFieldStop();
2404:     $xfer += $output->writeStructEnd();
2405:     return $xfer;
2406:   }
2407: 
2408: }
2409: 
2410: class FacebookServiceProcessor {
2411:   protected $handler_ = null;
2412:   public function __construct($handler) {
2413:     $this->handler_ = $handler;
2414:   }
2415: 
2416:   public function process($input, $output) {
2417:     $rseqid = 0;
2418:     $fname = null;
2419:     $mtype = 0;
2420: 
2421:     $input->readMessageBegin($fname, $mtype, $rseqid);
2422:     $methodname = 'process_'.$fname;
2423:     if (!method_exists($this, $methodname)) {
2424:       $input->skip(TType::STRUCT);
2425:       $input->readMessageEnd();
2426:       $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
2427:       $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
2428:       $x->write($output);
2429:       $output->writeMessageEnd();
2430:       $output->getTransport()->flush();
2431:       return;
2432:     }
2433:     $this->$methodname($rseqid, $input, $output);
2434:     return true;
2435:   }
2436: 
2437:   protected function process_getName($seqid, $input, $output) {
2438:     $args = new FacebookService_getName_args();
2439:     $args->read($input);
2440:     $input->readMessageEnd();
2441:     $result = new FacebookService_getName_result();
2442:     $result->success = $this->handler_->getName();
2443:     $output->writeMessageBegin('getName', TMessageType::REPLY, $seqid);
2444:     $result->write($output);
2445:     $output->getTransport()->flush();
2446:   }
2447:   protected function process_getVersion($seqid, $input, $output) {
2448:     $args = new FacebookService_getVersion_args();
2449:     $args->read($input);
2450:     $input->readMessageEnd();
2451:     $result = new FacebookService_getVersion_result();
2452:     $result->success = $this->handler_->getVersion();
2453:     $output->writeMessageBegin('getVersion', TMessageType::REPLY, $seqid);
2454:     $result->write($output);
2455:     $output->getTransport()->flush();
2456:   }
2457:   protected function process_getStatus($seqid, $input, $output) {
2458:     $args = new FacebookService_getStatus_args();
2459:     $args->read($input);
2460:     $input->readMessageEnd();
2461:     $result = new FacebookService_getStatus_result();
2462:     $result->success = $this->handler_->getStatus();
2463:     $output->writeMessageBegin('getStatus', TMessageType::REPLY, $seqid);
2464:     $result->write($output);
2465:     $output->getTransport()->flush();
2466:   }
2467:   protected function process_getStatusDetails($seqid, $input, $output) {
2468:     $args = new FacebookService_getStatusDetails_args();
2469:     $args->read($input);
2470:     $input->readMessageEnd();
2471:     $result = new FacebookService_getStatusDetails_result();
2472:     $result->success = $this->handler_->getStatusDetails();
2473:     $output->writeMessageBegin('getStatusDetails', TMessageType::REPLY, $seqid);
2474:     $result->write($output);
2475:     $output->getTransport()->flush();
2476:   }
2477:   protected function process_getCounters($seqid, $input, $output) {
2478:     $args = new FacebookService_getCounters_args();
2479:     $args->read($input);
2480:     $input->readMessageEnd();
2481:     $result = new FacebookService_getCounters_result();
2482:     $result->success = $this->handler_->getCounters();
2483:     $output->writeMessageBegin('getCounters', TMessageType::REPLY, $seqid);
2484:     $result->write($output);
2485:     $output->getTransport()->flush();
2486:   }
2487:   protected function process_getCounter($seqid, $input, $output) {
2488:     $args = new FacebookService_getCounter_args();
2489:     $args->read($input);
2490:     $input->readMessageEnd();
2491:     $result = new FacebookService_getCounter_result();
2492:     $result->success = $this->handler_->getCounter($args->key);
2493:     $output->writeMessageBegin('getCounter', TMessageType::REPLY, $seqid);
2494:     $result->write($output);
2495:     $output->getTransport()->flush();
2496:   }
2497:   protected function process_setOption($seqid, $input, $output) {
2498:     $args = new FacebookService_setOption_args();
2499:     $args->read($input);
2500:     $input->readMessageEnd();
2501:     $result = new FacebookService_setOption_result();
2502:     $this->handler_->setOption($args->key, $args->value);
2503:     $output->writeMessageBegin('setOption', TMessageType::REPLY, $seqid);
2504:     $result->write($output);
2505:     $output->getTransport()->flush();
2506:   }
2507:   protected function process_getOption($seqid, $input, $output) {
2508:     $args = new FacebookService_getOption_args();
2509:     $args->read($input);
2510:     $input->readMessageEnd();
2511:     $result = new FacebookService_getOption_result();
2512:     $result->success = $this->handler_->getOption($args->key);
2513:     $output->writeMessageBegin('getOption', TMessageType::REPLY, $seqid);
2514:     $result->write($output);
2515:     $output->getTransport()->flush();
2516:   }
2517:   protected function process_getOptions($seqid, $input, $output) {
2518:     $args = new FacebookService_getOptions_args();
2519:     $args->read($input);
2520:     $input->readMessageEnd();
2521:     $result = new FacebookService_getOptions_result();
2522:     $result->success = $this->handler_->getOptions();
2523:     $output->writeMessageBegin('getOptions', TMessageType::REPLY, $seqid);
2524:     $result->write($output);
2525:     $output->getTransport()->flush();
2526:   }
2527:   protected function process_getCpuProfile($seqid, $input, $output) {
2528:     $args = new FacebookService_getCpuProfile_args();
2529:     $args->read($input);
2530:     $input->readMessageEnd();
2531:     $result = new FacebookService_getCpuProfile_result();
2532:     $result->success = $this->handler_->getCpuProfile($args->profileDurationInSec);
2533:     $output->writeMessageBegin('getCpuProfile', TMessageType::REPLY, $seqid);
2534:     $result->write($output);
2535:     $output->getTransport()->flush();
2536:   }
2537:   protected function process_aliveSince($seqid, $input, $output) {
2538:     $args = new FacebookService_aliveSince_args();
2539:     $args->read($input);
2540:     $input->readMessageEnd();
2541:     $result = new FacebookService_aliveSince_result();
2542:     $result->success = $this->handler_->aliveSince();
2543:     $output->writeMessageBegin('aliveSince', TMessageType::REPLY, $seqid);
2544:     $result->write($output);
2545:     $output->getTransport()->flush();
2546:   }
2547:   protected function process_getLimitedReflection($seqid, $input, $output) {
2548:     $args = new FacebookService_getLimitedReflection_args();
2549:     $args->read($input);
2550:     $input->readMessageEnd();
2551:     $result = new FacebookService_getLimitedReflection_result();
2552:     $result->success = $this->handler_->getLimitedReflection();
2553:     $output->writeMessageBegin('getLimitedReflection', TMessageType::REPLY, $seqid);
2554:     $result->write($output);
2555:     $output->getTransport()->flush();
2556:   }
2557:   protected function process_reinitialize($seqid, $input, $output) {
2558:     $args = new FacebookService_reinitialize_args();
2559:     $args->read($input);
2560:     $input->readMessageEnd();
2561:     $this->handler_->reinitialize();
2562:     return;
2563:   }
2564:   protected function process_shutdown($seqid, $input, $output) {
2565:     $args = new FacebookService_shutdown_args();
2566:     $args->read($input);
2567:     $input->readMessageEnd();
2568:     $this->handler_->shutdown();
2569:     return;
2570:   }
2571: }
2572: ?>
2573: 
API documentation generated by ApiGen