void onRtfCompleted( RCF::Future<Void> fv, RcfClientPtr rtfClientPtr, ClientStub & clientStubOrig, boost::shared_ptr<std::vector<FilterPtr> > filters, boost::function0<void> onCompletion) { ClientStubPtr rtfStubPtr = rtfClientPtr->getClientStubPtr(); clientStubOrig.setTransport( rtfStubPtr->releaseTransport() ); clientStubOrig.setSubRcfClientPtr( RcfClientPtr() ); std::auto_ptr<Exception> ePtr = fv.getAsyncException(); if ( ePtr.get() ) { clientStubOrig.setAsyncException(ePtr); } else { // Get OOB response. OobRequestTransportFilters msg(clientStubOrig.getRuntimeVersion()); ByteBuffer controlResponse = rtfStubPtr->getOutOfBandResponse(); rtfStubPtr->setOutofBandRequest(ByteBuffer()); rtfStubPtr->setOutofBandResponse(ByteBuffer()); msg.decodeResponse(controlResponse); int ret = msg.mResponseError; if (ret != RcfError_Ok) { std::auto_ptr<Exception> ePtr( new RemoteException(Error(ret)) ); clientStubOrig.setAsyncException(ePtr); } else { for (std::size_t i=0; i<filters->size(); ++i) { (*filters)[i]->resetState(); } clientStubOrig.getTransport().setTransportFilters(*filters); } } onCompletion(); }
void ScrollBar::DoScroll(bool bUpdate) { bool bAutoDel = SetAutoDelete(false); suic::ElementPtr ePtr(this); if (Scroll) { ui::ScrollEventArg scrollEvt(_scroInfo.iVisualPos); Scroll(ePtr, scrollEvt); } if (bUpdate) { UpdateScrollBar(); } InvalidateVisual(); SetAutoDelete(bAutoDel); }
void SubscriptionService::doRequestSubscriptionAsync_Complete( Future<Void> fv, RcfClientPtr requestClientPtr, const std::string & publisherName, RcfClientPtr rcfClientPtr, OnSubscriptionDisconnect onDisconnect, OnAsyncSubscribeCompleted onCompletion) { bool pingsEnabled = true; boost::uint32_t ret = 0; boost::uint32_t pubToSubPingIntervalMs = 0; ExceptionPtr ePtr( fv.getAsyncException().release() ); if (!ePtr) { // Get OOB response. ClientStub & stub = requestClientPtr->getClientStub(); OobRequestSubscription msg(stub.getRuntimeVersion()); ByteBuffer controlResponse = stub.getOutOfBandResponse(); stub.setOutofBandRequest(ByteBuffer()); stub.setOutofBandResponse(ByteBuffer()); msg.decodeResponse(controlResponse); ret = msg.mResponseError; pubToSubPingIntervalMs = msg.mPubToSubPingIntervalMs; } createSubscriptionImplEnd( ePtr, requestClientPtr->getClientStubPtr(), ret, publisherName, rcfClientPtr, onDisconnect, onCompletion, pubToSubPingIntervalMs, pingsEnabled); }
void WebEventListener::handleEvent(WebCore::ScriptExecutionContext* s, WebCore::Event* e) { RefPtr<WebCore::Event> ePtr(e); COMPtr<IDOMEvent> domEvent = DOMEvent::createInstance(ePtr); m_iDOMEventListener->handleEvent(domEvent.get()); }