コード例 #1
0
JNIEXPORT void JNICALL Java_org_adblockplus_android_ABPEngine_refreshSubscription(JNIEnv *pEnv, jobject, jstring url)
{
    D(D_WARN, "refreshSubscription()");
    try
    {
        const std::string surl = GetString(pEnv, url);
        AdblockPlus::SubscriptionPtr subscription = filterEngine->GetSubscription(surl);
        subscription->UpdateFilters();
    }
    catch (const std::exception& e)
    {
        ThrowJavaException(pEnv, e);
    }
    catch (...)
    {
        ThrowJavaException(pEnv);
    }
}
コード例 #2
0
ファイル: FilterEngine.cpp プロジェクト: mto/libadblockplus
TEST_F(FilterEngineTest, SubscriptionUpdates)
{
  AdblockPlus::SubscriptionPtr subscription = filterEngine->GetSubscription("foo");
  ASSERT_FALSE(subscription->IsUpdating());
  subscription->UpdateFilters();
}