Пример #1
0
void ReadiumJSApi::updateSettings(ViewerSettings viewerSettings)
{
    try {
        std::string str = json::Serialize(viewerSettings.toJSON());
        loadJSOnReady(std::string("ReadiumSDK.reader.updateSettings(") + str + ");");
    }
    //catch (JSONException e) {
    //	Log.e(TAG, "" + e.getMessage(), e);
    //}
    catch (...)
    {
        //	Log.e(TAG, "" + e.getMessage(), e);
    }
}
Пример #2
0
void ReadiumJSApi::openBook(PackagePtr pckg, ViewerSettings viewerSettings, OpenPageRequest openPageRequestData)
{
    json::Object openBookData;
    try {
        openBookData["package"] = getPackageJSON(pckg);
        openBookData["settings"] = viewerSettings.toJSON();
        openBookData["openPageRequest"] = openPageRequestData.toJSON();
    }
    catch (...)
    {
        //	Log.e(TAG, "" + e.getMessage(), e);
    }
    //catch (JSONException e) {
    //	Log.e(TAG, "" + e.getMessage(), e);
    //}

    std::string str = json::Serialize(openBookData);
    loadJSOnReady("ReadiumSDK.reader.openBook(" + str + ");");
}