Commit Graph

15 Enmetoj

Author SHA1 Message Date
Jaidyn Ann dce82c2ba2 Use Server::Get(), clean up header usage
Instead of passing around pointers to the Server, Server::Get() returns
the server's pointer (simplifying some things a good bit).
As a result, headers have been cleaned up, and some redundant KeyMaps
have been placed in Maps.h.
2022-02-23 16:04:56 -06:00
Jaidyn Ann e092128200 Don't load multiple version of the same add-on
Now solely the one of highest priority is used (e.g.,
`non-packaged/add-ons/` over `system/add-ons/`).

Fixes #20
2022-02-23 12:11:17 -06:00
Jaidyn Ann c0580dfc17 Save disabling of accounts, make persistent
If the user disables an account, this saves it so that on any
subsequent start-ups, the account won't be connected until the user
explicitly re-enables it.

ProtocolSettings were reworked to allow for publicly loading/saving
settings from BMessages, rather than solely from BViews.

In addition, all program-side disabling, enabling, and toggling of
accounts has been consolidated into ProtocolManager. This makes life
easier for other parts of the program that have to do these things
anyway.
2021-08-16 11:58:27 -05:00
Jaidyn Ann ed7fe730cb Load protocols from any system add-on directory
… rather than soley "$APPDIR/protocols/".
The vague "protocols/" leaf was also renamed to "cardie/".
2021-08-15 00:55:16 -05:00
Jaidyn Ann e8e1ce0b05 Error notification if applying protocol settings fails 2021-08-05 20:43:08 -05:00
Jaidyn Ann fbe6e66743 Change class names 2021-06-20 12:44:20 -05:00
Jaidyn Ann 9cd4ce18e1 Disable some menu items when no account is active
When no accounts are active, all items in the Menubar->Chat menu are
disabled, and some other menu items related to starting/managing chats
are disabled in other views.

One new message was added to the API― IM_PROTOCOL_READY, which tells
Caya that a given protocol has logged in and is ready to receive
messages (rather than just sending).

This is currently done in XMPP after the roster is loaded, which be a
process that stalls the protocol for a few seconds. IM_PROTOCOL_READY
should only be sent after those initial, potentially time-heavy
operations.
2021-06-12 16:13:52 -05:00
Jaidyn Ann fe2f2ecad2 Slight redesign of add-on loading 2021-06-11 21:43:50 -05:00
Jaidyn Ann 6ca134f9f6 Load/Save account settings from correct paths 2021-05-21 15:52:33 -05:00
Jaidyn Ann 61a1f0baf1 Allow multiple protocols per add-on
Now an add-on can contain multiple protocols, and the protocol API has
changed. An add-on must now export protocol_count() and protocol_at(),
with the latter replacing protocol(). protocol_count() returning the
amount of protocols in a given add-on, and protocol_at(i) giving a
new CayaProtocol* "at" the given index.

CayaProtocol has also been changed, adding Signature(),
FriendlySignature(), Icon(), Path(), and SetPath(). The reasoning is
that different protocols (even within a single add-on) will have
different signatures and icons, so this data should be accessible from
the protocol itself.

CayaProtocolAddOn now has CountProtocols() and ProtocolAt(i), allowing
the accessing of multiple protocols. A CayaProtocolAddOn can be given a
default protocol index in the constructor, whose protocol will be
returned with Protocol(). Version() was also moved from CayaProtocol to
CayaProtocolAddOn.
2021-05-21 13:47:14 -05:00
plfiorini 98dd89fb55 Update copyright year. 2011-12-03 22:38:03 +00:00
plfiorini 6ef31b44f1 Check protocol add-ons API version 2010-07-10 19:28:29 +00:00
plfiorini af48b464ef Hide implementation details. 2010-05-28 17:11:16 +00:00
plfiorini 4bdc37a60e Merged multiprotocol branch with trunk. 2010-05-16 21:02:50 +00:00
plfiorini 0bf4b59922 Usual SVN tree (branches, tags, trunk). 2010-05-07 09:47:10 +00:00