Ejemplo n.º 1
0
void CWebCore::WriteCustomList ( const SString& strListName, const std::vector<SString>& customList, bool bReset )
{
    if ( !m_pXmlConfig || !MakeSureXMLNodesExist () )
        return;

    CXMLNode* pRootNode = m_pXmlConfig->GetRootNode ();
    if ( !pRootNode )
        return;

    CXMLNode* pCustomListNode = pRootNode->FindSubNode ( strListName );
    if ( !pCustomListNode )
        return;

    pCustomListNode->DeleteAllSubNodes();
    for ( std::vector<SString>::const_iterator iter = customList.begin (); iter != customList.end (); ++iter )
    {
        CXMLNode* pNode = pCustomListNode->CreateSubNode ( "url" );
        if ( pNode )
            pNode->SetTagContent ( *iter );
    }

    // Write custom blacklist and reload from XML
    m_pXmlConfig->Write ();
    if ( bReset )
        ResetFilter ( false );
}
Ejemplo n.º 2
0
CAtmoOutputFilter::CAtmoOutputFilter(CAtmoConfig *atmoConfig )
{
   this->m_pAtmoConfig = atmoConfig;
   this->m_percent_filter_output_old = NULL;
   this->m_mean_filter_output_old = NULL;
   this->m_mean_values = NULL;
   this->m_mean_sums = NULL;
   ResetFilter();
}
Ejemplo n.º 3
0
/*____________________________________________________________________*/
void Canaux( void)
{
	short i;
	
	print ("\nChecking channels\n");
	print ("-----------------------------\n");
	ResetFilter();
	for(i=0; i<16; i++) {
		print ("  canal %d : ", i);
		RejectChan(myFilterPtr,i);
		TestCanal( i);
		AcceptChan(myFilterPtr,i);
		flush;
	}
}
Ejemplo n.º 4
0
/*____________________________________________________________________*/
void Ports( void)
{
	short i;
	
	print ("\nChecking ports\n");
	print ("-----------------------------\n");
	ResetFilter();
	for(i=0; i<LastPort; i++) {
		print ("  port %d : ", i);
		RejectPort(myFilterPtr,i);
		TestPort( i);
		AcceptPort(myFilterPtr,i);
		flush;
	}
}
Ejemplo n.º 5
0
/*____________________________________________________________________*/
void Events( void)
{
	short i;
	
	print ("\nChecking events types\n");
	print ("-----------------------------\n");
	ResetFilter(); 
	for(i=typeNote; i<=typePrivate; i++) {
		print ("  %s : ", typeListe[i]);
		RejectType(myFilterPtr,i);
		TestEvent( i);
		AcceptType(myFilterPtr,i);
		flush;
	}
	for(i=typeQuarterFrame; i<=typePortPrefix; i++) {
		print ("  %s : ", typeListe[i]);
		RejectType(myFilterPtr,i);
		TestEvent( i);
		AcceptType(myFilterPtr,i);
		flush;
	}
}