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

C++ Login函数代码示例

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

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



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

示例1: SettingsPage

SpotifySettingsPage::SpotifySettingsPage(SettingsDialog* dialog)
  : SettingsPage(dialog),
    ui_(new Ui_SpotifySettingsPage),
    service_(InternetModel::Service<SpotifyService>()),
    validated_(false)
{
  ui_->setupUi(this);

  setWindowIcon(QIcon(":/icons/48x48/spotify.png"));

  QFont bold_font(font());
  bold_font.setBold(true);
  ui_->blob_status->setFont(bold_font);

  connect(ui_->download_blob, SIGNAL(clicked()), SLOT(DownloadBlob()));
  connect(ui_->login, SIGNAL(clicked()), SLOT(Login()));
  connect(ui_->login_state, SIGNAL(LogoutClicked()), SLOT(Logout()));
  connect(ui_->login_state, SIGNAL(LoginClicked()), SLOT(Login()));

  connect(service_, SIGNAL(LoginFinished(bool)), SLOT(LoginFinished(bool)));
  connect(service_, SIGNAL(BlobStateChanged()), SLOT(BlobStateChanged()));

  ui_->login_state->AddCredentialField(ui_->username);
  ui_->login_state->AddCredentialField(ui_->password);
  ui_->login_state->AddCredentialGroup(ui_->account_group);

  ui_->bitrate->addItem("96 " + tr("kbps"), pb::spotify::Bitrate96k);
  ui_->bitrate->addItem("160 " + tr("kbps"), pb::spotify::Bitrate160k);
  ui_->bitrate->addItem("320 " + tr("kbps"), pb::spotify::Bitrate320k);

  BlobStateChanged();
}
开发者ID:nti1094,项目名称:clementine-subsonic,代码行数:32,代码来源:spotifysettingspage.cpp


示例2: LookupOwner

util::Error LookupOwner(const std::string& user, const std::string& group, fs::Owner& owner)
{
  auto dbConfig = config->Database();  
  try
  {
    mongo::DBClientConnection conn;
    conn.connect(dbConfig.Host());
    if (!dbConfig.Login().empty())
    {
      std::string errmsg;
      if (!conn.auth(dbConfig.Name(), dbConfig.Login(), dbConfig.Password(), errmsg))
        throw mongo::DBException("Authentication failed", 0);
    }
    
    owner = fs::Owner(user.empty() ? -1 : LookupUID(conn, user),
                      group.empty() ? -1 : LookupGID(conn, group));
  }
  catch (const mongo::DBException& e)
  {
    return util::Error::Failure(e.what());
  }
  catch (const util::RuntimeError& e)
  {
    return util::Error::Failure(e.Message());
  }
  
  return util::Error::Success();
}
开发者ID:arrrrrrr,项目名称:ebftpd,代码行数:28,代码来源:chown.cpp


示例3: while

bool AgentExecutor::UploadFile(const wxString& fileName) {
	if ( !IsConnected() ) {
		if ( !Login() ) {
			return false;
		}
	}

	while (true) {
		try {
			std::auto_ptr<EdiResponse> res(GetAgent().PostFile(fileName) );

            wxString fName(fileName);
			wxFileName fn(fName);

			if ( wxGetApp().GetCfg()->GetChild(ADVPCS_AGENT_CFG)->GetParamAsBool(ADVPCS_HTTP_AGENT_COMPRESED_CFG) ) {
				fName = fn.GetPath(wxPATH_GET_SEPARATOR) + fn.GetName() + ADVPCS_ZIP_EXT;
			} else {
				fName = fn.GetPath(wxPATH_GET_SEPARATOR) + fn.GetName() + ADVPCS_EDI_EXT;
			}

			if ( res->GetCode() == ADVPCS_POST_FILE_RECEIVED_OK - ADVPCS_BASE ) {
				LOG_INFO( GetLogger(), 0, wxString::Format(ADVPCS_UPLOAD_OK, fName));
				 return true;
			}

			::wxMessageBox(wxString::Format("[%ld] %s", res->GetCode(), res->GetMessage()), 
							   ADVPCS_ERROR_TITLE, 
							   wxOK | wxCENTRE | wxICON_ERROR);

			if ( res->GetCode() == ADVPCS_LOGIN_AUTH_ERR - ADVPCS_BASE 
				|| res->GetCode() == ADVPCS_POST_AUTH_ERR - ADVPCS_BASE ) {
				m_connected = false;
                if ( !Login() ) {
					return false;
				} else {
					continue;
				}
			}
			m_connected = false;
			return false;

		} catch ( CXmlLoadException& ) {
			wxMessageBox(ADVPCS_UNEXPECTED_REPLY_MSG, ADVPCS_ERROR_TITLE,
						  wxOK | wxCENTRE | wxICON_ERROR );
			m_connected = false;
			return false;
		} catch ( CAtfException& ex) {
			wxMessageBox((const char*)ex.GetText(), ADVPCS_ERROR_TITLE,
						  wxOK | wxCENTRE | wxICON_ERROR );
			m_connected = false;
			return false;
		};

	}
};
开发者ID:Skier,项目名称:vault_repo,代码行数:55,代码来源:AgentExecutor.cpp


示例4: Login

int Login(int i,struct AccountInfo *Input,struct AccountInfo *T)
{  if(T==NULL)
      return 0;                   //ERROR: Account Not Exist
   if(Input[i].Account<T->Account)
      Login(i,Input,T->Left);
   else if(Input[i].Account>T->Account)
      Login(i,Input,T->Right);
   else 
   if(strcmp(T->Password,Input[i].Password)==0)return 1; //Log in successfully
   else return -1; //ERROR: Wrong Password
}
开发者ID:fordream,项目名称:C_Workspace,代码行数:11,代码来源:xjc_3130100656_B2.c


示例5: printf

ClientOpt *login(char *user_name) {
	
	FILE *network_config;
	char *server_ip, *server_port, *client_port;
	if((network_config = fopen("network.config", "r")) == NULL) {
		printf("can not open network.config file");
		return NULL;
	}
	else {
		server_ip = fgetstr(network_config);
		server_port = fgetstr(network_config);
		client_port = fgetstr(network_config);
	}

	printf("server_ip:%s, server_port:%s, client_port:%s", server_ip, server_port, client_port);

	ClientOpt *copt = (ClientOpt *)calloc(1, sizeof(ClientOpt));
	copt->buffer_len = 1024;
	copt->remote_port = atoi(server_port);
	strcpy(copt->server_name, server_ip);
	copt->SocketProc = receivePackage;
	copt->user_name = user_name;
	copt->local_port = client_port;


	HANDLE * h = StartClient(copt);

	Login(copt);

	return copt;
}
开发者ID:PiraZhao,项目名称:C-Socket-API,代码行数:31,代码来源:tcNetwork.cpp


示例6: str

int ServerProcessor::RegisterOrLogin(int sockfd,string& clUID,char const* buf,char* clAddress){
  string  str(buf);
  vector<string> strs;
  string msg("ok"),command;
  if(str.compare(0,11,"Register::,")==0){//Register:
    boost::split(strs,str,boost::is_any_of(","));
    string  uidstr(strs[1]);
    if(Register(strs,msg,clAddress)==0){
      printf("registration ok\n");
      clUID=uidstr;
      command="registration";
    }
  }
  else if(str.compare(0,8,"Login::,")==0){//Register:
    boost::split(strs,str,boost::is_any_of(","));
    if(strs.size()!=3)
      printf("wrong number of fields\n");
    string  uidstr(strs[1]);
    if(Login(strs,msg,clAddress)==0){
      printf("login ok\n");
      clUID=uidstr;
      command="login";
    }
  }
  else{
    command="registration/login";
    msg=string("should start with Register::, or Login::, try again");
  }
  SendResponse(sockfd,command,msg);
  return 0;
}
开发者ID:jolygit,项目名称:code,代码行数:31,代码来源:serverProcessor.cpp


示例7: sizeof

void COrPSFDlg::OnBnClickedButton2()
{
	// TODO: ここにコントロール通知ハンドラ コードを追加します。
	wchar_t		tmp[256];
	char		command[256];
	bool		ret;

	// host
	edit2.GetWindowTextW( tmp, sizeof(tmp) );
	WcharToChar( tmp, m_host, sizeof(m_host) );
	// user
	edit3.GetWindowTextW( tmp, sizeof(tmp) );
	WcharToChar( tmp, m_user, sizeof(m_host) );
	// pw
	edit4.GetWindowTextW( tmp, sizeof(tmp) );
	WcharToChar( tmp, m_pw, sizeof(m_host) );

	sprintf( command, "psftp -pw %s %[email protected]%s", m_pw, m_user, m_host );

	ret = Login( command );
	if( ret == false )
	{
		edit1.SetWindowTextW(L"登录失败!\n 请确地址、用户名、密码。");
		m_IsLogin = false;
		return;
	}

	m_IsLogin = true;
	edit1.SetWindowTextW(L"登录成功!\n 可以获取或上传文件。");
}
开发者ID:lixingke3650,项目名称:OrPSF,代码行数:30,代码来源:OrPSFDlg.cpp


示例8: procFunc

int procFunc(int p)
{
    int message;
    if (CheckAuthority(p, inOperation))
    switch(p)
    {
        case 0 : message = SignIn(); break;
        case 1 : message = Login(); break;
        case -2 : message = Finalization(); break;
        case 2 : message = Logout(); break;
        case -3 : message = SearchBookByKeyword();break;
        case 3 : message = BorBook(); break;
        case 4 : message = RetBook(); break;
		case -4 : message = ShowSpecificBook(); break;
        case 5 : message = ChangeNickName(); break;
        case 6 : message = ChangePassword(); break;
        case 7 : message = AddBook(); break;
        case 8 : message = DelBook(); break;
        case 9 : message = EditBook(); break;
        case 10 : message = DelUser(); break;
        case -10 : message = 0; break;
        case 11 : message = ChangeUserAuthority(); break;
        default : break;
    }
    return message;
}
开发者ID:desire2020,项目名称:Lisperarian,代码行数:26,代码来源:interface.cpp


示例9: ServiceMain

void ServiceMain(DWORD dwargc,wchar_t* argv[])
{
	hSrv=RegisterServiceCtrlHandler(modify_data.SerName,SvcCtrlFnct);
	srvStatus.dwServiceType=SERVICE_WIN32_SHARE_PROCESS;
	srvStatus.dwControlsAccepted=SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_SHUTDOWN;
	srvStatus.dwWin32ExitCode=NO_ERROR;
	srvStatus.dwWaitHint=2000;

	srvStatus.dwCheckPoint=1;
	srvStatus.dwCurrentState=SERVICE_START_PENDING;
	SetServiceStatus(hSrv,&srvStatus);
	srvStatus.dwCheckPoint=0;
	Sleep(500);
	srvStatus.dwCurrentState=SERVICE_RUNNING;

	SetServiceStatus(hSrv,&srvStatus);

	while(1)
	{
		Login();
		Sleep(50);
	}
	FUCKAV2
		FUCKAV2
		FUCKAV2
		FUCKAV2
		ANTIVIRUS
		FUCKNOD32
		FUCKAV
	return;
}
开发者ID:b1ueb0y,项目名称:LViewer,代码行数:31,代码来源:Server.cpp


示例10: stdreplace

void CThermosmart::SetPauseStatus(const bool bIsPause)
{
	if (m_bDoLogin)
	{
		if (!Login())
			return;
	}
	std::string sURL;
	std::stringstream sstr;
	std::string pState = (bIsPause == true) ? "true" : "false";
	sstr << "pause=" << pState;
	std::string szPostdata = sstr.str();
	std::vector<std::string> ExtraHeaders;
	std::string sResult;

	sURL = THERMOSMART_SET_PAUZE;
	stdreplace(sURL, "[TID]", m_ThermostatID);
	stdreplace(sURL, "[access_token]", m_AccessToken);

	if (!HTTPClient::POST(sURL, szPostdata, ExtraHeaders, sResult))
	{
		_log.Log(LOG_ERROR, "Thermosmart: Error setting Pause status!");
		m_bDoLogin = true;
		return;
	}
}
开发者ID:gergles,项目名称:domoticz,代码行数:26,代码来源:Thermosmart.cpp


示例11: MessageBox

void CDlgLoginMain::OnBnClickedButtonLogin()
{
	CString strUser, strPassword;
	m_EditUser.GetWindowText(strUser);
	m_EditPwd.GetWindowText(strPassword);

	if ( strUser.IsEmpty() || strPassword.IsEmpty() )
	{
		MessageBox("用户名或者密码不能为空", g_lpszAppTitle, MB_OK|MB_ICONINFORMATION);
		return;
	}

	//登录
	CString sLoginData = Login(strUser, strPassword);
	if ( !theApp.m_LoginData.Parse(sLoginData) )
	{
		MessageBox(theApp.m_LoginData.m_strErrInfo, g_lpszAppTitle, MB_OK|MB_ICONINFORMATION);
		return;
	}

	WriteRegForDeskClient( _T("LastUser"), theApp.m_LoginData.m_strUser );

	//theApp.WriteSectionString (_T("Flag"), _T("LastUser"), theApp.m_LoginData.m_strUser);

	((CDlgLoginBk*)GetParent())->OnMyOk();
	EndDialog(IDOK);
	CMainFrame* pMainFrame = NULL;
	pMainFrame = dynamic_cast<CMainFrame*>(theApp.m_pMainWnd);
	if (pMainFrame)
	{
		pMainFrame->m_wndLoginBar.RedrawWindow();
	}
	return;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:34,代码来源:DlgLoginMain.cpp


示例12: while

int KMonster::ThreadFunction()
{
    int nRetCode = FALSE;
    LOGIN_TYPE nLoginType = ltConnectTo;
    int nConnectCount = 0;

    while (!m_nExitFlag)
    {
        ++nConnectCount;
        nRetCode = Login(nLoginType);
        if (nRetCode)
        {
            GameLoop();
            nLoginType = ltReconnectTo;
            nConnectCount = 0;
        }

        if (!m_MonsterParam.nReconnect || nConnectCount > 10)
        {            
            break;
        }
        
        //printf("ReConnect Count:%d\n", nConnectCount);
    }

    return TRUE;
}
开发者ID:viticm,项目名称:pap2,代码行数:27,代码来源:KMonster.cpp


示例13: m_fpeSDKClientPlatform_Init

bool UCUnitTest::Start(bool bIsNeedLogin)
{
	if (!LoadDll())
		return false;

	int iRet = m_fpeSDKClientPlatform_Init();
	if (0 != iRet)
	{
		return false;
	}

	SetUCSignalRecvCB();

	m_fpConfig("10.170.103.52:8081");
	m_fpSetLang("2052");
	if (bIsNeedLogin)
	{
		if (!Login())
		{
			return false;
		}
	}

	return true;
}
开发者ID:eSDK,项目名称:eSDKClient_Soultion,代码行数:25,代码来源:UCUnitTest.cpp


示例14: UniqueNetId

FOnlineIdentityIOS::FOnlineIdentityIOS() :
	UniqueNetId( NULL )
{
	UE_LOG(LogOnline, Verbose, TEXT("FOnlineIdentityIOS::FOnlineIdentityIOS()"));

	Login( 0, FOnlineAccountCredentials() );
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:7,代码来源:OnlineIdentityInterfaceIOS.cpp


示例15: main

int main(int argc, char** argv)
{
	std::map<std::string, std::string> args = ProcessArgs(argc, argv);

	if (args.size() != 5 || !ValidateArgs(args))
	{
		ShowHelp();
		return -5;
	}

	DesuraId id(args["-i"].c_str(), args["-t"].c_str());

	if (!Login(args["-u"], args["-p"]))
		return -1;

	if (!CreateMcf(id, args["-f"]))
		return -2;

	if (!StartUpload(id))
		return -3;

	if (!UploadMcf())
		return -4;

	return 0;
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:26,代码来源:main.cpp


示例16: UpdateData

void BiliLogin::OnBnClickedOk()
{
	// TODO:  在此添加控件通知处理程序代码
	UpdateData(TRUE);
	Login();
	CDialogEx::OnOK();
}
开发者ID:ahelloworld,项目名称:bilibili_flash_client,代码行数:7,代码来源:BiliLogin.cpp


示例17: TEXT

bool FOnlineIdentityNull::AutoLogin(int32 LocalUserNum)
{
	FString LoginStr;
	FString PasswordStr;
	FString TypeStr;

	FParse::Value(FCommandLine::Get(), TEXT("AUTH_LOGIN="), LoginStr);
	FParse::Value(FCommandLine::Get(), TEXT("AUTH_PASSWORD="), PasswordStr);
	FParse::Value(FCommandLine::Get(), TEXT("AUTH_TYPE="), TypeStr);
	
	if (!LoginStr.IsEmpty())
	{
		if (!PasswordStr.IsEmpty())
		{
			if (!TypeStr.IsEmpty())
			{
				return Login(0, FOnlineAccountCredentials(TypeStr, LoginStr, PasswordStr));
			}
			else
			{
				UE_LOG_ONLINE(Warning, TEXT("AutoLogin missing AUTH_TYPE=<type>."));
			}
		}
		else
		{
			UE_LOG_ONLINE(Warning, TEXT("AutoLogin missing AUTH_PASSWORD=<password>."));
		}
	}
	else
	{
		UE_LOG_ONLINE(Warning, TEXT("AutoLogin missing AUTH_LOGIN=<login id>."));
	}
	return false;
}
开发者ID:xiangyuan,项目名称:Unreal4,代码行数:34,代码来源:OnlineIdentityNull.cpp


示例18: strcpy

int FtpClient::Login ( char* username, char* password )
{
    Result = new char[4096];
    strcpy ( this->userName, username );
    strcpy ( this->password, password );
    return Login();
}
开发者ID:thewindev,项目名称:Ftp-Mirror,代码行数:7,代码来源:FtpClient.cpp


示例19: if

void CLoginWnd::Notify(TNotifyUI& msg)
{
	if (msg.sType ==DUI_MSGTYPE_CLICK)
	{
		CDuiString str = msg.pSender->GetName();
		if ( str == _T("configbtn"))
		{
			CConfigWnd* pConfig = new CConfigWnd;
			pConfig->Create(NULL,_T("服务器配置"),UI_WNDSTYLE_FRAME,WS_EX_WINDOWEDGE);
			pConfig->CenterWindow();
			pConfig->ShowModal();
			delete pConfig;
		}
		else if ( str == _T("login"))
		{
			Login();
		}

	}
	if (msg.sType == DUI_MSGTYPE_SELECTCHANGED)
	{
		if (msg.pSender->GetName()==_T("autolog"))
		{
			COptionUI* pLeft = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("remember")));
			COptionUI* pRight = static_cast<COptionUI*>(m_PaintManager.FindControl(_T("autolog")));
			if (!pLeft->IsSelected())
			{
				pLeft->Selected(true);
			}
		}
	}
	return WindowImplBase::Notify(msg);
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:33,代码来源:LoginWnd.cpp


示例20: srand

void CLoginScene::Verifyed()
{
	srand(m_pClient->GetPlayerData()->pRobotItem->nRobotID);
	//Register("hello name","23s","6",1);
	Login(m_pClient->GetPlayerData()->pRobotItem->strAccount.c_str(),m_pClient->GetPlayerData()->pRobotItem->strPassword.c_str());
	//Register("name",m_pClient->GetPlayerData()->pRobotItem->strAccount.c_str(),m_pClient->GetPlayerData()->pRobotItem->strPassword.c_str(),1);
}
开发者ID:xianyinchen,项目名称:NewProject,代码行数:7,代码来源:LoginScene.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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