summaryrefslogtreecommitdiffstats
path: root/knetworkmanager-0.8/src
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-05-09 01:54:37 +0200
committerSlávek Banko <slavek.banko@axis.cz>2019-05-09 01:54:37 +0200
commit2895b5480033a60f7d4b12f0ac050f71f806a472 (patch)
treef30163822c197c786b38f82d30a1d3e263dc07c5 /knetworkmanager-0.8/src
parent5b2672774a1a365e0596cba912c3ef98e7094212 (diff)
downloadknetworkmanager8-2895b5480033a60f7d4b12f0ac050f71f806a472.tar.gz
knetworkmanager8-2895b5480033a60f7d4b12f0ac050f71f806a472.zip
Change class names for DBus interfaces.
Change the way that MOC files are processed. This is related to the last changes in dbus-1-tqt. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'knetworkmanager-0.8/src')
-rw-r--r--knetworkmanager-0.8/src/dbus/CMakeLists.txt45
-rw-r--r--knetworkmanager-0.8/src/dbus/Makefile.am22
-rw-r--r--knetworkmanager-0.8/src/knetworkmanager-connection_dbus.h4
-rw-r--r--knetworkmanager-0.8/src/knetworkmanager-connection_secrets_dbus.h4
4 files changed, 27 insertions, 48 deletions
diff --git a/knetworkmanager-0.8/src/dbus/CMakeLists.txt b/knetworkmanager-0.8/src/dbus/CMakeLists.txt
index fa8d341..d180146 100644
--- a/knetworkmanager-0.8/src/dbus/CMakeLists.txt
+++ b/knetworkmanager-0.8/src/dbus/CMakeLists.txt
@@ -32,6 +32,13 @@ function( add_dbus_xml option basename classname namespace xmlfile )
add_custom_command( OUTPUT ${basename}.cpp ${basename}.h
COMMAND ${DBUSXML2QT3_EXECUTABLE} -${option} ${basename} ${classname} -N ${namespace} ${INTROSPECTIONPATH}/${xmlfile} 2>/dev/null
DEPENDS ${INTROSPECTIONPATH}/${xmlfile} )
+ if( "${option}" STREQUAL "p" )
+ add_custom_command( OUTPUT ${basename}.moc
+ COMMAND ${TMOC_EXECUTABLE} ${basename}.h -o ${basename}.moc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${basename}.h )
+ set_property( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${basename}.cpp APPEND
+ PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${basename}.moc )
+ endif( )
endfunction( )
add_dbus_xml( p networkmanagerproxy NetworkManagerProxy DBus nm-manager.xml )
@@ -46,33 +53,15 @@ add_dbus_xml( p activeconnectionproxy ActiveConnectionProxy DBus nm-active-conne
add_dbus_xml( p vpnconnectionproxy VPNConnectionProxy DBus nm-vpn-connection-only.xml )
add_dbus_xml( p vpnpluginproxy VPNPluginProxy DBus nm-vpn-plugin.xml )
add_dbus_xml( i networkmanagersettings SettingsInterface DBus nm-settings.xml )
-add_dbus_xml( i connection "" DBus nm-exported-connection.xml )
-
-add_custom_command( OUTPUT connectionnode.cpp connectionnode.h introspectableinterface.cpp introspectableinterface.h
- COMMAND ${DBUSXML2QT3_EXECUTABLE} -n connectionnode -c ConnectionNode -N DBus ${INTROSPECTIONPATH}/nm-exported-connection.xml 2>/dev/null
- COMMAND sed s/\#include\\ \\"secrets.h\\"// connectionnode.cpp > connectionnode.cpp_tmp
- COMMAND sed s/\#include\\ \\"introspectable.h\\"/\#include\\ \\"introspectableinterface.h\\"/ connectionnode.cpp_tmp > connectionnode.cpp
- COMMAND rm -f connectionnode.cpp_tmp
- DEPENDS ${INTROSPECTIONPATH}/nm-exported-connection.xml )
-
-
-# generate moc files
-set( MOCHEADERS accesspointproxy.h deviceproxy.h networkmanagerproxy.h networkmanagervpnproxy.h wiredproxy.h
- wirelessproxy.h activeconnectionproxy.h vpnconnectionproxy.h vpnpluginproxy.h gsmproxy.h cdmaproxy.h )
-
-foreach( _header_file ${MOCHEADERS} )
- get_filename_component( _basename "${_header_file}" NAME_WE )
- set( _moc_file ${_basename}.moc )
- list( APPEND _moc_files ${_moc_file} )
- add_custom_command( OUTPUT ${_moc_file}
- COMMAND ${TMOC_EXECUTABLE} ${_header_file} -o ${_moc_file}
- DEPENDS ${_header_file} )
-endforeach( )
-
-add_custom_command( OUTPUT mocfiles.cpp
- COMMAND cat ${_moc_files} > mocfiles.cpp
- DEPENDS ${_moc_files} )
+add_custom_command(
+ OUTPUT
+ connection.cpp connection.h
+ connectionnode.cpp connectionnode.h
+ introspectableInterface.cpp introspectableInterface.h
+ COMMAND ${DBUSXML2QT3_EXECUTABLE} -i connection -n connectionnode -c ConnectionNode -N DBus ${INTROSPECTIONPATH}/nm-exported-connection.xml 2>/dev/null
+ DEPENDS ${INTROSPECTIONPATH}/nm-exported-connection.xml
+)
# build the library
@@ -82,7 +71,7 @@ tde_add_library( knm_dbus STATIC_PIC
networkmanagerproxy.cpp networkmanagervpnproxy.cpp
deviceproxy.cpp wiredproxy.cpp wirelessproxy.cpp
accesspointproxy.cpp networkmanagersettings.cpp
- connection.cpp connectionnode.cpp introspectableinterface.cpp
- mocfiles.cpp activeconnectionproxy.cpp vpnconnectionproxy.cpp
+ connection.cpp connectionnode.cpp introspectableInterface.cpp
+ activeconnectionproxy.cpp vpnconnectionproxy.cpp
vpnpluginproxy.cpp gsmproxy.cpp cdmaproxy.cpp
)
diff --git a/knetworkmanager-0.8/src/dbus/Makefile.am b/knetworkmanager-0.8/src/dbus/Makefile.am
index 58c1419..7150344 100644
--- a/knetworkmanager-0.8/src/dbus/Makefile.am
+++ b/knetworkmanager-0.8/src/dbus/Makefile.am
@@ -19,8 +19,7 @@ DBUSPROXY = networkmanagerproxy.cpp \
networkmanagersettings.cpp \
connection.cpp \
connectionnode.cpp \
- introspectableinterface.cpp \
- mocfiles.cpp \
+ introspectableInterface.cpp \
activeconnectionproxy.cpp \
vpnconnectionproxy.cpp \
vpnpluginproxy.cpp \
@@ -37,7 +36,7 @@ DBUSPROXYHEADERS = networkmanagerproxy.h \
networkmanagersettings.h \
connection.h \
connectionnode.h \
- introspectableinterface.h \
+ introspectableInterface.h \
activeconnectionproxy.h \
vpnconnectionproxy.h \
vpnpluginproxy.h \
@@ -49,7 +48,7 @@ noinst_HEADERS = accesspointproxy.h \
connection.h \
connectionnode.h \
deviceproxy.h \
-introspectableinterface.h \
+introspectableInterface.h \
networkmanagerproxy.h \
networkmanagervpnproxy.h \
networkmanagersettings.h \
@@ -64,15 +63,13 @@ cdmaproxy.h
noinst_LTLIBRARIES = libknm_dbus.la
libknm_dbus_la_SOURCES = $(DBUSPROXY)
+libknm_dbus_la_DEPENDENCIES = $(MOCSUBS)
CLEANFILES = $(DBUSPROXY) $(DBUSPROXYHEADERS) $(MOCSUBS)
.h.moc:
$(TQTMOC) $< -o $@
-mocfiles.cpp: $(MOCSUBS)
- cat $(MOCSUBS) > mocfiles.cpp
-
networkmanagerproxy.cpp networkmanagerproxy.h:
$(DBUSXML2QT3) -p networkmanagerproxy -c NetworkManagerProxy -N DBus $(INTROSPECTIONPATH)nm-manager.xml
@@ -118,12 +115,5 @@ vpnpluginproxy.cpp vpnpluginproxy.h:
networkmanagersettings.cpp networkmanagersettings.h:
$(DBUSXML2QT3) -i networkmanagersettings -c SettingsInterface -N DBus $(INTROSPECTIONPATH)nm-settings.xml
-connection.cpp connection.h:
- $(DBUSXML2QT3) -i connection -N DBus $(INTROSPECTIONPATH)nm-exported-connection.xml
-
-connectionnode.cpp connectionnode.h introspectableinterface.cpp introspectableinterface.h:
- $(DBUSXML2QT3) -n connectionnode -c ConnectionNode -N DBus $(INTROSPECTIONPATH)nm-exported-connection.xml
- sed s/#include\ \"secrets.h\"// connectionnode.cpp > connectionnode.cpp_tmp
- sed s/#include\ \"introspectable.h\"/#include\ \"introspectableinterface.h\"/ connectionnode.cpp_tmp > connectionnode.cpp
- rm -f connectionnode.cpp_tmp
-
+connection.cpp connection.h connectionnode.cpp connectionnode.h introspectableInterface.cpp introspectableInterface.h:
+ $(DBUSXML2QT3) -i connection -n connectionnode -c ConnectionNode -N DBus $(INTROSPECTIONPATH)nm-exported-connection.xml
diff --git a/knetworkmanager-0.8/src/knetworkmanager-connection_dbus.h b/knetworkmanager-0.8/src/knetworkmanager-connection_dbus.h
index f7bdc00..1ef8820 100644
--- a/knetworkmanager-0.8/src/knetworkmanager-connection_dbus.h
+++ b/knetworkmanager-0.8/src/knetworkmanager-connection_dbus.h
@@ -41,12 +41,12 @@ class TQT_DBusObjectPath;
namespace ConnectionSettings
{
- class Connection;
+ class ConnectionInterface;
class ConnectionSetting;
class ConnectionDBusPrivate;
// DBUS abstraction for a connection
- class ConnectionDBus : public TQObject, public DBus::Connection
+ class ConnectionDBus : public TQObject, public DBus::ConnectionInterface
{
Q_OBJECT
diff --git a/knetworkmanager-0.8/src/knetworkmanager-connection_secrets_dbus.h b/knetworkmanager-0.8/src/knetworkmanager-connection_secrets_dbus.h
index 62a3d41..40c6631 100644
--- a/knetworkmanager-0.8/src/knetworkmanager-connection_secrets_dbus.h
+++ b/knetworkmanager-0.8/src/knetworkmanager-connection_secrets_dbus.h
@@ -47,7 +47,7 @@ namespace ConnectionSettings
class ConnectionSecretsDBusPrivate;
// a connection wraps multiple settings
- class ConnectionSecretsDBus : public TQObject, public DBus::Secrets
+ class ConnectionSecretsDBus : public TQObject, public DBus::SecretsInterface
{
Q_OBJECT
@@ -59,7 +59,7 @@ namespace ConnectionSettings
void SendGetSecretsError();
protected:
- // implementation of the Secrets DBus-interface
+ // implementation of the SecretsInterface DBus-interface
void GetSecretsAsync(int, const TQString&, const TQStringList&, bool);
void handleMethodReply(const TQT_DBusMessage& reply);
bool handleSignalSend(const TQT_DBusMessage& reply);