Commit graph

14 commits

Author SHA1 Message Date
Nicolas Fella
8f41be36dc Remove unneeded destructor/copy constructor/copy assignment operator
We don't have a custom destructor and the copy ctor/assignment operator don't do anything special, so the default one will do the right thing.

This is in accordance with the rule of zero (https://cpppatterns.com/patterns/rule-of-zero.html)
2020-07-29 17:30:29 +02:00
Nicolas Fella
1bd59787e2 [sms] Change address type in DBus API from variant to variantlist
While mostly theoretical it makes for a more expressive API since it communicates that it is a list instead of a single value. It also allows to get rid of some conversion code.

This is also preparation work for potentially using the custom type capabilities that QtDBus offers.
2020-07-29 15:18:19 +00:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
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.
2020-05-26 18:55:47 +02:00
Aniket Kumar
d0367f11fb Removing earlier hack to pass an address as a string instead of ConversationAdress type. 2020-05-18 08:11:26 +05:30
Abdel-Rahman Abdel-Rahman
d3062cafd4 Receive SMS subscription ID and reply using it
This interprets the "sub_id" field to use it later for replying in
order to reply to SMS messages from the same SIM.
2020-04-07 20:01:18 +00:00
Simon Redman
edee0e0e9d [SMS App] Handle addresses for multitarget messages
## Summary

Upgrade the SMS App to handle multitarget addresses in the "addresses" field of a message and drop usage of the "address" field

Also note that this has all the commits from https://invent.kde.org/kde/kdeconnect-kde/merge_requests/97, but I will rebase those away once that patch is landed

Bonus: Image composition for multitarget conversations

## Test Plan
- Apply Android-side patch https://invent.kde.org/kde/kdeconnect-android/merge_requests/80
- Launch SMS App
- Notice that you can see all the recipients of multitarget messages. (Replying still not supported, but might get implemented as part of fixing replying to single-target messages)
2019-07-19 17:33:15 +00:00
Simon Redman
ee9547ed89 [SMS App] Basic plain-text MMS support
## Summary

Desktop companion to https://invent.kde.org/kde/kdeconnect-android/merge_requests/78

Give desktop SMS app a basic understanding of the MMSes coming from Android:
- Show a fake body if we get an attachment we can't display (for now, any attachment)
- Display a fake contact header for multi-target messages since Android does not yet export multi-target address information
- Disable attempting to reply to multi-target messages

BUG: 398889

## Test Plan
### Before:
MMS messages were silently dropped, meaning:
 - Group MMS conversations were not visible
 - Single-target conversations with the most-recent message an MMS were not visible

### After:
 - Install https://invent.kde.org/kde/kdeconnect-android/merge_requests/78
 - Multi-target conversations are displayed (kind of ugly, since they have no contact information
 - Single-target conversations which end with an MMS are displayed
 - Plain-text MMS is displayed nicely
 - MMS attachments don't show
   - MMS which are only an attachment with no body are displayed with a dummy body
2019-07-19 15:29:28 +00:00
Nicolas Fella
d4026861ab Clean up includes 2019-04-30 19:03:24 +02:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
fa66a714d1 Don't use QObject for Conversationmessage 2019-03-21 17:42:27 +00:00
Simon Redman
5cdfb9b087 [Desktop] Change ThreadID to long
Summary: Change ThreadID to long

Test Plan:
Messages should send and receive as before. Additionally, if your device has assigned extremely large ThreadIDs, the SMS plugin should no longer crash.

This patch corresponds to the Android-side revision D17517

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17516
2018-12-11 18:03:30 -07:00
Simon Redman
c1e36895b5 [Desktop] Make message syncronization interface capable of handling future changes
Summary:
Add "event" field to ConversationMessage

Update packet type with proper field names and commenting

Future "proof" SmsPlugin against new event types

Test Plan:
 - Install the corresponding Android-side patch D16600
 - Verify that it is possible to synchronize messages the same as it was before

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16599
2018-11-15 17:04:24 -07:00
Simon Redman
563dde9891 Correct braces and add contributors
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
2018-10-06 21:59:15 -06:00
Aleix Pol
31e93ef7bf (WIP) Upgrade Telephony plugin to read SMS history (KDE side)
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
2018-06-09 13:35:26 -06:00