|
webpg-npapi 0.6.1
|
Calls webpgPluginAPI::getKeyList() without specifying a search string, and the secret_only paramter as "1", which returns only Private Keys from the keyring. Definition at line 840 of file webpgPluginAPI.cpp. References getKeyList(). Referenced by webpgPluginAPI(). {
// Retrieve the private keylist
FB::variant private_keylist = webpgPluginAPI::getKeyList("", 1);
// Retrieve a reference to the DOM Window
FB::DOM::WindowPtr window = m_host->getDOMWindow();
// Check if the DOM Window has an in-built JSON Parser
if (window && window->getJSObject()->HasProperty("JSON")) {
// Convert the VariantMap to a Json::Value object
Json::Value json_value = FB::variantToJsonValue(private_keylist);
// Create a writer that will convert the object to a string
Json::FastWriter writer;
// Create a reference to the browswer JSON object
FB::JSObjectPtr obj = window->getProperty<FB::JSObjectPtr>("JSON");
return obj->Invoke("parse", FB::variant_list_of(writer.write(json_value)));
} else {
// No browser JSON parser detected, falling back to return of FB::variant
return private_keylist;
}
}
Here is the call graph for this function:
![]() |
1.7.4