kdeconnect-kde/interfaces/CMakeLists.txt

78 lines
3.2 KiB
CMake
Raw Normal View History

project(KDEConnectInterfaces)
function(geninterface source_h output_h)
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/${output_h}.xml)
qt5_generate_dbus_interface( ${source_h} ${xml_file})
list(APPEND libkdeconnect_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${output_h})
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
2016-06-16 00:52:00 +01:00
qt5_add_dbus_interface(libkdeconnect_SRC ${xml_file} ${output_h})
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
2015-07-22 02:21:06 +01:00
set(libkdeconnect_HEADERS ${libkdeconnect_HEADERS} PARENT_SCOPE)
endfunction()
set(libkdeconnect_SRC
dbusinterfaces.cpp
devicesmodel.cpp
notificationsmodel.cpp
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
remotecommandsmodel.cpp
remotesinksmodel.cpp
# modeltest.cpp
)
set(libkdeconnect_public_HEADERS
KDEConnect/DevicesModel
KDEConnect/NotificationsModel
)
set(libkdeconnect_HEADERS
devicesmodel.h
notificationsmodel.h
(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.h
dbusinterfaces.h
remotecommandsmodel.h
${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h
)
2015-07-22 02:21:06 +01:00
geninterface(${CMAKE_SOURCE_DIR}/core/daemon.h daemoninterface)
geninterface(${CMAKE_SOURCE_DIR}/core/device.h deviceinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notificationsdbusinterface.h devicenotificationsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h devicefindmyphoneinterface)
2015-07-22 02:21:06 +01:00
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h remotecontrolinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h lockdeviceinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h remotecommandsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h remotekeyboardinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sms/smsplugin.h smsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h conversationsinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/share/shareplugin.h shareinterface)
geninterface(${CMAKE_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h remotesystemvolumeinterface)
add_library(kdeconnectinterfaces SHARED ${libkdeconnect_SRC})
set_target_properties(kdeconnectinterfaces PROPERTIES
VERSION ${KDECONNECT_VERSION}
SOVERSION ${KDECONNECT_VERSION_MAJOR}
)
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
2019-06-09 16:28:49 +01:00
target_include_directories(kdeconnectinterfaces PUBLIC ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR})
2019-04-30 18:03:24 +01:00
target_link_libraries(kdeconnectinterfaces
LINK_PUBLIC
Qt5::Gui
Qt5::DBus
LINK_PRIVATE
KF5::ConfigCore
2015-05-18 02:47:31 +01:00
KF5::I18n
2019-06-09 16:28:49 +01:00
kdeconnectcore
)
install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)