src/eric7/MicroPython/Devices/DeviceBase.py

branch
eric7
changeset 10153
ffe7432f716b
parent 10144
45a9177c8e77
child 10173
9c64ac720853
diff -r 33e7b9d3f91c -r ffe7432f716b src/eric7/MicroPython/Devices/DeviceBase.py
--- a/src/eric7/MicroPython/Devices/DeviceBase.py	Wed Aug 02 17:22:20 2023 +0200
+++ b/src/eric7/MicroPython/Devices/DeviceBase.py	Thu Aug 03 17:33:07 2023 +0200
@@ -1480,6 +1480,16 @@
         """
         return False, ""
 
+    def hasWifiCountry(self):
+        """
+        Public method to check, if the device (potentially) has support to set the
+        WiFi country.
+
+        @return flag indicating the support of WiFi country
+        @rtype bool
+        """
+        return False
+
     def addDeviceWifiEntries(self, menu):
         """
         Public method to add device specific entries to the given menu.
@@ -1499,7 +1509,7 @@
         """
         return {}, {}, {}
 
-    def connectWifi(self, ssid, password):  # noqa: U100
+    def connectWifi(self, ssid, password, hostname):  # noqa: U100
         """
         Public method to connect a device to a WiFi network.
 
@@ -1507,6 +1517,8 @@
         @type str
         @param password password needed to connect
         @type str
+        @param hostname host name of the device
+        @type str
         @return tuple containing the connection status and an error string
         @rtype tuple of (bool, str)
         """
@@ -1539,7 +1551,7 @@
         """
         return False
 
-    def writeCredentials(self, ssid, password):  # noqa: U100
+    def writeCredentials(self, ssid, password, hostname, country):  # noqa: U100
         """
         Public method to write the given credentials to the connected device and modify
         the start script to connect automatically.
@@ -1548,6 +1560,10 @@
         @type str
         @param password password needed to authenticate
         @type str
+        @param hostname host name of the device
+        @type str
+        @param country WiFi country code
+        @type str
         @return tuple containing a flag indicating success and an error message
         @rtype tuple of (bool, str)
         """
@@ -1594,7 +1610,12 @@
         return True, ""
 
     def startAccessPoint(
-        self, ssid, security=None, password=None, ifconfig=None  # noqa: U100
+        self,
+        ssid,  # noqa: U100
+        security=None,  # noqa: U100
+        password=None,  # noqa: U100
+        hostname=None,  # noqa: U100
+        ifconfig=None,  # noqa: U100
     ):
         """
         Public method to start the access point interface.
@@ -1605,6 +1626,8 @@
         @type int (optional)
         @param password password (defaults to None)
         @type str (optional)
+        @param hostname host name of the device (defaults to None)
+        @type str (optional)
         @param ifconfig IPv4 configuration for the access point if not default
             (IPv4 address, netmask, gateway address, DNS server address)
         @type tuple of (str, str, str, str)
@@ -1687,13 +1710,15 @@
         """
         return []
 
-    def connectToLan(self, config):  # noqa: U100
+    def connectToLan(self, config, hostname):  # noqa: U100
         """
         Public method to connect the connected device to the LAN.
 
         @param config configuration for the connection (either the string 'dhcp'
             for a dynamic address or a tuple of four strings with the IPv4 parameters.
         @type str or tuple of (str, str, str, str)
+        @param hostname host name of the device
+        @type str
         @return tuple containing a flag indicating success and an error message
         @rtype tuple of (bool, str)
         """
@@ -1735,7 +1760,7 @@
         """
         return True, ""
 
-    def writeLanAutoConnect(self, config):  # noqa: U100
+    def writeLanAutoConnect(self, config, hostname):  # noqa: U100
         """
         Public method to generate a script and associated configuration to connect the
         device to the LAN during boot time.
@@ -1743,6 +1768,8 @@
         @param config configuration for the connection (either the string 'dhcp'
             for a dynamic address or a tuple of four strings with the IPv4 parameters.
         @type str or tuple of (str, str, str, str)
+        @param hostname host name of the device
+        @type str
         @return tuple containing a flag indicating success and an error message
         @rtype tuple of (bool, str)
         """

eric ide

mercurial