all: port everything to libnm

Since the API has not changed at this point, this is mostly just a
matter of updating Makefiles, and changing references to the library
name in comments.

NetworkManager cannot link to libnm due to the duplicated type/symbol
names. So it links to libnm-core.la directly, which means that
NetworkManager gets a separate copy of that code from libnm.so.
Everything else links to libnm.
This commit is contained in:
Dan Winship
2014-05-19 13:44:02 -04:00
parent c5daa4c4df
commit a7c4d53d03
62 changed files with 179 additions and 233 deletions

View File

@@ -20,11 +20,11 @@
# Copyright (C) 2013 Red Hat, Inc.
#
from gi.repository import NetworkManager, NMClient
from gi.repository import NM
#
# This example lists Wi-Fi access points NetworkManager scanned on Wi-Fi devices.
# It calls libnm-glib functions using GObject introspection.
# It calls libnm functions using GObject introspection.
#
# Note the second line of the file: coding=utf-8
# It is necessary because we use unicode characters and python would produce
@@ -57,16 +57,16 @@ def print_ap_info(ap):
print "SSID: %s" % (ap.get_ssid())
print "BSSID: %s" % (ap.get_bssid())
print "Frequency: %s" % (frequency)
print "Channel: %s" % (NetworkManager.utils_wifi_freq_to_channel(frequency))
print "Channel: %s" % (NM.utils_wifi_freq_to_channel(frequency))
print "Strength: %s %s%%" % (signal_bars[(clamp(strength-5, 0, 99)+24)/25], strength)
print
if __name__ == "__main__":
nmc = NMClient.Client.new()
nmc = NM.Client.new()
devs = nmc.get_devices()
for dev in devs:
if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
if dev.get_device_type() == NM.DeviceType.WIFI:
print_device_info(dev)
for ap in dev.get_access_points():
print_ap_info(ap)