summaryrefslogtreecommitdiff
path: root/libpurple/xfer.c
Commit message (Collapse)AuthorAgeFilesLines
* Bump C standard to C99 for libpurple files and fix warningsElliott Sales de Andrade2022-12-111-8/+9
| | | | | | | Testing Done: Touched all source files and compiled; saw no new warnings. Reviewed at https://reviews.imfreedom.org/r/2122/
* Remove C99-obsoleted constructsElliott Sales de Andrade2022-10-261-1/+1
| | | | | | | | | See [this development thread for a future Fedora change](https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/) or [the proposed change page](https://fedoraproject.org/wiki/Changes/PortingToModernC). These may be made stronger errors in GCC 14. Testing Done: Configured with `-Dc_args='-Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition'` and compiled. Reviewed at https://reviews.imfreedom.org/r/1974/
* Replace purple_input_remove by g_source_removeElliott Sales de Andrade2022-09-291-6/+6
| | | | | | | | | It is a one line wrapper for it. Testing Done: Compiled. Reviewed at https://reviews.imfreedom.org/r/1865/
* Stop including internal.h everywhere when we really don't need it.Gary Kramlich2022-09-121-1/+0
| | | | | | | Testing Done: Compiled, but didn't test on windows. As such I left all the networking stuff untouched as that's where windows will really need it and that can be done in another rr. Reviewed at https://reviews.imfreedom.org/r/1764/
* Rename purple-gio.[ch] to purplegio.[ch] to match the other filesGary Kramlich2022-09-121-1/+1
| | | | | | | Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/1750/
* Add source files to GObject introspectionElliott Sales de Andrade2022-08-021-10/+21
| | | | | | | | | And also fix all properties/signals/non-docs that were incorrect. Testing Done: Built docs and found no new warnings. Checked some docs for newly-available property/signal docs. Reviewed at https://reviews.imfreedom.org/r/1568/
* Now that the History API is here, remove the purple logging apiGary Kramlich2021-10-231-0/+1
| | | | | | | Testing Done: Sent ims in both pidgin3 and finch3, also joined a chat in pidgin3 and verified that the preferences window is okay. Reviewed at https://reviews.imfreedom.org/r/1077/
* Fix several typos in libpurpleElliott Sales de Andrade2021-10-101-1/+1
| | | | | | | | | Ran `codespell -w`, ignoring some stuff, or making things better. Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/1016/
* Set the prereq type for all Protocol interfaces to PurpleProtocolGary Kramlich2021-08-121-1/+2
| | | | | | | Testing Done: Compiled and ran without an obvious issues. Reviewed at https://reviews.imfreedom.org/r/888/
* Fix the includes for the purpleenums renameGary Kramlich2021-08-031-1/+1
| | | | | | | Testing Done: Full build after a `meson --wipe` Reviewed at https://reviews.imfreedom.org/r/863/
* migrate libpurple to the ConversationManager APIGary Kramlich2021-07-221-14/+17
| | | | | | | Testing Done: Compile only Reviewed at https://reviews.imfreedom.org/r/791/
* Update purple_conversations_find_* to return PurpleConversations instead of ↵Gary Kramlich2021-05-181-5/+5
| | | | | | | | | subclasses Testing Done: Tested a bonjour im and irc chat. Reviewed at https://reviews.imfreedom.org/r/646/
* Port libpurple from purple_protocols_ to purple_protocol_manager_Gary Kramlich2021-03-021-1/+1
| | | | | | | | | Testing Done: Compiled and ran locally. Bugs closed: PIDGIN-17472 Reviewed at https://reviews.imfreedom.org/r/538/
* Implement mitigation for GHSL-2021-045Gary Kramlich2021-02-071-1/+2
| | | | | | | | | | | | | | | | | This add a static inline version of `g_memdup2` if the version of glib we're compiling against doesn't have the function. GHSL-2021-045 was originally reported to glib at https://gitlab.gnome.org/GNOME/glib/-/issues/2319. More information about the entire situation can be found on the gnome desktop-devel-list at https://mail.gnome.org/archives/desktop-devel-list/2021-February/msg00000.html Testing Done: Compiled and ran unit tests. Reviewed at https://reviews.imfreedom.org/r/482/
* Convert proxy code in xfer to gio.Elliott Sales de Andrade2020-12-171-16/+38
| | | | | | | Testing Done: Compile only, mostly; began receiving an irc transfer from grim, though ports were closed, so it never started. Reviewed at https://reviews.imfreedom.org/r/274/
* Make sure we're not including the gettext macros in header files and deal ↵Gary Kramlich2020-05-211-0/+3
| | | | with the repercussions of that.
* Make sure that internal.h can only be included by libpurple and split out ↵Gary Kramlich2020-05-011-0/+2
| | | | some pieces to purpleprivate.h
* Fix some issues that scanbuild had identifiedGary Kramlich2020-04-091-3/+3
|
* Add freezes around multi-notifies in xfers.Elliott Sales de Andrade2019-12-271-4/+12
|
* Remove now-unused PurpleXferUiOps.destroy.Elliott Sales de Andrade2019-12-221-7/+0
| | | | | | | UI data is stored on GObjects and automatically destroyed, so this isn't really needed as a UI op for *our* UIs. There will be a replacement soon if needed by other UIs.
* Change PurpleXferUiOps.add_xfer to PurpleXfer:visible property.Elliott Sales de Andrade2019-12-221-14/+39
|
* Remove PurpleXfer UI data storage.Elliott Sales de Andrade2019-12-221-36/+0
| | | | | As a GObject, UIs can use g_object_[gs]et_data instead.
* Convert PurpleXferUiOps.add_thumbnail to a signal.Elliott Sales de Andrade2019-12-211-6/+14
|
* Remove PurpleXferUiOps.cancel_* UI ops.Elliott Sales de Andrade2019-12-211-13/+0
| | | | | UIs can connect to notify::status on PurpleXfer instances instead.
* Replace PurpleXferUiOps.update_progress by PurpleXfer.progress.Elliott Sales de Andrade2019-12-211-25/+12
| | | | | | Progress can be monitored by connecting to notify::progress on PurpleXfer instances.
* Remove xfer signals for status changes.Elliott Sales de Andrade2019-12-211-62/+0
| | | | | | It can be monitored by connecting to notify::status on an individual PurpleXfer instead.
* Convert xfer I/O operations from UI ops to signals.Elliott Sales de Andrade2019-12-211-96/+253
|
* Remove glibcompat.h from all the files that don't actually need it.Gary Kramlich2019-11-151-1/+1
|
* Fix some possible leaks.Elliott Sales de Andrade2019-11-051-2/+1
|
* Fix some static analysis warnings.Elliott Sales de Andrade2019-10-011-3/+6
| | | | | Some redundant assignment, missing NULL-check, and missing frees.
* Fix some minor warnings.Elliott Sales de Andrade2019-09-271-2/+2
| | | | | Fixes unused, and possibly unitialized variable warnings.
* Replace purple_str_size_to_units by g_format_size.Elliott Sales de Andrade2019-09-101-1/+1
| | | | | | Note, since that function uses base 10 units, I also changed the transfer speeds to base 10 (KB/s, not KiB/s).
* Convert file transfer times to monotonic clock.Elliott Sales de Andrade2019-09-101-56/+17
| | | | | These are used to calculate elapsed transfer times.
* Fix broken `priv != NULL` checks in libpurple.Elliott Sales de Andrade2019-08-071-58/+92
| | | | | | The `*_get_instance_private` function just returns input value + offset, so it is impossible for `priv` to be `NULL`.
* Move extraneous NULL-checks in xfer to public function.Elliott Sales de Andrade2019-08-071-3/+3
| | | | | | It should not be necessary in the private one, because these checks were done in the public one.
* Cleanups from reviewGary Kramlich2019-07-041-11/+14
|
* Make PurpleXfer a derivable type and create subclasses in all the protocols ↵Gary Kramlich2019-07-021-297/+275
| | | | that support file transfers
* libpurple: Port almost self-contained code from g_type_class_add_private()Mike Ruprecht2018-12-061-131/+98
| | | | | | | | This patch ports the almost self-contained libpurple GObjects away from the deprecated g_type_class_add_private() function in favor of the G_DEFINE_TYPE_WITH_PRIVATE() macro. None of these require changes to anything other than their own .c and .h files. It removes the const qualifier from some of the functions for simplicity.
* libpurple: Remove pointer registration for DBus APIMike Ruprecht2018-10-021-5/+0
|
* xfer: Rename PurpleProtocolXferInterface.send() to send_file()Mike Ruprecht2018-05-031-6/+6
| | | | | | | | With the addition of PurpleProtocolXferInterface, building in Windows fails due to the redefinition of send() as wpurple_send(). Since a lot of the prpls already call it this their implementations, this patch renames it to send_file(). This fixes building on Windows again.
* Remove some trailing whitespace and commented codeGary Kramlich2017-12-141-1/+1
|
* start implement the _new_xfer test, stopping here as there a lot more ↵Gary Kramlich2017-11-261-9/+11
| | | | auxiliary work that needs to be done to make it work
* Fix the argument names so there's no confusionGary Kramlich2017-11-251-12/+12
|
* Clean up a bunch of the cruft I accidentally createdGary Kramlich2017-11-241-9/+25
|
* Update the PurpleProtocolXferInterface to pass around the interfance ↵Gary Kramlich2017-09-071-3/+3
| | | | instance as well
* Initial attempt at removing the magic around PurpleProtocolXferInterfaceGary Kramlich2017-08-311-0/+47
|
* libpurple/xfer.c: Silence warnings in purple_xfer_set_thumbnail()Mike Ruprecht2017-06-151-2/+4
| | | | | | | | | | | | | | This patch fixes a mixed declarations and code warning and a discards 'const' qualifier from pointer target type warning: xfer.c:1927:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] gpointer *old_thumbnail_data = priv->thumbnail_data; xfer.c:1942:9: warning: passing argument 1 of ‘g_free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] g_free(old_mimetype); It also changes the old_thumbnail_data variable to match the type of thumbnail_data in the priv structure.
* Merge release-2.x.y into defaultdx2017-06-121-8/+19
|
* Fix purple_xfer_write() during do_transfer()Jakub Adam2016-04-071-8/+19
| | | | | | | | | | | | | | | | | | Consider sending a small (say 10 bytes) file in do_transfer(). First, the buffer is filled in purple_xfer_read_file(), which also calls purple_xfer_set_bytes_sent(); because the file is small, bytes sent now equals the file size. Later in purple_xfer_write(), the size of the write buffer is adjusted so that it's not bigger than the remaining portion of the file being sent - but at that point purple_xfer_get_bytes_remaining() already returns 0, nothing is written and the file transfer gets stuck. As I understant it, the meaning of buffer size adjustment in purple_xfer_write() is to ensure that external protocol plugin which handles file transfer input and output on its own can't by accident send more data than the size of the file. In do_transfer(), though, that check is redundant and can be skipped.
* Initial fix of file transfer by removing extra calls to ↵Michael McConville2015-07-231-23/+21
| | | | purple_xfer_set_bytes_sent() and purple_xfer_set_completed(). Also, remove needless member bytes_remaining from PurpleXferPrivate. Works reliably for me on XMPP. However, the redundant purple_xfer_set_completed() calls may be relied upon by other protocols. This needs to be tested. Ok'd by elb. Refs #16001