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

C++ GetURL函数代码示例

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

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



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

示例1: GetURL

string CWRequest::GetURL(string sParams, bool bRelative, bool bURLEncode)
{
    if(sParams == "")
        return GetURL(NULL, bRelative, bURLEncode);
    CWStringList params;
    params.SetText(sParams);
    return GetURL(&params, bRelative, bURLEncode);
}
开发者ID:invicnaper,项目名称:MWF,代码行数:8,代码来源:request.cpp


示例2: GetData

btData * MiniNovaParser::GetList() 
{
	string data = "";
	btData * list = NULL;


	data = GetData("http://mininova.org/yesterday/", GetURL());
	list = Parse(data);
	data = GetData(GetURL());
	list = Parse(data);
	return list;

}
开发者ID:vdrive,项目名称:TrapperKeeper,代码行数:13,代码来源:MiniNovaParser.cpp


示例3: sURL

//----------------------------------------------------------------------------
//  
STDMETHODIMP CAnchoBackgroundAPI::startBackgroundWindow(BSTR bsPartialURL)
{
  // it's safe to call this method multiple times, anyhow the window
  // will be created only once
  if (m_BackgroundWindow)
  {
    return S_OK;
  }
  CStringW sURL(bsPartialURL);
  if (!GetURL(sURL))
  {
    return E_FAIL;
  }

  // get the main api module and inject it into the background page
  CComPtr<IMagpieModuleRestricted> mainModule;
  IF_FAILED_RET(m_Magpie->GetModuleObject((LPOLESTR)s_AnchoMainAPIModuleID, &mainModule));

  CComPtr<IDispatch> mainModuleExports;
  IF_FAILED_RET(mainModule->GetExportsObject(&mainModuleExports));

  CComVariant vt;
  IF_FAILED_RET(mainModuleExports.GetPropertyByName(s_AnchoBackgroundPageAPIName, &vt));
  if (vt.vt != VT_DISPATCH)
  {
    return E_FAIL;
  }

  IF_FAILED_RET(CBackgroundWindow::CreateBackgroundWindow(vt.pdispVal, sURL, &m_BackgroundWindow.p));
  return S_OK;
}
开发者ID:bver,项目名称:ancho,代码行数:33,代码来源:AnchoBackgroundAPI.cpp


示例4: SetCurlHandleToDefaults

bool wxCurlFTP::Rename(const wxString& szRemoteLocName, 
                       const wxString& szRemoteFile /*= wxEmptyString*/)
{
	if(m_pCURL)
	{
		SetCurlHandleToDefaults(szRemoteFile);

        wxString url(GetURL().c_str(), wxConvUTF8);
		m_szCurrFullPath = url.BeforeLast('/');
		m_szCurrFullPath += wxS("/");
		m_szCurrFilename = url.AfterLast('/');

		if(m_szCurrFilename.IsEmpty())
			return false;

		AppendPostQuote(wxS("RNFR ") + m_szCurrFilename, true);
		AppendPostQuote(wxS("RNTO ") + szRemoteLocName);

		SetCurlHandleQuoteOpts();
		SetOpt(CURLOPT_NOBODY, TRUE);

		if(Perform())
		{
			ResetAllQuoteLists();

			return ((m_iResponseCode > 199) && (m_iResponseCode < 300));
		}

		ResetAllQuoteLists();
	}

	return false;
}
开发者ID:KastB,项目名称:OpenCPN,代码行数:33,代码来源:ftp.cpp


示例5: str

bool wxCurlFTP::RmDir(const wxString& szRemoteLoc /*= wxEmptyString*/)
{
	if(m_pCURL)
	{
        wxString str(szRemoteLoc);
		if(str.Last() != wxS('/'))
			str += wxS("/");
        SetCurlHandleToDefaults(str);

        wxString url(GetURL().c_str(), wxConvUTF8);
		m_szCurrFullPath = url.Left(url.Len() - 1).BeforeLast(wxS('/'));
		m_szCurrFullPath += wxS("/");
		m_szCurrFilename = url.Left(url.Len() - 1).AfterLast(wxS('/'));

		if(m_szCurrFilename.IsEmpty())
			return false;

		AppendPostQuote(wxS("RMD ") + m_szCurrFilename, true);

		SetCurlHandleQuoteOpts();
		SetOpt(CURLOPT_NOBODY, TRUE);

		if(Perform())
		{
			ResetAllQuoteLists();

			return ((m_iResponseCode > 199) && (m_iResponseCode < 300));
		}

		ResetAllQuoteLists();
	}

	return false;
}
开发者ID:KastB,项目名称:OpenCPN,代码行数:34,代码来源:ftp.cpp


示例6: CFURLGetFileSystemRepresentation

bool SFB::FileInputSource::_Open(CFErrorRef *error)
{
	UInt8 buf [PATH_MAX];
	Boolean success = CFURLGetFileSystemRepresentation(GetURL(), FALSE, buf, PATH_MAX);
	if(!success) {
		if(error)
			*error = CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainPOSIX, EIO, nullptr);
		return false;
	}

	mFile = unique_FILE_ptr(std::fopen((const char *)buf, "r"), std::fclose);
	if(!mFile) {
		if(error)
			*error = CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainPOSIX, errno, nullptr);
		return false;
	}

	if(-1 == stat((const char *)buf, &mFilestats)) {
		if(error)
			*error = CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainPOSIX, errno, nullptr);

		mFile.reset();

		return false;
	}

	return true;
}
开发者ID:sbooth,项目名称:SFBAudioEngine,代码行数:28,代码来源:FileInputSource.cpp


示例7: SetCurrentState

void FCrashUpload::PostReportComplete()
{
	if (PauseState == EUploadState::PostingReportComplete)
	{
		// Wait for confirmation
		SetCurrentState(EUploadState::WaitingToPostReportComplete);
		return;
	}

	AssignReportIdToPostDataBuffer();

	
	auto Request = CreateHttpRequest();
	Request->SetVerb( TEXT( "POST" ) );
	Request->SetURL(UrlPrefix / TEXT("UploadComplete"));
	Request->SetHeader( TEXT( "Content-Type" ), TEXT( "text/plain; charset=us-ascii" ) );
	Request->SetContent(PostData);
	UE_LOG( CrashReportClientLog, Log, TEXT( "Sending HTTP request: %s" ), *Request->GetURL() );

	if (Request->ProcessRequest())
	{
		SetCurrentState(EUploadState::PostingReportComplete);
	}
	else
	{
		CheckPendingReportsForFilesToUpload();
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:28,代码来源:CrashUpload.cpp


示例8: RETURN_IF_ERROR

OP_STATUS SpeedDialData::GenerateIDIfNeeded(BOOL force, BOOL use_hash, INT32 position)
{
	// generate a unique id
	if(force || GetUniqueID().IsEmpty())
	{
		if(use_hash && position > 0)
		{
			// Generate a hash based on the position and url, only call on upgrade from < 11.10
			// See https://ssl.opera.com:8008/developerwiki/Opera_Link/Speeddial_2.0#General_notes
			OpString8 str8, url, md5;

			RETURN_IF_ERROR(url.SetUTF8FromUTF16(GetURL()));
			RETURN_IF_ERROR(str8.AppendFormat("%d%s", position, url.CStr()));
			RETURN_IF_ERROR(OpMisc::CalculateMD5Checksum(str8.CStr(), str8.Length(), md5));

			md5.MakeUpper();

			RETURN_IF_ERROR(m_unique_id.Set(md5.CStr()));
		}
		else
		{
			// generate a default unique ID
			RETURN_IF_ERROR(StringUtils::GenerateClientID(m_unique_id));
		}
	}
	return OpStatus::OK;
}
开发者ID:prestocore,项目名称:browser,代码行数:27,代码来源:SpeedDialData.cpp


示例9: DragQueryFileACallback

///
///	@brief	드래그 앤 드롭으로 하는 파일 첨부 제어
///
UINT WINAPI DragQueryFileACallback(
								   _In_  HDROP  hDrop,
								   _In_  UINT   iFile,
								   _Out_ LPSTR lpszFile,
								   UINT   cch
								   )
{
	_TRACE(L"");
	CString strURL = GetURL();
	UINT uRet = 0;

	/// 파일 첨부 차단
	if(TRUE == pRule->IsBlockAttachFile())
	{
		/// 파일 첨부 허가 URL 검사
		if(TRUE == SearchStringFromFile(ALLOW_ATTACH_FILE_URL_TXT, strURL))
			uRet = DragQueryFileANext(hDrop, iFile, lpszFile, cch);
		else
		{
			AfxMessageBox(L"Mini-DLP에 의해 파일 첨부가 차단됩니다.");
			return 0;
		}
	}
	else
		uRet = DragQueryFileANext(hDrop, iFile, lpszFile, cch);

	/// 첨부 파일 로그를 남김
	if(TRUE == pRule->IsLoggingMail() && TRUE == pRule->IsLoggingAttachFile())
		if(NULL != lpszFile)
			MakeLogFile(LOG_WEB_FILE, (CString)lpszFile);

	return uRet;
};
开发者ID:devyyj,项目名称:Mini-DLP,代码行数:36,代码来源:Hooking.cpp


示例10: MOZ_ASSERT

NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(
    nsIRequest* request, nsIInputStream* aIStream, uint64_t sourceOffset,
    uint32_t aLength) {
  if (mRequests.IndexOfObject(request) == -1) {
    MOZ_ASSERT(false, "Received OnDataAvailable for untracked request.");
    return NS_ERROR_UNEXPECTED;
  }

  if (mRequestFailed) return NS_ERROR_FAILURE;

  nsresult rv = NS_OK;

  if (!mPStreamListener) return NS_ERROR_FAILURE;

  const char* url = nullptr;
  GetURL(&url);

  PLUGIN_LOG(PLUGIN_LOG_NOISY,
             ("nsPluginStreamListenerPeer::OnDataAvailable this=%p request=%p, "
              "offset=%" PRIu64 ", length=%u, url=%s\n",
              this, request, sourceOffset, aLength, url ? url : "no url set"));

  nsCOMPtr<nsIInputStream> stream = aIStream;
  rv = mPStreamListener->OnDataAvailable(this, stream, aLength);

  // if a plugin returns an error, the peer must kill the stream
  //   else the stream and PluginStreamListener leak
  if (NS_FAILED(rv)) {
    request->Cancel(rv);
  }

  return rv;
}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:33,代码来源:nsPluginStreamListenerPeer.cpp


示例11: GetURL

void CAddressBookDialog::Load(LPCTSTR lpszURL)
{
	if (!::IsWindow(m_hWnd))
		return;

	CString szURL = GetURL();
	if (szURL != lpszURL)
		SetURL(lpszURL, TRUE/*bNavigate*/);
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:9,代码来源:AddressBookDialog.cpp


示例12: CefString

std::string CefControlBase::GetUTF8URL()
{
	if (browser_handler_.get() && browser_handler_->GetBrowser().get())
	{
		return nbase::UTF16ToUTF8(std::wstring(GetURL().c_str()));
	}

	return CefString();
}
开发者ID:arlen7772gg,项目名称:NIM_Duilib_Framework,代码行数:9,代码来源:cef_control_base_ui.cpp


示例13: UE_LOG

void FHttpRequestWinInet::CancelRequest()
{
	UE_LOG(LogHttp, Log, TEXT("Canceling Http request. %p url=%s"),
			this, *GetURL());

	// force finish/cleanup of request
	// note: will still call completion delegates
	FinishedRequest();
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:9,代码来源:HttpWinInet.cpp


示例14: GetURL

int CEasyPDFCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (COleControl::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  在此添加您专用的创建代码
	GetURL();

	return 0;
}
开发者ID:SkyblueMr,项目名称:EasyPDF,代码行数:10,代码来源:EasyPDFCtrl.cpp


示例15: make_pair

std::pair<size_t, size_t>
CRepositoryBrowserSelection::FindURL (const CTSVNPath& url) const
{
    for (size_t i = 0, repoCount = GetRepositoryCount(); i < repoCount; ++i)
        for (size_t k = 0, pathCount = GetPathCount (i); k < pathCount; ++k)
            if (GetURL (i, k).IsEquivalentTo (url))
                return std::make_pair (i, k);

    return std::pair<size_t, size_t>((size_t)-1, (size_t)-1);
}
开发者ID:Kasper8660,项目名称:tortoisesvn,代码行数:10,代码来源:RepositoryBrowserSelection.cpp


示例16: GetData

btData * MyBittorrentParser::GetList() 
{
	string data = "";
	btData * list = NULL;


	data = GetData(GetURL());
	list = Parse(data);
	return list;

}
开发者ID:vdrive,项目名称:TrapperKeeper,代码行数:11,代码来源:MyBittorrentParser.cpp


示例17: GetURL

void wxHyperlinkCtrlBase::SendEvent()
{
    wxString url = GetURL();
    wxHyperlinkEvent linkEvent(this, GetId(), url);
    if (!GetEventHandler()->ProcessEvent(linkEvent))     // was the event skipped ?
    {
        if (!wxLaunchDefaultBrowser(url))
        {
            wxLogWarning(wxT("Could not launch the default browser with url '%s' !"), url.c_str());
        }
    }
}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:12,代码来源:hyperlnkcmn.cpp


示例18: GetURL

//SOCKET 数据读取////请求游戏全局参数
bool CCenterServerManage::OnSocketRead(NetMessageHead * pNetHead, void * pData, UINT uSize, ULONG uAccessIP, UINT uIndex, DWORD dwHandleID)
{
	if (pNetHead->bMainID==MDM_GP_REQURE_GAME_PARA)	////请求游戏全局参数
	{
		if (0 == uSize)
		{
			GetURL(NULL);
		}
		else
		{
			char * pBuf = (char*)pData;
			GetURL(pBuf);
		}

		RandAServer();
		m_TCPSocket.SendData(uIndex,&m_msgSendToClient,sizeof(CenterServerMsg),
			MDM_GP_REQURE_GAME_PARA,0,0,0);
		return true;
	}
	return false;
}
开发者ID:lincoln56,项目名称:robinerp,代码行数:22,代码来源:CenterServerManage.cpp


示例19: GetURL

void
WebExtensionPolicy::GetURL(const nsAString& aPath,
                           nsAString& aResult,
                           ErrorResult& aRv) const
{
  auto result = GetURL(aPath);
  if (result.isOk()) {
    aResult = result.unwrap();
  } else {
    aRv.Throw(result.unwrapErr());
  }
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:12,代码来源:WebExtensionPolicy.cpp


示例20: GetLabelForSysLink

void wxHyperlinkCtrl::SetLabel(const wxString &label)
{
    if ( !HasNativeHyperlinkCtrl() )
    {
        wxGenericHyperlinkCtrl::SetLabel( label );
        return;
    }

    m_labelOrig = label;
    wxWindow::SetLabel( GetLabelForSysLink(label, GetURL()) );
    InvalidateBestSize();
}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:12,代码来源:hyperlink.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetUniqueID函数代码示例发布时间:2022-05-30
下一篇:
C++ GetURI函数代码示例发布时间: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