summaryrefslogtreecommitdiff
path: root/libpurple/core.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix libpurple compile on WindowsElliott Sales de Andrade2022-11-031-0/+3
| | | | | | | | | Don't know about Pidgin yet. Testing Done: Compiled on Linux and with mingw cross-compile. Reviewed at https://reviews.imfreedom.org/r/2015/
* Make PurpleUi.start return a gboolean and GErrorGary Kramlich2022-11-011-1/+3
| | | | | | | | | | This allows the user interface to handle initialization errors in one place as purple_core_init calls purple_ui_start. Testing Done: Compiled and ran pidgin3 Reviewed at https://reviews.imfreedom.org/r/2008/
* Display a dialog in Pidgin if purple_core_init returned FALSEGary Kramlich2022-11-011-0/+17
| | | | | | | | | | | | This also adds an environment variable so developers (or users for some reason) can set a custom error message for purple_core_init to return. The intent is to allow UI developers to control the message and make sure things display as they expect them to. Testing Done: used the `PURPLE3_CORE_ERROR_MESSAGE` environment variable to test the dialog including one with multiple lines of `a`'s with no breaks and everything displayed fine. Reviewed at https://reviews.imfreedom.org/r/2007/
* Add an out parameter for an error to purple_core_initGary Kramlich2022-10-311-1/+1
| | | | | | | | | Testing Done: Ran the unit tests, pidgin3 and finch3 without issue. Bugs closed: PIDGIN-17699 Reviewed at https://reviews.imfreedom.org/r/2004/
* Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfoGary Kramlich2022-10-311-40/+17
| | | | | | | | | | | | | This created a lot more refactoring that I imagined, but it's mostly just moving stuff around. I skipped the unit tests for now because we already have a `test_ui.[ch]` in the tests directory which we can/should move to a separate library or something, so it's available outside of the `libpurple/tests/` directory. Testing Done: Ran the unit tests, launched pidgin3, and launched finch3 with out issue. Bugs closed: PIDGIN-17697 Reviewed at https://reviews.imfreedom.org/r/1925/
* Fix an issue where gio was bombing out early and causing our unit tests to failGary Kramlich2022-10-281-0/+9
| | | | | | | | | | | This was accidentally introduced in /r/1921 when the unit tests moved to a GMemorySettingsBackend. This was fixed upstream in 2.73.3. The upstream merge request is here https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2813/. Testing Done: Used convey to build under debian, ubuntu, and fedora. Reviewed at https://reviews.imfreedom.org/r/1986/
* 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/
* Add a get_settings_backend vfunc to CoreUiOpsGary Kramlich2022-10-101-7/+1
| | | | | | | | | | | This allows the user interface to declare their own settings backend. There's some minor duplication between finch and pidgin for this, but this means the test ui can use a memory backend instead of something on disk. Testing Done: Ran the unit tests multiple times and verified that the credential manager test stops messing up everything else. Reviewed at https://reviews.imfreedom.org/r/1921/
* Create the new PurpleContactManagerGary Kramlich2022-09-291-0/+2
| | | | | | | | | Testing Done: Ran the unit tests Bugs closed: PIDGIN-17678 Reviewed at https://reviews.imfreedom.org/r/1850/
* Stop including internal.h everywhere when we really don't need it.Gary Kramlich2022-09-121-1/+4
| | | | | | | 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/
* Prepare GSettings schemas and a default settings backendElliott Sales de Andrade2022-09-111-0/+16
| | | | | | This does nothing by itself yet. Reviewed at https://reviews.imfreedom.org/r/1733/
* Phase 1 of the Notifications APIGary Kramlich2022-06-151-0/+3
| | | | | | | | | | | | * Created PurpleNotification with unit tests. * Created PurpleNotificationManager with unit tests. Testing Done: Ran the unit tests and ran Pidgin in the devenv. Bugs closed: PIDGIN-17633 Reviewed at https://reviews.imfreedom.org/r/1502/
* Update purple_core_init to take a PurpleUiInfo instanceGary Kramlich2022-05-201-27/+8
| | | | | | | | | Added an `id` property to `PurpleUiInfo` Testing Done: Ran the unit tests and verified I could run Pidgin and connect an account. Reviewed at https://reviews.imfreedom.org/r/1456/
* Move the path based functions from util.c to their own file.Gary Kramlich2022-01-081-0/+1
| | | | | | | | | | | | This is the first step in cleaning these up and using separate directories for each libpurple based client. Testing Done: Ran with no config directory and added an account. Verified that all of the config files were correctly created. Also ran the unit tests without issue. Reviewed at https://reviews.imfreedom.org/r/1192/
* Removed some code that migrating to xdg directories that wasn't being usedGary Kramlich2022-01-081-31/+0
| | | | | | | Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/1168/
* Fix an order of operation with shutting down the account managerGary Kramlich2021-12-071-1/+1
| | | | | | | Testing Done: Ran and verified that the `g_critical` messages were no longer shown. Reviewed at https://reviews.imfreedom.org/r/1153/
* Create the PurpleAccountManager APIGary Kramlich2021-12-031-0/+2
| | | | | | | | | | | | | | This replaces most of the purple_accounts_ API, but not quite everything. The functions that have been replaced have been marked as deprecated and libpurple has been updated to use the new API. Testing Done: * Connected an XMPP account * Verified chat and ims worked * Verified that the saved statuses window didn't crash * Ran the new unit tests. Reviewed at https://reviews.imfreedom.org/r/1137/
* Split PurpleCoreUiOps out to its own file.Gary Kramlich2021-11-151-27/+0
| | | | | | | Testing Done: Compiled and ran without issues. Reviewed at https://reviews.imfreedom.org/r/1129/
* Remove the libpurple support for themes now that all of the ui support has ↵Gary Kramlich2021-11-151-7/+0
| | | | | | | | | been removed Testing Done: Compiled and ran pidgin3 Reviewed at https://reviews.imfreedom.org/r/1117/
* Clean up some issues during shutdown that were outputting warningsGary Kramlich2021-11-111-5/+11
| | | | | | | Testing Done: Ran and verified that the warnings were no longer displayed. Reviewed at https://reviews.imfreedom.org/r/1128/
* Now that the History API is here, remove the purple logging apiGary Kramlich2021-10-231-3/+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/
* Remove entire PurpleDebugUiInterface and implementationsElliott Sales de Andrade2021-10-191-6/+3
| | | | | | | | | The `purple_debug*` functions are routed through GLib's logging interface, and the UIs capture logs from there, so there's no need for this interface any more. Testing Done: Opened Debug Window and saw logs appearing there. Reviewed at https://reviews.imfreedom.org/r/1074/
* GSoC History API including sqlite history adapterJames Culver2021-10-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The History API has been created to drive all message handling in purple3. It will be used to update existing messages for edits, reactions, pinning, read/deliver receipts, etc. The API uses an adapter pattern, to abstract out backends, but provides a SQLite3 backend by default. It also provides search capabilities using a custom query language that can easily be expanded over time. It will be use by both the end user to search messages and the frontends to implement features like a pinned messages button. A command line utility is also provided for searching outside of the program itself. ## Remaining Items **These all will most likely be done by the Pidgin core team after GSoC when we figure out exactly how to solve them.** Need to store database in purple config directory * Gary has spent some time looking at this and it looks like the purple-history cli will need to become a purple-ui to make this work write as in the future other adapters will be plugins. Other things to consider: - For simplicity, the SqliteHistoryAdapter is parsing the query itself, but for consistency having `PurpleHistoryAdapter` parse the query and pass tokens to the subclass might be something we want to do. Testing Done: ## Unit Tests History Manager History Adapter ## Integration Tests purplehistorycore created for integration tests. PurpleSqliteHistoryAdapter functionality tested: - Creates proper db schema - Writes logs - Reads logs - Queries using query language - Deletes using query language Bugs closed: PIDGIN-17526, PIDGIN-17532, PIDGIN-17533, PIDGIN-17534 Reviewed at https://reviews.imfreedom.org/r/877/
* Create PurpleWhiteboardManager for managing whiteboardsGary Kramlich2021-09-021-0/+2
| | | | | | | Testing Done: Compiled only. Tried to create a silc account, but it dies deep in libsilc. Reviewed at https://reviews.imfreedom.org/r/886/
* Remove all of the current smiley support as it currently isn't used and ↵Gary Kramlich2021-08-241-10/+0
| | | | | | | | | needs to be completely overhauled for the new emoji api when we write it. Testing Done: Ran the unit tests, `ninja pidgin-pot doc`, ran pidgin3, opened the preferences page, verified the `custom smileys menu was removed`, sent messages over xmpp with text smileys and verified that pidgin 2 still rendered them. Reviewed at https://reviews.imfreedom.org/r/852/
* Clean up PidginCredentialManagerGary Kramlich2021-07-181-1/+1
| | | | | | | | | | | * Remove the unnecessary _provider from a bunch of symbols * Use g_task_return_new_error * Some other minor cleanups Testing Done: Compiled and ran the unit tests. Reviewed at https://reviews.imfreedom.org/r/804/
* Create a manager for conversations.Gary Kramlich2021-06-141-0/+2
| | | | | | | | | I Skipped unit tests because need a connection and full protocol implementation to do it properly. Testing Done: Compiled and ran with an IRC account. Reviewed at https://reviews.imfreedom.org/r/677/
* Remove the deprecated keyring API.Gary Kramlich2021-04-211-3/+0
| | | | | | | | | | | | I've disable the building of the internal keyring for now but left it so it can be referenced when it is ported to the CredentialProvider API. Testing Done: Ran Pidgin and verified the preferences window worked. Bugs closed: PIDGIN-17486 Reviewed at https://reviews.imfreedom.org/r/624/
* rename conversation.[ch] to purpleconversation.[ch] and split ↵Gary Kramlich2021-04-121-1/+1
| | | | | | | | | PurpleConversationUiOps out to its own file to avoid circular include issues. Testing Done: Compiled and ran locally including docs and pot file. The pot file fails as I need to rebase on [596](https://reviews.imfreedom.org/r/596/) Reviewed at https://reviews.imfreedom.org/r/597/
* Create a no operation credential provider and fix a number of other issuesGary Kramlich2021-01-301-2/+9
| | | | | | | | | | | | | * Create a "None" credential provider that allows users to disable credential storing and only allows them to enter passwords manually. * Use g_signal_connect_object in PidginCredentialProviderStore. * Move purple_credential_manager_shutdown after purple_plugins_uninit. * Set the active credential provider to NULL during shutdown. Testing Done: Compiled and ran locally verified that we no long hang on exit if we've opened the preferences window. Reviewed at https://reviews.imfreedom.org/r/456/
* Create a new PurpleProtocolManagerGary Kramlich2021-01-261-2/+2
| | | | | | | | | | | | | | | * Created new PurpleProtocolManager object. * Updated the existing purple_protocols_* api to call the new api in the manager. Testing Done: * Ran unit tests * Ran libpurple-doc * Ran pidgin locally with bonjour, xmpp, and irc. Bugs closed: PIDGIN-17462 Reviewed at https://reviews.imfreedom.org/r/437/
* Port the secretservice keyring to PurpleCredentialProviderGary Kramlich2021-01-261-1/+2
| | | | | | | | | Port the secret service keyring to PurpleCredentialProvider Testing Done: Made sure passwords were created and deleted in seahorse. Reviewed at https://reviews.imfreedom.org/r/401/
* Rename message.[ch] to purplemessage.[ch]Gary Kramlich2021-01-111-1/+1
| | | | | | | Testing Done: compiled and ran locally. Reviewed at https://reviews.imfreedom.org/r/408/
* Remove the buddy pounces apiGary Kramlich2021-01-021-4/+0
| | | | | | | | | | | This feature has more or less been stalkerware since its inception and the only useful feature that came of it was offline message emulation which isn't necessary for most networks nowadays. Testing Done: Compiled and ran locally. Reviewed at https://reviews.imfreedom.org/r/322/
* Cleanup local IP gettersElliott Sales de Andrade2020-12-201-1/+1
| | | | | | | | | | | * Rename `purple_network_get_my_ip` to `purple_network_discover_my_ip`. Nothing actually cares about what it returns, so stop returning anything. * Use libnice to replace `purple_network_get_local_system_ip`. Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/296/
* Remove file descriptor argument from local IP getter functions.Elliott Sales de Andrade2020-12-181-1/+1
| | | | | | | | | Everything that's left calling it uses -1 and not a real socket. Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/284/
* Add the new PurpleCredentialManager APIGary Kramlich2020-11-051-0/+2
| | | | | | | | | Create a new PurpleCredentialManager which will eventually replace the PurpleKeyring API. Testing Done: Ran unit tests under valgrind. Reviewed at https://reviews.imfreedom.org/r/172/
* PurpleMessage cleanups from hellGary Kramlich2020-10-031-2/+0
| | | | | | | | | | | | | | | Clean up libpurple/message.[ch] and remove the messages hash table as its current implementation will not fit our future needs add a content-type property to PurpleMessage Convert message timestamps from time_t to GDateTime and set default values Make purple_message_new_outgoing take a parameter for the author. Testing Done: messages sent on bonjour, irc privmsg, irc chat, `/me` is broken i think unrelated. Reviewed at https://reviews.imfreedom.org/r/124/
* remove the old sound apiGary Kramlich2020-08-131-4/+0
| | | | | | | | | | | | | | | | | | Remove all traces of the old sound api from pidgin Remove all traces of the old sound api from finch Remove all references to the old sound api from libpurple Remove the old sound files Update ChangeLog.API for all the removals Testing Done: Compile tested finch. Ran pidgin, verified the preferences window works, the pounce window dies on something talkatu related but that will be addressed separately. Reviewed at https://reviews.imfreedom.org/r/58/
* 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/+1
| | | | some pieces to purpleprivate.h
* Remove unused sslconn code.Elliott Sales de Andrade2020-04-271-1/+0
|
* purple_core_get_ui_info now transfers the PurpleUiInfo to the caller, so we ↵Gary Kramlich2020-04-091-2/+2
| | | | need to make sure to not cache it.
* the ui can return a null PurpleUiInfo so we need to handle thatGary Kramlich2020-03-201-3/+8
|
* Replace the ui info GHashTable with a gobject.Gary Kramlich2020-03-201-4/+5
|
* Remove glibcompat.h from all the files that don't actually need it.Gary Kramlich2019-11-151-1/+0
|
* Remove some unused utility functions.Elliott Sales de Andrade2019-11-041-1/+1
| | | | | | | | | | * purple_escape_js was used for WebKit stuff, now gone. * purple_ipv6_address_is_valid was removed earlier and the prototype was accidentally left in. * purple_markup_extract_info_field was used for MSN and Yahoo, now gone. * purple_str_binary_to_ascii seems to be from MSN and/or Yahoo. * purple_uts35_to_str was used for MSN, now gone.
* Remove old #include of http header and its init.Elliott Sales de Andrade2019-10-171-3/+0
|
* Fix several memory leaks.Elliott Sales de Andrade2019-10-021-2/+6
|
* Move custom smileys to XDG directories.Elliott Sales de Andrade2019-02-211-0/+2
| | | | | Smileys themselves go into data, and the xml goes in config.