Those plugins re really simple and don't need any initialization logic.
With the using statement, we do not need to add a constructor and pass the parent/args to the baseclass
- We do not need the return type. If a plugin declares it can handle the
packet it should do so. We don't have any fallback logic in place and
the packet types are namespaced with the plugin IDs anyway.
- Provide a default implementation with a warning, not all plugins need
to overwrite this
The rationale is explained in https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/
In case of KDEConnect, it impressively speeds up compilation. Before it
took 390 seconds on a clean build and with this change it took 330 seconds.
This is due to the mocs_compilation having to include the header files
and thus all their headers. Due to the lots of small plugins we have,
this means that the same headers must be compiled plenty of times.
When we include the moc files directly in the C++ file, they are already
available.
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.
Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
Summary: Braces to start a method are on a newline, braces to begin an in-method block are on the same line
Test Plan: Pure source code cosmetic changes. Hopefully no functionality has changed!
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: apol, nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15978
Summary:
Drop support for creating notifications from the SMS plugin. The old usecase is better handled by the notifications plugin reply box anyway
Rename packets defined in SMS plugin from PACKET_TYPE_TELEPHONY_* to PACKET_TYPE_SMS_*
Update TELEPHONY plugin packet description to point to SMS plugin
Define TELEPHONY_REQUEST_MUTE packet to replace old TELEPHONY_REQUEST with mute event field
Please see Android-side patch here: D15544
Test Plan:
I see four test cases, based on the version of the app being used, where "old" means any version built with sources not containing this revision and "new" means any version built with sources using this revision:
- New Android vs. New Desktop
- Supported and works for me
- New Android vs. Old Desktop
- Supported and works for me
- Old Android vs. New Desktop
- Not supported - Download a new app from the Play store or F-Droid
- Old Android vs. Old Desktop
- If this is broken, it is not my fault :)
In the supported use cases:
- Test SMS reply
- Receive SMS (or MMS!) message
- Verify that the //notification// plugin forwards a replyable notification and that replying works
- Test incoming call ringer mute
- Enable ringer volume (not vibrate)
- Receive phone call
- Verify a desktop notification with a Mute button appears
- Verify that clicking the mute button causes the phone to stop making the ringer noise (vibration not affected)
Reviewers: #kde_connect, albertvaka, nicolasfella
Reviewed By: #kde_connect, albertvaka, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D15543
Summary:
Telephony and SMS handling are quite distinct so they should be in separate plugins for better maintainability, given that @sredman has big plans with SMS.
This diff should be fully backwards compatible, but whether we really want to do that is up to discussion
Test Plan: Only supeficially tested. Receive an SMS (old way), Notification is shown
Reviewers: #kde_connect, sredman
Reviewed By: sredman
Subscribers: albertvaka, apol, sredman, kdeconnect, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D13594
Summary:
For real usecases of SMS support, we will almost always need access to the message history in some way
Specifically resolve T8338
Incidentally resolve T6651 since Telephony shall no longer create a notification
Test Plan:
Setup:
- Build corresponding Android-side diff (D11698)
- Build this diff
Step 1: Does anything at all work?
- Put a breakpoint in the handleBatchMessages method of the telephony plugin, ideally after constructing a Message object
- Use DBus to poke /modules/kdeconnect/devices/<deviceID>/telephony.requestAllConversations()
- Verify that the constructed Message is one you sent or received and that it is the most recent in the corresponding conversation
Step 2: DBus
- Open the Interface org.kde.kdeconnect.device.conversations of /modules/kdeconnect/devices/<deviceId>
- Poke activeConversations and verify an empty array is returned
- Poke requestAllConversationThreads
- Poke activeConversations and verify that a list of numbers has been returned. These are conversationIds
- Use a conversationId to call getFirstFromConversation
- Verify that the returned Message object is one which you recognize
- Note that if the message is an MMS it will be blank and meaningless. Try a different conversationId. MMS support "coming soon!"
Step 3: SMS App
- Use ccmake (or similar) to set SMSAPP_ENABLE to ON
- Build the project
- Run ./bin/kdeconnect-sms
- Verify that the app shows a list of everyone you have an SMS conversation with (MMS messages are stripped out)
- If you have the Contacts plugin working, verify that most contacts have their name and photo instead of their phone number
Reviewers: #kde_connect, nicolasfella, apol
Reviewed By: #kde_connect, nicolasfella, apol
Subscribers: andyholmes, apol, nicolasfella, #kde_connect
Tags: #kde_connect
Maniphest Tasks: T8338, T6651
Differential Revision: https://phabricator.kde.org/D11854
Creates a tiny messaging app that uses KPeople to query the contacts and
KDE connect telephony plugins to send plugins.
To be ready, still needs some work on the contacts sync side and some
messages history would be nice.
Summary: KDE Connect, now with correct naming!
Test Plan: It still builds.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D11036
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.
Basically:
- mFoo -> m_foo
- foo -> m_foo (if it is a member variable)
- Type &ref -> Type& ref
- Type *ptr -> Type* ptr
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7312
Summary:
Don't use QDBusConnection::ExportAllContents
No need to make connect and receivedPackage public slots (they're are the
parent's already)
Fixes T4975
Test Plan: Rough manual test
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Maniphest Tasks: T4975
Differential Revision: https://phabricator.kde.org/D3871
Summary: Introduces --send-sms and --destination
Test Plan: Sent an sms to Albert Vaca
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Differential Revision: https://phabricator.kde.org/D3252
We now use the telepathy interface when it's available, and fall back to
our custom dialog when it's not. This also makes the kdeconnect telepathy
connection manager be completely decoupled from the kdeconnect code.
CCMAIL: david@davidedmundson.co.uk
Makes it possible to specify the different properties sent at once,
rather than one by one as we used to do.
Also port whenever possible to the initializer-list syntax.
REVIEW: 128269
At the moment, telepathy integration needs to be compiled within the
daemon. This creates a rather aggressive dependency with Telepathy.
This plugin proposes to move into a plugin, so that if the plugin isn't
present, telepathy becomes out of the picture.
REVIEW: 128149
This sends recieved text messages to any Telepathy client and allows the
user to respond from there.
This should work with both our clients and Empathy.
An account on telepathy is created on activation.
As Telepathy clients expect backends to be always running, this is
started by the daemon to
suppress client errors. The plugin system then talks to the same CM via
use of a singleton accessor.
Based on work by Alexandr Akulich then tidied up and rebased.