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

C++ AddHeader函数代码示例

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

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



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

示例1: switch

/*! \brief Build the code that creates the control.
 *
 * \return void
 *
 */
void wxsLinearRegulator::OnBuildCreatingCode()
{
    switch(GetLanguage())
    {
        case wxsCPP:
        {
            AddHeader(_T("\"wx/KWIC/LinearRegulator.h\""), GetInfo().ClassName);
            Codef(_T("%C(%W,%I,%P,%S, %s);\n"), wxT("wxBORDER_NONE"));

            // Default range is 0-100.
            if(m_iRangeMin != 0 || m_iRangeMax != 100){
                Codef(_T("%ASetRangeVal(%d, %d);\n"), static_cast<int>(m_iRangeMin), static_cast<int>(m_iRangeMax));
            }
            if(!m_bHorizontal){
                Codef(_T("%ASetOrizDirection(false);\n"));
            }
            if(!m_bShowVal){
                Codef(_T("%AShowCurrent(false);\n"));
            }
            if(!m_bShowLimits){
                Codef(_T("%AShowLimits(false);\n"));
            }
            wxString ss = m_cdActiveBarColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetActiveBarColour(%s);\n"), ss.wx_str());
            ss = m_cdPassiveBarColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetPassiveBarColour(%s);\n"), ss.wx_str());
            ss = m_cdBorderColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetBorderColour(%s);\n"), ss.wx_str());
            ss = m_cdLimitTextColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetTxtLimitColour(%s);\n"), ss.wx_str());
            ss = m_cdValueTextColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetTxtValueColour(%s);\n"), ss.wx_str());
            ss = m_cdTagColour.BuildCode(GetCoderContext());
            if(!ss.IsEmpty()) Codef(_T("%ASetTagsColour(%s);\n"), ss.wx_str());
            for(size_t i = 0; i < m_arrTags.Count(); i++){
                TagDesc *Desc = m_arrTags[i];
                Codef(_T("\t%AAddTag(%d);\n"), Desc->val);
            }
            ss = GetCoderContext()->GetUniqueName(_T("LinearRegulatorFont"));
            wxString sFnt = m_fnt.BuildFontCode(ss, GetCoderContext());
            if(sFnt.Len() > 0)
            {
                Codef(_T("%s"), sFnt.wx_str());
                Codef(_T("%ASetTxtFont(%s);\n"), ss.wx_str());
            }
            // Value needs to be set after other params for correct display.
            if(m_iValue){
                Codef(_T("%ASetValue(%d);\n"), static_cast<int>(m_iValue));
            }

            BuildSetupWindowCode();
            break;
        }
        case wxsUnknownLanguage: // fall-through
        default:
            wxsCodeMarks::Unknown(_T("wxsLinearRegulator::OnBuildCreatingCode"), GetLanguage());
    }
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:63,代码来源:wxslinearregulator.cpp


示例2: switch

/*! \brief Create the dialogue.
 *
 * \return void
 *
 */
void wxsPrintDialog::OnBuildCreatingCode()
{
    switch ( GetLanguage() )
    {
        case wxsCPP:
        {
            AddHeader(_T("<wx/printdlg.h>"),GetInfo().ClassName,hfInPCH);

            wxString sDataName = GetCoderContext()->GetUniqueName(_T("printDialogData"));
            AddDeclaration(wxString::Format(wxT("wxPrintDialogData  *%s;"), sDataName.wx_str()));
            Codef(_T("\t%s = new wxPrintDialogData;\n"), sDataName.wx_str());

            if(m_bEnableHelp){
                Codef(_T("\t%s->EnableHelp(%b);\n"), sDataName.wx_str(), m_bEnableHelp);
            }
            if(!m_bEnablePageNumbers){
                Codef(_T("\t%s->EnablePageNumbers(%b);\n"), sDataName.wx_str(), m_bEnablePageNumbers);
            }
            if(!m_bEnablePrintToFile){
                Codef(_T("\t%s->EnablePrintToFile(%b);\n"), sDataName.wx_str(), m_bEnablePrintToFile);
            }
            if(m_bEnableSelection){
                Codef(_T("\t%s->EnableSelection(%b);\n"), sDataName.wx_str(), m_bEnableSelection);
                if(m_bSelection){
                    Codef(_T("\t%s->SetSelection(%b);\n"), sDataName.wx_str(), m_bSelection);
                }
            }
            if(m_bCollate){
                Codef(_T("\t%s->SetCollate(%b);\n"), sDataName.wx_str(), m_bCollate);
            }
            if(m_iFromPage > 0){
                Codef(_T("\t%s->SetFromPage(%d);\n"), sDataName.wx_str(), m_iFromPage);
            }
            if(m_iToPage > 0){
                Codef(_T("\t%s->SetToPage(%d);\n"), sDataName.wx_str(), m_iToPage);
            }
            if(m_iMinPage > 0){
                Codef(_T("\t%s->SetMinPage(%d);\n"), sDataName.wx_str(), m_iMinPage);
            }
            if(m_iMaxPage > 0){
                Codef(_T("\t%s->SetMaxPage(%d);\n"), sDataName.wx_str(), m_iMaxPage);
            }
            if(m_iNoCopies > 1){
                Codef(_T("\t%s->SetNoCopies(%d);\n"), sDataName.wx_str(), m_iNoCopies);
            }

            Codef(_T("%C(%W, %v);\n"), sDataName.wx_str());
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsPrintDialog::OnBuildCreatingCode"),GetLanguage());
        }
    }
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:62,代码来源:wxsprintdialog.cpp


示例3: SHVVA_START

/*************************************
 * AddHeader
 *************************************/
void SHVTestLoggerConsole::AddHeader(const SHVTChar* s, ...)
{
SHVString str;
	SHVVA_LIST args;
	SHVVA_START(args, s);
	str.FormatList(s,args);
	AddHeader(str);
	SHVVA_END(args);
}
开发者ID:ElmerFuddDK,项目名称:libshiva,代码行数:12,代码来源:shvtestloggerconsole.cpp


示例4: switch

void wxsCalendarCtrl::OnBuildCreatingCode()
{
    switch ( GetLanguage() )
    {
        case wxsCPP:
        {
            AddHeader(_T("<wx/calctrl.h>"),GetInfo().ClassName,0);
            AddHeader(_T("<wx/calctrl.h>"),_T("wxCalendarEvent"),0);
            Codef(_T("%C(%W, %I, wxDefaultDateTime, %P, %S, %T, %N);\n"));
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsCalendarCtrl::OnBuildCreatingCode"),GetLanguage());
        }
    }
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:19,代码来源:wxscalendarctrl.cpp


示例5: switch

void wxsTimePickerCtrl::OnBuildCreatingCode()
{
    switch ( GetLanguage() )
    {
        case wxsCPP:
        {
            AddHeader(_T("<wx/timectrl.h>"),GetInfo().ClassName,0);
            AddHeader(_T("<wx/dateevt.h>"),_T("wxDateEvent"),0);
            Codef(_T("%C(%W, %I, wxDateTime::Now(), %P, %S, %T, %V, %N);\n"));
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsTimePickerCtrl::OnBuildCreatingCode"),GetLanguage());
        }
    }
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:19,代码来源:wxsTimePickerCtrl.cpp


示例6: astman_get_header

void *ProxyLogoff(struct mansession *s, struct message *m) {
	struct message mo;
	char *actionid = actionid = astman_get_header(m, "ActionID");
 
	memset(&mo, 0, sizeof(struct message));
	AddHeader(&mo, "Response: Goodbye");
	AddHeader(&mo, "Message: Thanks for all the fish.");
	if( actionid && strlen(actionid) > 0 )
		AddHeader(&mo, "ActionID: %s", actionid);
 
	s->output->write(s, &mo);
	FreeHeaders(&mo);

	destroy_session(s);
	if (debug)
		debugmsg("Client logged off - exiting thread");
	pthread_exit(NULL);
	return 0;
}
开发者ID:rsw686,项目名称:astmanproxy,代码行数:19,代码来源:proxyfunc.c


示例7: AddHeader

void CFireView::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CFormView::OnShowWindow(bShow, nStatus);
	AddHeader(_T("Dest IP"));
	AddHeader(_T("Dest MASK"));
	AddHeader(_T("Dest PORT"));
	AddHeader(_T("Source IP"));
	AddHeader(_T("Source MASK"));
	AddHeader(_T("Source PORT"));
	AddHeader(_T("PROTOCOL"));
	AddHeader(_T("ACTION"));
}
开发者ID:liuxx94,项目名称:myWork,代码行数:12,代码来源:fireView.cpp


示例8: OrthancException

  void HttpOutput::StateMachine::SetCookie(const std::string& cookie,
                                           const std::string& value)
  {
    if (state_ != State_WritingHeader)
    {
      throw OrthancException(ErrorCode_BadSequenceOfCalls);
    }

    // TODO Escape "=" characters
    AddHeader("Set-Cookie", cookie + "=" + value);
  }
开发者ID:ming-hai,项目名称:orthanc,代码行数:11,代码来源:HttpOutput.cpp


示例9: memset

void *ProxyListIOHandlers(struct mansession *s) {
	struct message m;
	struct iohandler *i;

	memset(&m, 0, sizeof(struct message));
	AddHeader(&m, "ProxyResponse: Success");

	i = iohandlers;
	while (i && (m.hdrcount < MAX_HEADERS - 1) ) {
		if (i->read)
			AddHeader(&m, "InputHandler: %s", i->formatname);
		if (i->write)
			AddHeader(&m, "OutputHandler: %s", i->formatname);
		i = i->next;
	}

	s->output->write(s, &m);
	FreeHeaders(&m);
	return 0;
}
开发者ID:rsw686,项目名称:astmanproxy,代码行数:20,代码来源:proxyfunc.c


示例10: ProxyAddServer

int ProxyAddServer(struct mansession *s, struct message *m) {
	struct message mo;
	struct ast_server *srv;
	int res = 0;

	/* malloc ourselves a server credentials structure */
	srv = malloc(sizeof(struct ast_server));
	if ( !srv ) {
		fprintf(stderr, "Failed to allocate server credentials: %s\n", strerror(errno));
		exit(1);
	}

	memset(srv, 0, sizeof(struct ast_server) );
	memset(&mo, 0, sizeof(struct message));
	strcpy(srv->ast_host, astman_get_header(m, "Server"));
	strcpy(srv->ast_user, astman_get_header(m, "Username"));
	strcpy(srv->ast_pass, astman_get_header(m, "Secret"));
	strcpy(srv->ast_port, astman_get_header(m, "Port"));
	strcpy(srv->ast_events, astman_get_header(m, "Events"));

	if (*srv->ast_host && *srv->ast_user && *srv->ast_pass && *srv->ast_port && *srv->ast_events) {
		pthread_mutex_lock(&serverlock);
		srv->next = pc.serverlist;
		pc.serverlist = srv;
		pthread_mutex_unlock(&serverlock);
		res = StartServer(srv);
	} else
		res = 1;

	if (res) {
		AddHeader(&mo, "ProxyResponse: Failure");
		AddHeader(&mo, "Message: Could not add %s", srv->ast_host);
	} else {
		AddHeader(&mo, "ProxyResponse: Success");
		AddHeader(&mo, "Message: Added %s", srv->ast_host);
	}

	s->output->write(s, &mo);
	FreeHeaders(&mo);
	return 0;
}
开发者ID:rsw686,项目名称:astmanproxy,代码行数:41,代码来源:proxyfunc.c


示例11: MHD_create_response_from_data

int CWebServer::CreateRedirect(struct MHD_Connection *connection, const std::string &strURL, struct MHD_Response *&response)
{
  response = MHD_create_response_from_data(0, NULL, MHD_NO, MHD_NO);
  if (response == NULL)
  {
    CLog::Log(LOGERROR, "CWebServer: failed to create HTTP redirect response to %s", strURL.c_str());
    return MHD_NO;
  }

  AddHeader(response, MHD_HTTP_HEADER_LOCATION, strURL);
  return MHD_YES;
}
开发者ID:Karlson2k,项目名称:xbmc,代码行数:12,代码来源:WebServer.cpp


示例12: switch

/*! \brief Create the initial control.
 *
 * \return void
 *
 */
void wxsImageList::OnBuildCreatingCode()
{
    int         i;
    wxString    inc;
    wxString    vname;  // this variable name
    wxString    bname;  // name of the bitmap variable
    wxString    fbase;  // base name of XPM file without dirs or extension
    wxString    fabs;   // absolute name of XPM file
    wxString    frel;   // relative
    wxString    dname;  // name of XPM data array
    wxBitmap    bmp;    // preview bitmap saved as XPM
    wxString    ss, tt; // general use

    // have we already been here?
    if(m_IsBuilt){
        return;
    }
    m_IsBuilt = true;

    switch(GetLanguage())
    {
        case wxsCPP:
            {
                AddHeader(_("<wx/imaglist.h>"), GetInfo().ClassName, 0);

                // store the XPM data someplace
                StoreXpmData();

                vname = GetVarName();
                // if there is no data, then just make empty image and bitmap
                if(m_Count == 0){
                    Codef(_T("%s = new wxImageList(%d, %d, 1);\n"), vname.wx_str(), m_Width, m_Height);
                }
                // else fill it with XPM data
                else{
                    Codef(_T("%s = new wxImageList(%d, %d, %d);\n"),  vname.wx_str(), m_Width, m_Height, (m_Count + 1));
                    for(i = 0; i < m_Count; i++) {
                        ss.Printf(_("%s_%d_XPM"), vname.wx_str(), i);
                        Codef(_T("%s->Add(wxBitmap(%s));\n"), vname.wx_str(), ss.wx_str());
                    }
                }

                BuildSetupWindowCode();
                return;
            }

        case wxsUnknownLanguage: // fall through
        default:
            {
                wxsCodeMarks::Unknown(_T("wxsImageList::OnBuildCreatingCode"), GetLanguage());
            }
    }
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:58,代码来源:wxsimagelist.cpp


示例13: create_response

int CWebServer::CreateRedirect(struct MHD_Connection *connection, const std::string &strURL, struct MHD_Response *&response) const
{
  response = create_response(0, nullptr, MHD_NO, MHD_NO);
  if (response == nullptr)
  {
    CLog::Log(LOGERROR, "CWebServer[%hu]: failed to create HTTP redirect response to %s", m_port, strURL.c_str());
    return MHD_NO;
  }

  AddHeader(response, MHD_HTTP_HEADER_LOCATION, strURL);
  return MHD_YES;
}
开发者ID:Arcko,项目名称:xbmc,代码行数:12,代码来源:WebServer.cpp


示例14: DEBUG

bool CHTTPSock::Redirect(const CString& sURL) {
	if (SentHeader()) {
		DEBUG("Redirect() - Header was already sent");
		return false;
	}

	DEBUG("- Redirect to [" << sURL << "]");
	AddHeader("Location", sURL);
	PrintErrorPage(302, "Found", "The document has moved <a href=\"" + sURL.Escape_n(CString::EHTML) + "\">here</a>.");

	return true;
}
开发者ID:NeilHanlon,项目名称:znc,代码行数:12,代码来源:HTTPSock.cpp


示例15: SetPPQN

bool TriAcePS1Seq::GetHeaderInfo(void) {
    SetPPQN(0x30);

    header = AddHeader(dwOffset, 0xD5);
    header->AddSimpleItem(dwOffset + 2, 2, L"Size");
    header->AddSimpleItem(dwOffset + 0xB, 4, L"Song title");
    header->AddSimpleItem(dwOffset + 0xF, 1, L"BPM");
    header->AddSimpleItem(dwOffset + 0x10, 2, L"Time Signature");

    unLength = GetShort(dwOffset + 2);
    AlwaysWriteInitialTempo(GetByte(dwOffset + 0xF));
    return true;
}
开发者ID:vgmtrans,项目名称:vgmtrans,代码行数:13,代码来源:TriAcePS1Seq.cpp


示例16: switch

void wxsMultiChoiceDialog::OnBuildCreatingCode()
{
    switch ( GetLanguage() )
    {
        case wxsCPP:
        {
            AddHeader(_T("<wx/choicdlg.h>"),GetInfo().ClassName,hfInPCH);

            wxString ChoicesName;
            if ( m_Content.GetCount() > 0 )
            {
                ChoicesName = GetCoderContext()->GetUniqueName(_T("__wxMultiChoiceDialogChoices"));
                #if wxCHECK_VERSION(2, 9, 0)
                Codef(_T("wxString %s[%d] = \n{\n"),ChoicesName.wx_str(),(int)m_Content.GetCount());
                #else
                Codef(_T("wxString %s[%d] = \n{\n"),ChoicesName.c_str(),(int)m_Content.GetCount());
                #endif
                for ( size_t i = 0; i < m_Content.GetCount(); ++i )
                {
                    #if wxCHECK_VERSION(2, 9, 0)
                    Codef(_T("\t%t%s\n"),m_Content[i].wx_str(),((i!=m_Content.GetCount()-1)?_T(","):_T("")));
                    #else
                    Codef(_T("\t%t%s\n"),m_Content[i].c_str(),((i!=m_Content.GetCount()-1)?_T(","):_T("")));
                    #endif
                }
                Codef(_T("};\n"));
            }

            Codef(_T("%C(%W, %t, %t, %d, %s, %T, %P);\n"),
                #if wxCHECK_VERSION(2, 9, 0)
                m_Message.wx_str(),
                m_Caption.wx_str(),
                (int)m_Content.GetCount(),
                (m_Content.IsEmpty()?_T("0"):ChoicesName.wx_str()));
                #else
                m_Message.c_str(),
                m_Caption.c_str(),
                (int)m_Content.GetCount(),
                (m_Content.IsEmpty()?_T("0"):ChoicesName.c_str()));
                #endif

            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsMultiChoiceDialog::OnBuildCreatingCode"),GetLanguage());
        }
    }
}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:51,代码来源:wxsmultichoicedialog.cpp


示例17: GetVarName

void wxsAxis::OnBuildCreatingCode() {
    wxString    vname;
    wxString    pname;
    wxString    cname;
    wxString    fname;
    wxString    dtext;

// we only know C++ language

    if (GetLanguage() != wxsCPP) wxsCodeMarks::Unknown(_T("wxsAxis::OnBuildCreatingCode"),GetLanguage());

// usefull names

    vname = GetVarName();
    pname = GetParent()->GetVarName();
    cname = vname + _("_PEN");
    fname = vname + _("_FONT");

// the header for mathplot

    AddHeader(_T("<mathplot.h>"),GetInfo().ClassName,hfInPCH);

// create the axis -- but not the setup code

    if (mType == 0) Codef(_T("%s = new mpScaleX(_(\"%s\"), %d, %b);\n"), vname.wx_str(), mLabel.wx_str(), mAlign, mTics);
    else            Codef(_T("%s = new mpScaleY(_(\"%s\"), %d, %b);\n"), vname.wx_str(), mLabel.wx_str(), mAlign, mTics);
//  BuildSetupWindowCode();

// assign a pen to the layer

    dtext = mPenColour.BuildCode(GetCoderContext());
    if (dtext.Len() > 0) {
        Codef(_T("wxPen   %s(%s);\n"), cname.wx_str(), dtext.wx_str());
        Codef(_T("%s->SetPen(%s);\n"), vname.wx_str(), cname.wx_str());
    };

// assign a font to the layer

    dtext = mPenFont.BuildFontCode(fname, GetCoderContext());
    if (dtext.Len() > 0) {
        Codef(_T("%s"), dtext.wx_str());
        Codef(_T("%s->SetFont(%s);\n"), vname.wx_str(), fname.wx_str());
    };

// add to parent window -- should be a mpWindow

    if ((GetPropertiesFlags() & flHidden) && GetBaseProps()->m_Hidden)
        ; // do nothing
    else
        Codef(_T("%s->AddLayer(%s);\n"), pname.wx_str(), vname.wx_str());
}
开发者ID:gk7huki,项目名称:codeblocks_sf,代码行数:51,代码来源:wxsAxis.cpp


示例18: GetCoderContext

/*! \brief Create the dialogue.
 *
 * \return void
 *
 */
void wxsRichTextStyleOrganiserDialog::OnBuildCreatingCode()
{
	wxString sFlags;
	wxString sStyleSheetName = GetCoderContext()->GetUniqueName(_T("richTextStyleSheet"));
    switch(GetLanguage())
    {
        case wxsCPP:
            AddHeader(_T(" <wx/richtext/richtextstyledlg.h>"), GetInfo().ClassName, 0);

            for(int i = 0;arrStyleValueNames[i];i++){
                if(m_iFlags & arrStyleValues[i]){
                	sFlags << arrStyleValueNames[i] << _T("|");
                }
            }
			if(sFlags.IsEmpty()){
				sFlags = _T("0");
			}
            else{
				sFlags.RemoveLast();
            }

			#if wxCHECK_VERSION(2, 9, 0)
			AddDeclaration(wxString::Format(wxT("wxRichTextStyleSheet  *%s;"), sStyleSheetName.wx_str()));
            Codef(_T("\t%s = new wxRichTextStyleSheet;\n"), sStyleSheetName.wx_str());
			#else
			AddDeclaration(wxString::Format(wxT("wxRichTextStyleSheet  *%s;"), sStyleSheetName.c_str()));
            Codef(_T("\t%s = new wxRichTextStyleSheet;\n"), sStyleSheetName.c_str());
			#endif

			#if wxCHECK_VERSION(2, 9, 0)
            Codef(_T("%C(%s, %s, NULL, %W, %I, %t, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE);\n"),
							sFlags.wx_str(), sStyleSheetName.wx_str(), m_sCaption.wx_str());
			#else
            Codef(_T("%C(%s, %s, NULL, %W, %I, %t, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, ")
							wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE);\n"),
							sFlags.c_str(), sStyleSheetName.c_str(), m_sCaption.c_str());
			#endif

            BuildSetupWindowCode();
            break;

        default:
            wxsCodeMarks::Unknown(_T("wxsRichTextStyleOrganiserDialog::OnBuildCreatingCode"), GetLanguage());
    }
}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:55,代码来源:wxsrichtextstyleorganiserdialog.cpp


示例19: ProxyChallenge

int ProxyChallenge(struct mansession *s, struct message *m) {
	struct message mo;
	char *actionid;

	actionid = astman_get_header(m, "ActionID");
	if ( strcasecmp("MD5", astman_get_header(m, "AuthType")) ) {
		SendError(s, "Must specify AuthType", actionid);
		return 1;
	}

	if (!*s->challenge)
		snprintf(s->challenge, sizeof(s->challenge), "%d", rand());

	memset(&mo, 0, sizeof(struct message));
	AddHeader(&mo, "Response: Success");
	AddHeader(&mo, "Challenge: %s", s->challenge);
	if( actionid && strlen(actionid) )
		AddHeader(&mo, "ActionID: %s", actionid);

	s->output->write(s, &mo);
	FreeHeaders(&mo);
	return 0;
}
开发者ID:rsw686,项目名称:astmanproxy,代码行数:23,代码来源:proxyfunc.c


示例20: AddHeader

void wxsCustomWidget::OnBuildCreatingCode()
{
    if ( GetCoderFlags() & flSource )
    {
        if ( !m_IncludeFile.IsEmpty() )
        {
            if ( m_IncludeIsLocal ) AddHeader(_T("\"") + m_IncludeFile + _T("\""), GetUserClass(), 0);
            else                    AddHeader(_T("<")  + m_IncludeFile + _T(">"),  GetUserClass(), 0);
        }
    }

    wxString Result = m_CreatingCode;
    Result.Replace(_T("$(POS)"),Codef(GetCoderContext(),_T("%P")));
    Result.Replace(_T("$(SIZE)"),Codef(GetCoderContext(),_T("%S")));
    Result.Replace(_T("$(STYLE)"),m_Style);
    Result.Replace(_T("$(ID)"),GetIdName());
    Result.Replace(_T("$(THIS)"),GetVarName());
    Result.Replace(_T("$(PARENT)"),GetCoderContext()->m_WindowParent);
    Result.Replace(_T("$(NAME)"),Codef(GetCoderContext(),_T("%N")));
    Result.Replace(_T("$(CLASS)"),GetUserClass());

    AddBuildingCode(Result+_T("\n"));
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:23,代码来源:wxscustomwidget.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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