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

Jingle file transfers via in-band bytestreams #577

Merged
merged 3 commits into from Jul 18, 2019

Conversation

Projects
None yet
3 participants
@hrxi
Copy link
Contributor

commented Jun 13, 2019

What works? Outgoing file transfers.

What is still missing? Incoming file transfers, UI, error handling.

Update: Error handling has been improved, UI has been reused. It still needs to be enabled by default (it currently isn't because proper prioritization of HTTP over Jingle isn't implemented).

Update: Enabled by default and added incoming file transfers.

@hrxi

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2019

We talked about the design and found that we'd want to replace the socket-style API for the Jingle sessions with handing the Jingle session an input stream directly.

@hrxi hrxi force-pushed the hrxi:gsoc_0 branch from f4a4abd to ee1b57f Jun 23, 2019

hrxi added some commits Jun 23, 2019

Implement file sending via Jingle
This is still disabled by default until prioritization is implemented;
otherwise this could be preferred to HTTP uploads.

File sending only works via Jingle In-Band-Bytestreams right now, more
transports are going to be implemented.

To test this, uncomment the line with `JingleFileTransfer` in
libdino/src/application.vala.
Add file receiving via Jingle
This currently follows the same rules as HTTP file download for
accepting files.

@hrxi hrxi force-pushed the hrxi:gsoc_0 branch from ee1b57f to 82e7cf4 Jul 9, 2019

@hrxi hrxi changed the title First approximation to Jingle file transfers Jingle file transfers via in-band bytestreams Jul 9, 2019

@@ -53,6 +53,7 @@ public class FileTransfer : Object {
}
public string path { get; set; }
public string? mime_type { get; set; }
// TODO(hrxi): expand to 64 bit

This comment has been minimized.

Copy link
@mar-v-in

mar-v-in Jul 9, 2019

Contributor

Just do it.

Not a blocker for merging.

This comment has been minimized.

Copy link
@hrxi

hrxi Jul 11, 2019

Author Contributor

Not yet done, required some changes in database code but the database code didn't like int64.

Show resolved Hide resolved libdino/src/service/file_manager.vala Outdated
Show resolved Hide resolved xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala Outdated
Show resolved Hide resolved xmpp-vala/src/module/xep/0047_in_band_bytestreams.vala Outdated
return;
}
int seq = data.get_attribute_int("seq");
// TODO(hrxi): return an error on malformed base64 (need to do this

This comment has been minimized.

Copy link
@mar-v-in

mar-v-in Jul 9, 2019

Contributor

You can check that content.length = base64.length/4*3 - number of trailing = to verify that the base64 string was fully decoded and as such is valid.

Not a blocker for merging.

This comment has been minimized.

Copy link
@hrxi

hrxi Jul 11, 2019

Author Contributor

Not yet done, seemed harder than the proposed method (whitespace is valid in base64).

Show resolved Hide resolved libdino/src/service/jingle_file_manager.vala Outdated
Show resolved Hide resolved libdino/src/service/jingle_file_manager.vala Outdated

@fiaxh fiaxh merged commit 4b6fe6b into dino:master Jul 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.