예제 #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 + ");");
}