Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use odrcode http #380

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Use odrcode http #380

wants to merge 3 commits into from

Conversation

andiwand
Copy link
Member

  • Switch to use http for new odrcore
  • Use odrcode pdf2htmlex
  • Allows lazy loading for pdf

Comment on lines +130 to +131
// TODO can and should this be architecture dependent?
sourceSets.main.assets.srcDirs += "build/conan/armv8/assets"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomTasche not sure if this is even relevant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the assets we care about are not arch-dependent? still makes sense to keep the TODO in case someone considers adding arch-dependent assets...

odrcore/4.1.1@
odrcore/9.9.9@
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use newly tagged version when it is published

@@ -49,6 +49,7 @@
android:label="@string/app_title"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/MainTheme"
android:networkSecurityConfig="@xml/network_security_config"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomTasche this was necessary to get HTTP working. without that we have to use HTTPS

JNIEXPORT void JNICALL
Java_at_tomtasche_reader_background_CoreWrapper_listenServerNative(JNIEnv *env, jclass clazz) {
s_server->listen("127.0.0.1", 29665);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: configure port

String id = CoreWrapper.hostFile(coreOptions);

result.partTitles.add("document");
result.partUris.add(Uri.parse("http://localhost:29665/" + id + "/document.html"));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: configure port

Comment on lines -125 to +151
loader = odfLoader;
loader = coreHttpLoader;
break;
case DOC:
loader = docLoader;
loader = coreHttpLoader;
break;
case OOXML:
loader = ooxmlLoader;
loader = coreHttpLoader;
break;
case PDF:
loader = pdfLoader;
loader = coreHttpLoader;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

@@ -5,11 +5,11 @@

public class CoreWrapper {

public void initialize() {
static {
System.loadLibrary("odr-core");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: communicate data paths for core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants