2019-12-21 14:16:33 +00:00
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\")
|
|
|
|
|
2015-06-18 18:06:14 +01:00
|
|
|
function(geninterface source_h output_h)
|
2023-07-23 15:40:28 +01:00
|
|
|
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/generated/${output_h}.xml)
|
2022-10-29 15:51:41 +01:00
|
|
|
qt_generate_dbus_interface( ${source_h} ${xml_file})
|
2013-08-21 17:25:44 +01:00
|
|
|
|
2015-06-18 18:06:14 +01:00
|
|
|
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
|
|
|
|
2023-07-23 15:40:28 +01:00
|
|
|
qt_add_dbus_interface(libkdeconnect_SRC ${xml_file} generated/${output_h})
|
2015-06-18 18:06:14 +01:00
|
|
|
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
|
|
|
|
endfunction()
|
2014-04-12 20:54:37 +01:00
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
set(libkdeconnect_SRC
|
|
|
|
dbusinterfaces.cpp
|
|
|
|
devicesmodel.cpp
|
|
|
|
notificationsmodel.cpp
|
2015-06-11 15:09:27 +01:00
|
|
|
devicessortproxymodel.cpp
|
(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-05-25 15:21:56 +01:00
|
|
|
conversationmessage.cpp
|
2018-06-18 20:01:29 +01:00
|
|
|
remotecommandsmodel.cpp
|
2018-11-07 19:54:00 +00:00
|
|
|
remotesinksmodel.cpp
|
2019-07-21 16:51:13 +01:00
|
|
|
devicespluginfilterproxymodel.cpp
|
2019-10-27 17:08:51 +00:00
|
|
|
pluginmodel.cpp
|
|
|
|
commandsmodel.cpp
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2020-01-06 19:28:36 +00:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h daemoninterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/core/device.h deviceinterface)
|
2020-08-22 21:37:18 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/battery/batteryplugin.h batteryinterface)
|
2021-03-12 23:27:16 +00:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/connectivity-report/connectivity_reportplugin.h connectivityinterface)
|
2020-01-06 19:28:36 +00:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface)
|
2020-10-15 03:03:05 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notificationsplugin.h devicenotificationsinterface)
|
2020-01-06 19:28:36 +00:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h devicefindmyphoneinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h remotecontrolinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h lockdeviceinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h remotecommandsinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h remotekeyboardinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/smsplugin.h smsinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h conversationsinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/share/shareplugin.h shareinterface)
|
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h remotesystemvolumeinterface)
|
2020-05-05 12:53:41 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/bigscreen/bigscreenplugin.h bigscreeninterface)
|
2021-10-19 00:25:14 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/virtualmonitor/virtualmonitorplugin.h virtualmonitorinterface)
|
2022-09-28 14:03:48 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/photo/photoplugin.h photointerface)
|
2023-06-07 20:48:25 +01:00
|
|
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/clipboard/clipboardplugin.h deviceclipboardinterface)
|
2018-11-07 19:54:00 +00:00
|
|
|
|
2023-04-18 15:00:15 +01:00
|
|
|
if ("${QT_MAJOR_VERSION}" STREQUAL "6")
|
|
|
|
add_library(kdeconnectinterfaces STATIC)
|
2023-07-20 15:17:56 +01:00
|
|
|
set_property(TARGET kdeconnectinterfaces PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2023-04-18 15:00:15 +01:00
|
|
|
else()
|
|
|
|
add_library(kdeconnectinterfaces)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
target_sources(kdeconnectinterfaces PRIVATE ${libkdeconnect_SRC})
|
2023-07-20 14:59:37 +01:00
|
|
|
ecm_qt_declare_logging_category(kdeconnectinterfaces
|
|
|
|
HEADER interfaces_conversation_message_debug.h
|
|
|
|
IDENTIFIER CONVERSATION_MESSAGE_LOGGING_CATEGORY CATEGORY_NAME kdeconnect.interfaces.conversationmessage
|
|
|
|
DEFAULT_SEVERITY Warning
|
|
|
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversation message)")
|
|
|
|
|
|
|
|
ecm_qt_declare_logging_category(kdeconnectinterfaces
|
|
|
|
HEADER interfaces_debug.h
|
|
|
|
IDENTIFIER KDECONNECT_INTERFACES CATEGORY_NAME kdeconnect.interfaces
|
|
|
|
DEFAULT_SEVERITY Warning
|
|
|
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (interfaces)")
|
|
|
|
|
|
|
|
|
2014-06-14 14:22:40 +01:00
|
|
|
set_target_properties(kdeconnectinterfaces PROPERTIES
|
2014-04-13 12:13:06 +01:00
|
|
|
VERSION ${KDECONNECT_VERSION}
|
|
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2023-07-23 15:40:28 +01:00
|
|
|
# pretend the dbus generated headers are from the system so that clazy and other similar
|
|
|
|
# tools do not show warnings about their contents
|
|
|
|
target_include_directories(kdeconnectinterfaces SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/generated)
|
|
|
|
|
2014-06-14 14:22:40 +01:00
|
|
|
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
|
|
|
|
|
|
|
target_link_libraries(kdeconnectinterfaces
|
2014-07-01 01:11:55 +01:00
|
|
|
LINK_PUBLIC
|
2022-10-29 15:51:41 +01:00
|
|
|
Qt${QT_MAJOR_VERSION}::Gui
|
|
|
|
Qt${QT_MAJOR_VERSION}::DBus
|
2023-04-15 11:57:52 +01:00
|
|
|
KF${QT_MAJOR_VERSION}::ConfigCore
|
2014-07-01 01:11:55 +01:00
|
|
|
LINK_PRIVATE
|
2019-10-27 17:08:51 +00:00
|
|
|
kdeconnectcore
|
2023-04-15 11:57:52 +01:00
|
|
|
KF${QT_MAJOR_VERSION}::I18n
|
2019-06-09 16:28:49 +01:00
|
|
|
kdeconnectcore
|
2023-04-15 11:57:52 +01:00
|
|
|
KF${QT_MAJOR_VERSION}::CoreAddons
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2022-04-20 23:50:14 +01:00
|
|
|
install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
|