Re: dbus-send examples



Hi,
I paste some I ever used. Hope can help you.
It's base on the NM0.7.0

echo "GetDevices"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.GetDevices

echo "ActivateConnection"
echo "service name:$1"
echo "connection path:$2"
echo "device object path:$3"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.ActivateConnection string:"$1" objpath:"$2" objpath:"$3"

echo "DeactivateConnection"
echo "active connection:$1"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.DeactivateConnection objpath:$1


echo "Sleep"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.Sleep boolean:$2

echo "Get org.freedesktop.NetworkManager Property"
echo "Interface:$2 property:$3"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Get string:"$2" string:"$3"

echo "List user connections"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManagerUserSettings' '/org/freedesktop/NetworkManagerSettings' org.freedesktop.NetworkManagerSettings.ListConnections

echo "List system connections"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManagerSystemSettings' '/org/freedesktop/NetworkManagerSettings' org.freedesktop.NetworkManagerSettings.ListConnections

2010/1/22 Kiran Bhat <kiranbail yahoo co in>
Hi
  is there any dbus-send Api  examples for Network manager.

regards
kiran


The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]