void SftpChannelPrivate::handleCurrentPacket() { #ifdef CREATOR_SSH_DEBUG qDebug("Handling SFTP packet of type %d", m_incomingPacket.type()); #endif switch (m_incomingPacket.type()) { case SSH_FXP_VERSION: handleServerVersion(); break; case SSH_FXP_HANDLE: handleHandle(); break; case SSH_FXP_NAME: handleName(); break; case SSH_FXP_STATUS: handleStatus(); break; case SSH_FXP_DATA: handleReadData(); break; case SSH_FXP_ATTRS: handleAttrs(); break; default: throw SshServerException(SSH_DISCONNECT_PROTOCOL_ERROR, "Unexpected packet.", tr("Unexpected packet of type %1.").arg(m_incomingPacket.type())); } }
void GlobalsSubStreamHandler::handleRecord(Record* record) { if (!record) return; const unsigned type = record->rtti(); if (type == BOFRecord::id) handleBOF(static_cast<BOFRecord*>(record)); else if (type == BoundSheetRecord::id) handleBoundSheet(static_cast<BoundSheetRecord*>(record)); else if (type == ExternBookRecord::id) handleExternBook(static_cast<ExternBookRecord*>(record)); else if (type == ExternNameRecord::id) handleExternName(static_cast<ExternNameRecord*>(record)); else if (type == ExternSheetRecord::id) handleExternSheet(static_cast<ExternSheetRecord*>(record)); else if (type == FilepassRecord::id) handleFilepass(static_cast<FilepassRecord*>(record)); else if (type == FormatRecord::id) handleFormat(static_cast<FormatRecord*>(record)); else if (type == FontRecord::id) handleFont(static_cast<FontRecord*>(record)); else if (type == NameRecord::id) handleName(static_cast<NameRecord*>(record)); else if (type == PaletteRecord::id) handlePalette(static_cast<PaletteRecord*>(record)); else if (type == SSTRecord::id) handleSST(static_cast<SSTRecord*>(record)); else if (type == XFRecord::id) handleXF(static_cast<XFRecord*>(record)); else if (type == ProtectRecord::id) handleProtect(static_cast<ProtectRecord*>(record)); else if (type == MsoDrawingGroupRecord::id) handleMsoDrawingGroup(static_cast<MsoDrawingGroupRecord*>(record)); else if (type == Window1Record::id) handleWindow1(static_cast<Window1Record*>(record)); else if (type == PasswordRecord::id) handlePassword(static_cast<PasswordRecord*>(record)); else if (type == DateModeRecord::id) handleDateMode(static_cast<DateModeRecord*>(record)); else if (type == 0x40) {} //BackupRecord else if (type == 0xA) {} //EofRecord //else if (type == 0xEC) Q_ASSERT(false); // MsoDrawing else { //std::cout << "Unhandled global record with type=" << type << " name=" << record->name() << std::endl; } }
InternalRep::InternalRep ( Tcl_Interp *interp, Tcl_ObjCmdProc *pCmdProc, ClientData objClientData): m_interp(interp), m_clientData(objClientData), m_handleCount(0) { std::string handleName(name()); m_command = Tcl_CreateObjCommand( m_interp, const_cast<char *>(handleName.c_str()), pCmdProc, objClientData, 0); m_pNameEntry = HandleNameToRepMap::instance(interp)->insert( handleName.c_str(), this); }