• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ downloadFile函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中downloadFile函数的典型用法代码示例。如果您正苦于以下问题:C++ downloadFile函数的具体用法?C++ downloadFile怎么用?C++ downloadFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了downloadFile函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: asprintf

int LmcCom::getCover(MemoryStruct* cover, TrackInfo* track)
{
   char* url = 0;
   int status = fail;

   if (track && !isEmpty(track->artworkurl))
   {
      asprintf(&url, "http://%s:%d/%s", host, 9000, track->artworkurl);
      status = downloadFile(url, cover);
      free(url);
   }

   if (status != success)
   {
      // http://<server>:<port>/music/<track_id>/cover.jpg

      if (isEmpty(track->artworkTrackId))
         asprintf(&url, "http://%s:%d/music/%d/cover.jpg", host, 9000, track->id);
      else
         asprintf(&url, "http://%s:%d/music/%s/cover.jpg", host, 9000, track->artworkTrackId);

      status = downloadFile(url, cover);
      free(url);
   }

   return status;
}
开发者ID:horchi,项目名称:vdr-plugin-squeezebox,代码行数:27,代码来源:lmccom.c


示例2: QObject

Updater::Updater(const UpdateInformation &information, QObject *parent) : QObject(parent),
	m_transfer(NULL),
	m_transfersCount(0),
	m_transfersSuccessful(true)
{
	const QString path(QStandardPaths::writableLocation(QStandardPaths::TempLocation) + QLatin1String("/OtterBrowser/"));
	QDir directory(path);

	if (!directory.exists())
	{
		QDir().mkdir(path);
	}
	else if (directory.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries).count() > 0)
	{
		directory.setNameFilters(QStringList(QLatin1String("*.*")));
		directory.setFilter(QDir::Files);

		for (int i = 0; i < directory.entryList().count(); ++i)
		{
			directory.remove(directory.entryList().at(i));
		}
	}

	clearUpdate();

	downloadFile(information.scriptUrl, path);

	m_transfer = downloadFile(information.fileUrl, path);
	m_transfer->setUpdateInterval(500);

	connect(m_transfer, SIGNAL(progressChanged(qint64,qint64)), this, SLOT(updateProgress(qint64,qint64)));
}
开发者ID:elebow,项目名称:otter,代码行数:32,代码来源:Updater.cpp


示例3: DEBUG_UPDATE

boolean OTAUpdateClass::checkUpdate(void) {
    String vxp_name, vxp_digest;

    if(!downloadFile(UPDATE_MD5)) {
        return false;
    }

    if(!parseUpdateMD5(&vxp_name, &vxp_digest)) {
        return false;
    }

    if(checkMD5(this->firmware_name, vxp_digest.c_str())) {
        DEBUG_UPDATE("found no new firmware!\r\n");
        return false;
    }

    DEBUG_UPDATE("found a new firmware %s [%s]!\r\n", vxp_name.c_str(), vxp_digest.c_str());
    if(!downloadFile(UPDATE_VXP)) {
        return false;
    }

    if(!checkMD5("C:\\" UPDATE_VXP, vxp_digest.c_str())) {
        DEBUG_UPDATE("new firmware has a wrong md5sum!\r\n");
        return false;
    }

    DEBUG_UPDATE("new firmware is ok!\r\n");
    return true;
}
开发者ID:CanTireInnovations,项目名称:OTAUpdate,代码行数:29,代码来源:OTAUpdate.cpp


示例4: QLOG_INFO

void UpdaterComponent::downloadUpdate(const QVariantMap& updateInfo)
{
  if (isDownloading())
    return;

  QLOG_INFO() << updateInfo;

  if (!updateInfo.contains("version") ||
      !updateInfo.contains("manifestURL") || !updateInfo.contains("manifestHash") ||
      !updateInfo.contains("fileURL") || !updateInfo.contains("fileHash") || !updateInfo.contains("fileName"))
  {
    QLOG_ERROR() << "updateInfo was missing fields required to carry out this action.";
    return;
  }

  m_version = updateInfo["version"].toString();

  m_manifest = new Update(updateInfo["manifestURL"].toString(),
                          UpdateManager::GetPath("manifest.xml.bz2", m_version, false),
                          updateInfo["manifestHash"].toString(), this);

  // determine if we have a manifest (some distros don't like OE)
  m_hasManifest = ((!m_manifest->m_url.isEmpty()) && (!m_manifest->m_hash.isEmpty()));

  m_file = new Update(updateInfo["fileURL"].toString(),
                      UpdateManager::GetPath(updateInfo["fileName"].toString(), m_version, true),
                      updateInfo["fileHash"].toString(), this);


  if (m_hasManifest)
    connect(m_manifest, &Update::fileDone, this, &UpdaterComponent::fileComplete);

  connect(m_file, &Update::fileDone, this, &UpdaterComponent::fileComplete);

  // create directories we need
  QDir dr(QFileInfo(m_file->m_localPath).dir());
  if (!dr.exists())
  {
    if (!dr.mkpath("."))
    {
      QLOG_ERROR() << "Failed to create update directory:" << dr.absolutePath();
      emit downloadError("Failed to create download directory");
      return;
    }
  }

  // this will first check if the files are done
  // and in that case emit the done signal.
  if (fileComplete(NULL))
    return;

  if (!m_manifest->isReady() && m_hasManifest)
    downloadFile(m_manifest);

  if (!m_file->isReady())
    downloadFile(m_file);
}
开发者ID:FrancisGauthier,项目名称:plex-media-player,代码行数:57,代码来源:UpdaterComponent.cpp


示例5: _tmain

int _tmain(int argc, _TCHAR* argv[]) {
	if (argc == 1) {
		bool res = CheckNetWorkWell();
		printf("%d\n", res);
		return -1;
	}

	if (_tcscmp(argv[1], _T("/d")) == 0) {
		if (argc >= 5) {
			TCHAR * inUrl = argv[2];//下载地址
			TCHAR* filepath = argv[3];//文件保存路径
			TCHAR* uuid = argv[4];//文件编号
			TCHAR * file_name = NULL;//文件名

			if (argc > 6) {
				if (_tcscmp(argv[5], _T("/name")) == 0) {
					file_name = argv[6];
				} else {
					Log(_T("%s"), _T("参数传递错误,应该是/name"));
					return -1;
				}
			} else if (argc == 6) {
				Log(_T("%s"), _T("参数传递少,/name 后面应该有文件名"));
				return -1;
			}
			return  downloadFile(inUrl, filepath, uuid, file_name);
		}
	} else if (_tcscmp(argv[1], _T("/upload")) == 0) {
		char *uploadInfo = WcharToUTF8_New(argv[3]);
		//UploadInfo *info = new UploadInfo(argv[2], uploadInfo);
		UploadInfo info(argv[2], uploadInfo);
		UploadFile(&info);
		delete[]uploadInfo;
	} else {
		if (argc >= 4) {
			TCHAR * inUrl = argv[1];
			TCHAR* filepath = argv[2];
			TCHAR* uuid = argv[3];
			TCHAR * file_name = NULL;

			if (argc > 5) {
				if (_tcscmp(argv[4], _T("/name")) == 0) {
					file_name = argv[5];
				} else {
					Log(_T("%s"), _T("参数传递错误,应该是/name"));
					return -1;
				}
			} else if (argc == 5) {
				Log(_T("%s"), _T("参数传递少,/name 后面应该有文件名"));
				return -1;
			}
			return downloadFile(inUrl, filepath, uuid, file_name);
		}
	}
	return 0;
}
开发者ID:jishuo1213,项目名称:vcprojects,代码行数:56,代码来源:main.cpp


示例6: qDebug

void ftpClient::ftpCommandFinished(int commandId, bool error)
{
    if (ftp->currentCommand() == QFtp::ConnectToHost) {
        if (error) {
            qDebug()<<"FTP";
            qDebug()<<tr("Unable to connect to the FTP server "
                      "at %1. Please check that the host "
                      "name is correct.").arg(ftpServer);
            connectOrDisconnect();
            return;
        }
        qDebug()<<tr("Logged onto %1.").arg(ftpServer);
        return;
    }
//![6]

//![7]
    if (ftp->currentCommand() == QFtp::Login)
        ftp->list();
//![7]

//![8]
    if (ftp->currentCommand() == QFtp::Get) {
        if (error) {
           qDebug()<<tr("Canceled download of %1.").arg(file->fileName());
            file->close();
            file->remove();
        } else {
            qDebug()<<tr("Downloaded %1 to current directory.").arg(file->fileName());
            file->close();
            if(!f_list.isEmpty())
                downloadFile(); //Если есть еще файлы, то качаем
            else
            {
                delete file;
                qDebug()<<"end!!!"; /// А тут высылаем сигнал о выходе

                emit allDone(0,QProcess::NormalExit);
            }

        }

//![8]
//![9]
    } else if (ftp->currentCommand() == QFtp::List) {
//        if (isDirectory.isEmpty()) {
//            qDebug()<<tr("File scan ended!");
            downloadFile(); //начинаем скачку файлов
 //       }
    }
    //![9]
}
开发者ID:maxselym,项目名称:Magistral,代码行数:52,代码来源:ftpclient.cpp


示例7: QDialog

DBoxFE_ProfileWizard::DBoxFE_ProfileWizard( QDialog *parent, Qt::WFlags flags )
    : QDialog( parent, flags ) {

  // setup grafical user interface (gui)
  setupUi( this );

  page = 0;

  // for download game database file
  m_http = new QHttp( this );
  connect( m_http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( httpRequestFinished( int, bool ) ) );
  connect( m_http, SIGNAL( responseHeaderReceived( const QHttpResponseHeader & ) ), this, SLOT( readResponseHeader( const QHttpResponseHeader & ) ) );

  // connection
  connect( btnBack, SIGNAL( clicked() ), this, SLOT( slotBack() ) );
  connect( btnNext, SIGNAL( clicked() ), this, SLOT( slotNext() ) );
  connect( btnNext, SIGNAL( clicked() ), this, SLOT( slotFinish() ) );

  connect( btnHelp, SIGNAL( clicked() ), this, SLOT( slotHelp() ) );
  connect( btnAbort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) );
  connect( btnSelectDir, SIGNAL( clicked() ), this, SLOT( slotSelectDir() ) );
  connect( btnSearch, SIGNAL( clicked() ), this, SLOT( slotSearch() ) );

  // enable button
  btnNext->setEnabled( true );

  // center the wiget on desktop screen
  QDesktopWidget *desktop = qApp->desktop();
  const QRect rect = desktop->availableGeometry( desktop->primaryScreen() );
  int left = ( rect.width() - width() ) / 2;
  int top = ( rect.height() - height() ) / 2;
  setGeometry( left, top, width(), height() );

  downloadFile();
}
开发者ID:BackupTheBerlios,项目名称:dboxfe-svn,代码行数:35,代码来源:dboxfe_profilewizard.cpp


示例8: qDebug

int NetworkToolKits::HttpDownloadSimple(QString wgetPath, QString addr, QString outputFilePath)
{
    QString cmdLine = wgetPath+" "+addr+" --no-check-certificate -O "+outputFilePath;
    qDebug()<<"HttpDownloadSimple:"<<cmdLine;
    QProcess proc;
    proc.start(cmdLine);
    // Wait for process start
    if(!proc.waitForStarted()){
        qDebug()<<"process start failed";
        return PROCESS_START_FAILED;
    }

    QByteArray proc_output;
    while (false == proc.waitForFinished())
    {
       qDebug()<<"Process finish failed";
       return PROCESS_FINISH_FAILED;
    }

    proc_output = proc.readAll();
    QFile downloadFile(outputFilePath);
    if((!downloadFile.exists())||(downloadFile.size()==0)){
        qDebug()<<"download file failed";
        return DOWNLOAD_FAILED;
    }
    return NTK_OK;
}
开发者ID:hkutangyu,项目名称:IDA,代码行数:27,代码来源:networktoolkits.cpp


示例9: assert

void CModListView::loadScreenshots()
{
    if (ui->tabWidget->currentIndex() == 2 && ui->modInfoWidget->isVisible())
    {
        ui->screenshotsList->clear();
        QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
        assert(modModel->hasMod(modName)); //should be filtered out by check above

        for (QString & url : modModel->getMod(modName).getValue("screenshots").toStringList())
        {
            // URL must be encoded to something else to get rid of symbols illegal in file names
            auto hashed = QCryptographicHash::hash(url.toUtf8(), QCryptographicHash::Md5);
            auto hashedStr = QString::fromUtf8(hashed.toHex());

            QString fullPath = CLauncherDirs::get().downloadsPath() + '/' + hashedStr + ".png";
            QPixmap pixmap(fullPath);
            if (pixmap.isNull())
            {
                // image file not exists or corrupted - try to redownload
                downloadFile(hashedStr + ".png", url, "screenshots");
            }
            else
            {
                // managed to load cached image
                QIcon icon(pixmap);
                QListWidgetItem * item = new QListWidgetItem(icon, QString(tr("Screenshot %1")).arg(ui->screenshotsList->count() + 1));
                ui->screenshotsList->addItem(item);
            }
        }
    }
}
开发者ID:RoRElessar,项目名称:vcmi,代码行数:31,代码来源:cmodlistview_moc.cpp


示例10: bootstrapDataIsAvailable

// retrieve bootstrapinfo from manifest
bool bootstrapDataIsAvailable(BootstrapInfo &bootstrapInfo)
{
    if (!bootstrapInfo.data.empty()) {
        return true;
    }

    if (bootstrapInfo.url.empty()) {
        return false;
    }

    // download it
    long status;
    bootstrapInfo.data = downloadFile(NULL, bootstrapInfo.url, status);
    if (status != 200) {
        std::cerr << __func__ << " http status " << status << std::endl;
        if (!bootstrapInfo.data.empty()) {
            // dump http if any
            std::cerr << std::string(&(bootstrapInfo.data)[0], &(bootstrapInfo.data)[0] + (bootstrapInfo.data).size()) << std::endl;
            bootstrapInfo.data.clear();
        }
        return false;
    }
    if (bootstrapInfo.data.empty()) {
        return false;
    }

    return true;
}
开发者ID:rafirafi,项目名称:libf4mparser,代码行数:29,代码来源:main.cpp


示例11: downloadCallback

static void downloadCallback(WMWidget * w, void *data)
{
	_Panel *panel = (_Panel *) data;
	pid_t newPid;
	WMButton *button = (WMButton *) w;
	pid_t *pid;

	if (button == panel->totB) {
		pid = &panel->tilePID;
	} else {
		pid = &panel->barPID;
	}

	if (*pid == 0) {
		newPid = downloadFile(WMWidgetScreen(w), panel, NULL);
		if (newPid < 0) {
			return;
		}
		WMSetButtonText(button, _("Stop"));

		if (button == panel->totB) {
			AddDeadChildHandler(newPid, finishedTileDownload, data);
		} else {
			AddDeadChildHandler(newPid, finishedBarDownload, data);
		}
		*pid = newPid;
	} else {
		*pid = 0;

		WMSetButtonText(button, _("Download"));
	}
}
开发者ID:jafd,项目名称:wmaker,代码行数:32,代码来源:Themes.c


示例12: switch

int SyncTabWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QTabWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_pushButton_4_clicked(); break;
        case 1: on_pushButton_3_clicked(); break;
        case 2: on_pushButton_2_clicked(); break;
        case 3: on_pushButton_clicked(); break;
        case 4: downloadFile(); break;
        case 5: cancelDownload(); break;
        case 6: httpFinished(); break;
        case 7: httpReadyRead(); break;
        case 8: updateDataReadProgress((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break;
        case 9: enableDownloadButton(); break;
        case 10: slotAuthenticationRequired((*reinterpret_cast< QNetworkReply*(*)>(_a[1])),(*reinterpret_cast< QAuthenticator*(*)>(_a[2]))); break;
        case 11: error((*reinterpret_cast< QNetworkReply::NetworkError(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 12;
    }
    return _id;
}
开发者ID:kmdarshan,项目名称:qt-based-project,代码行数:25,代码来源:moc_synctabwidget.cpp


示例13: QAction

void FtpApp::createActions()
{
    refresh = new QAction("&Refresh",this);
    refresh->setStatusTip("Refresh the list of files");
    refresh->setShortcut(Qt::Key_F5);
    connect(refresh,SIGNAL(triggered()),this,SLOT(refreshList()));

    quitAction = new QAction(tr("&Quit"),this);
    quitAction->setStatusTip("Quit the JIGS File Sharing");
    quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
    connect(quitAction, SIGNAL(triggered()), this, SLOT(quit()));

    aboutAction=new QAction(tr("&About"),this);
    aboutAction->setStatusTip("About JIGS File Sharing");
    connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutPopup()));

    uploadFileAction=new QAction("&Upload Single File",this);
    uploadFileAction->setShortcut(Qt::CTRL + Qt::Key_U);
    uploadFileAction->setStatusTip("Upload a single File to the FTP Server");
    connect(uploadFileAction,SIGNAL(triggered()),this,SLOT(uploadFile()));

    downloadFileAction = new QAction("&Download Single File",this);
    downloadFileAction->setShortcut(Qt::CTRL + Qt::Key_D);
    downloadFileAction->setStatusTip("Download a single file from FTP sever");
    connect(downloadFileAction,SIGNAL(triggered()),this,SLOT(downloadFile()));
}
开发者ID:gauravdeshmukh,项目名称:FileSharing,代码行数:26,代码来源:MainFrame.cpp


示例14: foreach

bool DcSoftwareUpdate::downloadPackage( DcPackageIndex::DcPackageDesc desc)
{
    // TODO: Add progress reporting to this method via some optional method.
    
    // The method relies on a remote web server so there are many reasons for
    // failure.  TODO: provide a method to report failures.

    
    bool rtval = false;

    if(!desc.isEmpty())
    {
        if(verifyLocalPath(desc))
        {
            QString baseUrl = _swPackageIndex.getBaseUrl(desc);
            QStringList lst = _swPackageIndex.getFileList(desc);
            foreach(QString f, lst)
            {
                QString dest = appendWithLocalPath(desc,f);
                if(downloadFile(baseUrl+f,dest))
                {
                   rtval = true;     
                }
            }
        }
    }
开发者ID:stanciuadrian,项目名称:spl,代码行数:26,代码来源:DcSoftwareUpdate.cpp


示例15: ExecGet

// download a file, i.e., get it from remote FS
INT ExecGet(PAIO_DEV sock, PSERVICE_CONTEXT sc) {
	int status = STATUS_OK;
	HANDLE hFile= NULL;

	int fileSize = getFileSize(sc->req.fileName);
	if (fileSize == -1) status = FS_ERROR;
	else {
		hFile = CreateFileA(sc->req.fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
		if (hFile == INVALID_HANDLE_VALUE) {
			printf("Error %d opening file %s!\n", GetLastError(), sc->req.fileName);
			status = FS_ERROR;
		}
	}

	// Start send Response
	_itoa_s(status, sc->resp.status, 10);
	_itoa_s(fileSize, sc->resp.dataSize, 10);
	if (!writeResponse(sock->dev, &sc->resp)) status = IO_ERROR;

	if (status == STATUS_OK)
		status = downloadFile(hFile, (SOCKET) sock->dev, fileSize);
	CloseHandle(hFile);
	
	return status;
}
开发者ID:PedroATavares,项目名称:SO,代码行数:26,代码来源:FSCloudService.cpp


示例16: doc

void ImageProcessing::contentListDownloadComplete()
{
	QXmlStreamReader doc(m_contentList->downloadedData());
	m_ImageList.clear();
	m_delList.clear();

	if (doc.hasError()) {
		qWarning() << __FUNCTION__ << ": Downloaded xml has errors";
		return;
	}
	else {
		while (!doc.atEnd() && !doc.hasError()) {
			QXmlStreamReader::TokenType token = doc.readNext();
			if (token == QXmlStreamReader::StartDocument)
				continue;

			if (token == QXmlStreamReader::StartElement) {
				if (doc.name() == "Url") {
					QUrl url(doc.readElementText());
					if (url.isValid()) {
						m_ImageList[url.fileName()] = url.toDisplayString();
						m_delList << url.fileName();
					}
				}
			}
		}
		qWarning() << __FUNCTION__ << ": parsed contentlist.xml for" << m_ImageList.size() << "elements";
		downloadFile();
	}
}
开发者ID:buelowp,项目名称:pictureframe,代码行数:30,代码来源:ImageProcessing.cpp


示例17: ClientInfoBase

ClientInfo::ClientInfo( QWidget *parent, const char *name ) :
    ClientInfoBase( parent, name )
{
    connect( btnOpen, SIGNAL(clicked()), SLOT(downloadFile()) );
    connect( btnQuit, SIGNAL(clicked()), qApp, SLOT(quit()) );
    connect( &op, SIGNAL( data( const QByteArray &, QNetworkOperation * ) ),
	     this, SLOT( newData( const QByteArray & ) ) );
}
开发者ID:nightfly19,项目名称:renyang-learn,代码行数:8,代码来源:client.cpp


示例18: processRSSList

PRIVATE void processRSSList(auto_handle *session, const simple_list items, uint16_t feedID) {
   simple_list current_item = items;
   simple_list current_url = NULL;
   am_filter filter = NULL;
   const char * url;
   char path[4096];
   HTTPResponse *response = NULL;

   while(current_item && current_item->data) {
      feed_item item = (feed_item)current_item->data;
      current_url = item->urls;
      while(current_url && current_url->data)
      {
         url = (const char*)current_url->data;
         if(isMatch(session->filters, url, &filter)) {
            if(!session->match_only) {
               get_filename(path, NULL, url, session->download_folder);
               if (!has_been_downloaded(session->downloads, url) && !file_exists(path)) {
                  dbg_printft(P_MSG, "[%d] Found new download: %s (%s)", feedID, item->name, url);
                  response = downloadFile(url, path, filter->agent);
                  if(response) {
                     if(response->responseCode == 200) {
                        if(session->prowl_key_valid) {
                           prowl_sendNotification(PROWL_NEW_TRAILER, session->prowl_key, item->name);
                        }

                        if(session->download_done_script && *(session->download_done_script))
                        {
                          callDownloadDoneScript(session->download_done_script, path);
                        }

                        dbg_printf(P_MSG, "  Download complete (%dMB) (%.2fkB/s)", response->size / 1024 / 1024, response->downloadSpeed / 1024);
                        /* add url to bucket list */
                        if (addToBucket(url, &session->downloads, session->max_bucket_items) == 0) {
                           session->bucket_changed = 1;
                           save_state(session->statefile, session->downloads);
                        }
                     } else {
                        dbg_printf(P_ERROR, "  Error: Download failed (Error Code %d)", response->responseCode);
                        if(session->prowl_key_valid) {
                           prowl_sendNotification(PROWL_DOWNLOAD_FAILED, session->prowl_key, item->name);
                        }
                     }

                     HTTPResponse_free(response);
                  }
               } else {
                 dbg_printf(P_MSG, "File downloaded previously: %s", basename(path));
               }
            } else {
               dbg_printft(P_MSG, "[%s] Match: %s (%s)", feedID, item->name, url);
            }
         }
         current_url = current_url->next;
      }
      current_item = current_item->next;
   }
}
开发者ID:1100101,项目名称:trailermatic,代码行数:58,代码来源:trailermatic.c


示例19: file

// --- Downloads ----------------------------------------------------------- //
/// Downloads and returns the molecule with the compound ID \p id.
/// If an error occurs a null pointer is returned.
boost::shared_ptr<Molecule> PubChem::downloadMolecule(const QString &id) const
{
    QScopedPointer<MoleculeFile> file(downloadFile(id));
    if(!file){
        return boost::shared_ptr<Molecule>();
    }

    return file->molecule();
}
开发者ID:NabilNoaman,项目名称:chemkit,代码行数:12,代码来源:pubchem.cpp


示例20: removeFile

void MainWindow::downloadXsdFile( const QString &s_Path, const QString &s_XmlSchema )
{
    QString s_Filename = s_Path + "/" + s_XmlSchema;

// ******************************************************************************************************

    removeFile( s_Filename );

    downloadFile( findCurl(), QLatin1String( "https://store.pangaea.de/software/" ) + QCoreApplication::applicationName() + "/" + s_XmlSchema, s_Filename );
}
开发者ID:rsieger,项目名称:PanXML,代码行数:10,代码来源:BuildXmlEntry.cpp



注:本文中的downloadFile函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ downloadFinished函数代码示例发布时间:2022-05-30
下一篇:
C++ download函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap