当前位置: 首页>>代码示例>>C++>>正文


C++ GetURL函数代码示例

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


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


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