From 1e0dd58661c9097fb41218ee7e3515f2d8ba8dac Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 17 Oct 2011 17:38:53 +0000 Subject: Add dead-ended knetworkmanager 0.8 source Add copy of same for knetworkmanager 0.9 starting point git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knetworkmanager8@1259314 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knetworkmanager-0.8/src/dbus/CMakeLists.txt | 88 +++++++++++++++++++ knetworkmanager-0.8/src/dbus/Makefile.am | 129 ++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 knetworkmanager-0.8/src/dbus/CMakeLists.txt create mode 100644 knetworkmanager-0.8/src/dbus/Makefile.am (limited to 'knetworkmanager-0.8/src/dbus') diff --git a/knetworkmanager-0.8/src/dbus/CMakeLists.txt b/knetworkmanager-0.8/src/dbus/CMakeLists.txt new file mode 100644 index 0000000..fa8d341 --- /dev/null +++ b/knetworkmanager-0.8/src/dbus/CMakeLists.txt @@ -0,0 +1,88 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${DBUS_TQT_INCLUDE_DIRS} +) + + +##### knm_dbus (static) ######################### + +set( INTROSPECTIONPATH "${CMAKE_SOURCE_DIR}/knetworkmanager-0.8/introspection" ) + +# options: +# p - generate proxy files +# i - generate interface files +# n - generate node files + +function( add_dbus_xml option basename classname namespace xmlfile ) + if( classname ) + set( classname -c ${classname} ) + endif( ) + add_custom_command( OUTPUT ${basename}.cpp ${basename}.h + COMMAND ${DBUSXML2QT3_EXECUTABLE} -${option} ${basename} ${classname} -N ${namespace} ${INTROSPECTIONPATH}/${xmlfile} 2>/dev/null + DEPENDS ${INTROSPECTIONPATH}/${xmlfile} ) +endfunction( ) + +add_dbus_xml( p networkmanagerproxy NetworkManagerProxy DBus nm-manager.xml ) +add_dbus_xml( p networkmanagervpnproxy NetworkManagerVPNProxy DBus nm-vpn-manager.xml ) +add_dbus_xml( p deviceproxy DeviceProxy DBus nm-device.xml ) +add_dbus_xml( p wirelessproxy WirelessDeviceProxy DBus nm-device-802-11-wireless.xml ) +add_dbus_xml( p wiredproxy WiredDeviceProxy DBus nm-device-802-3-ethernet.xml ) +add_dbus_xml( p gsmproxy GSMDeviceProxy DBus nm-device-gsm.xml ) +add_dbus_xml( p cdmaproxy CDMADeviceProxy DBus nm-device-cdma.xml ) +add_dbus_xml( p accesspointproxy AccessPointProxy DBus nm-access-point.xml ) +add_dbus_xml( p activeconnectionproxy ActiveConnectionProxy DBus nm-active-connection.xml ) +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} ) + + +# build the library + +tde_add_library( knm_dbus STATIC_PIC + SOURCES + 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 + vpnpluginproxy.cpp gsmproxy.cpp cdmaproxy.cpp +) diff --git a/knetworkmanager-0.8/src/dbus/Makefile.am b/knetworkmanager-0.8/src/dbus/Makefile.am new file mode 100644 index 0000000..6383078 --- /dev/null +++ b/knetworkmanager-0.8/src/dbus/Makefile.am @@ -0,0 +1,129 @@ +INCLUDES = $(DBUS_TQT_CFLAGS) $(QT_INCLUDES) + +INTROSPECTIONPATH = $(srcdir)/../../introspection/ + +MOCHEADERS = accesspointproxy.h deviceproxy.h networkmanagerproxy.h networkmanagervpnproxy.h \ + wiredproxy.h wirelessproxy.h activeconnectionproxy.h vpnconnectionproxy.h vpnpluginproxy.h gsmproxy.h cdmaproxy.h +#ip4configproxy.h + +MOCSUBS = accesspointproxy.moc deviceproxy.moc networkmanagerproxy.moc networkmanagervpnproxy.moc \ + wiredproxy.moc wirelessproxy.moc activeconnectionproxy.moc vpnconnectionproxy.moc vpnpluginproxy.moc gsmproxy.moc cdmaproxy.moc +#ip4configproxy.moc + +DBUSPROXY = 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 \ + vpnpluginproxy.cpp \ + gsmproxy.cpp \ + cdmaproxy.cpp +# ip4configproxy.cpp + +DBUSPROXYHEADERS = networkmanagerproxy.h \ + networkmanagervpnproxy.h \ + deviceproxy.h \ + wiredproxy.h \ + wirelessproxy.h \ + accesspointproxy.h \ + networkmanagersettings.h \ + connection.h \ + connectionnode.h \ + introspectableinterface.h \ + activeconnectionproxy.h \ + vpnconnectionproxy.h \ + vpnpluginproxy.h \ + gsmproxy.h \ + cdmaproxy.h +# ip4configproxy.h + +noinst_HEADERS = accesspointproxy.h \ +connection.h \ +connectionnode.h \ +deviceproxy.h \ +introspectableinterface.h \ +networkmanagerproxy.h \ +networkmanagervpnproxy.h \ +networkmanagersettings.h \ +wiredproxy.h \ +wirelessproxy.h \ +activeconnectionproxy.h \ +vpnconnectionproxy.h \ +vpnpluginproxy.h \ +gsmproxy.h \ +cdmaproxy.h +#ip4configproxy.h + +noinst_LTLIBRARIES = libknm_dbus.la +libknm_dbus_la_SOURCES = $(DBUSPROXY) + +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 + +networkmanagervpnproxy.cpp networkmanagervpnproxy.h: + $(DBUSXML2QT3) -p networkmanagervpnproxy -c NetworkManagerVPNProxy -N DBus $(INTROSPECTIONPATH)nm-vpn-manager.xml + +deviceproxy.cpp deviceproxy.h: + $(DBUSXML2QT3) -p deviceproxy -c DeviceProxy -N DBus $(INTROSPECTIONPATH)nm-device.xml + +wirelessproxy.cpp wirelessproxy.h: + $(DBUSXML2QT3) -p wirelessproxy -c WirelessDeviceProxy -N DBus $(INTROSPECTIONPATH)nm-device-802-11-wireless.xml + +wiredproxy.cpp wiredproxy.h: + $(DBUSXML2QT3) -p wiredproxy -c WiredDeviceProxy -N DBus $(INTROSPECTIONPATH)nm-device-802-3-ethernet.xml + +gsmproxy.cpp gsmproxy.h: + $(DBUSXML2QT3) -p gsmproxy -c GSMDeviceProxy -N DBus $(INTROSPECTIONPATH)nm-device-gsm.xml + +cdmaproxy.cpp cdmaproxy.h: + $(DBUSXML2QT3) -p cdmaproxy -c CDMADeviceProxy -N DBus $(INTROSPECTIONPATH)nm-device-cdma.xml + +#ip4configproxy.cpp ip4configproxy.h: +# $(DBUSXML2QT3) -p ip4configproxy -c IP4ConfigProxy -N DBus $(INTROSPECTIONPATH)nm-ip4-config.xml + +accesspointproxy.cpp accesspointproxy.h: + $(DBUSXML2QT3) -p accesspointproxy -c AccessPointProxy -N DBus $(INTROSPECTIONPATH)nm-access-point.xml + +activeconnectionproxy.cpp activeconnectionproxy.h: + $(DBUSXML2QT3) -p activeconnectionproxy -c ActiveConnectionProxy -N DBus $(INTROSPECTIONPATH)nm-active-connection.xml + +#vpnconnectionproxy.cpp vpnconnectionproxy.h: +# $(DBUSXML2QT3) -p vpnconnectionproxy -c VPNConnectionProxy -N DBus $(INTROSPECTIONPATH)nm-vpn-connection.xml + +#vpnconnectionproxy.cpp vpnconnectionproxy.h: +# $(DBUSXML2QT3) -p vpnconnectionproxy -N DBus $(INTROSPECTIONPATH)nm-vpn-connection.xml + +vpnconnectionproxy.cpp vpnconnectionproxy.h: + $(DBUSXML2QT3) -p vpnconnectionproxy -c VPNConnectionProxy -N DBus $(INTROSPECTIONPATH)nm-vpn-connection-only.xml + +vpnpluginproxy.cpp vpnpluginproxy.h: + $(DBUSXML2QT3) -p vpnpluginproxy -c VPNPluginProxy -N DBus $(INTROSPECTIONPATH)nm-vpn-plugin.xml + +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 + -- cgit v1.2.1