Commit Graph

11 Enmetoj

Author SHA1 Message Date
Jaidyn Ann c0f126206a Include default templates, split "room"
The "room" template has been split into two seperate
templates― "join_room" and "create_room". Before, "room" was used in the
room creation window, but now that's delegated to "create_room".

"join_room" is used with the join window― so now, the add-on has total
control over the slots used to join/create rooms generally, if they
specify the templates. Even a "/join" command could be overriden by the
add-on.

Also, default templates are now in use. Rather than add-ons being
required to specify templates, there are sensible defaults included with
Cardie for each one.
2021-07-05 13:48:33 -05:00
Jaidyn Ann ee8584e14c (purple) Fetch room template from purple 2021-07-04 11:31:32 -05:00
Jaidyn Ann 4d044144b3 (purple) Roster management
Fixes #28
2021-07-03 15:01:00 -05:00
Jaidyn Ann d883c23d18 Reorganize settings directory, custom purple paths
The settings file-hierarchy has been changed a bit:
	* Cardie/
		* preferences
		* Accounts/
		* Cache/
			* Accounts/
			* Add-Ons/

`Cardie/Protocols` is now `Cardie/Accounts`, and the cache directory
has been split into two. `Cache/Accounts/` is for account-specific
cached data (e.g., cached roster icons, data, etc.), and
`Cache/Protocols` is for protocol-wide settings/data.

For purple, this will be used as the user's libpurple directory,
which has been moved from the default of `~/.purple` (yikes!)

Some plugin search-paths have been given to purple, too― lib
directories + "/purple2/", and Cardie/Cache/Add-Ons/purple/plugins/.
2021-06-30 21:05:43 -05:00
Jaidyn Ann 30e3d6eefd (purple) Handle own status changes 2021-06-27 20:42:37 -05:00
Jaidyn Ann f755fa298b (purple) Disconnection of accounts, quit server w/o Cardie 2021-06-27 17:33:20 -05:00
Jaidyn Ann 588b32b9c3 (purple) Main loop, server→add-on→app communication
Now the purple add-on's starting to come together with a clear
structure:
	* Add-on sends IM_MESSAGES etc to the server for processing
	* Server sends all (reply/etc) messages to add-on, which sends
	  to app

It's worth noting that on the add-on's side, no looper or handler is
used for receiving messages, it's all through sending serialized
BMessages to the add-on's connect_thread buffer.

PurpleAccounts are now reliably associated with Cardie's account names
and the thread ID of their respective connect_thread.

The GLib main-loop is gone over regularly thanks to a message runner.

Now, the add-on can log into/create accounts, connect to them, and send
the IM_PROTOCOL_READY notification to Cardie as appropriate.
2021-06-27 16:46:38 -05:00
Jaidyn Ann 0aea480ec2 (purple) Loading Cardie-side account settings into PurpleAccount 2021-06-26 20:40:39 -05:00
Jaidyn Ann 6507a4182f Receive protocols' settings templates from libpurple 2021-06-24 12:22:34 -05:00
Jaidyn Ann ddaf39c300 Returning libpurple protocol amount and names
The libpurple add-on has been split into two parts― a background process
that will actually interface with libpurple, and an add-on that acts as
intermediary between Cardie and the process. This helps prevent
redundancy, and is giving me a lot less trouble that directly loading
libpurple.

The protocol amount and names are now returned by the add-on (through
protocol_count() and protocol_at() respectively)― you can see them in
Preferences' protocol list.
2021-06-23 23:57:27 -05:00
Jaidyn Ann b52be74dfb Init libpurple add-on 2021-06-22 14:42:07 -05:00