diff --git a/ChangeLog b/ChangeLog index 50685f6d..69094667 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18324,3 +18324,6 @@ * Changed the PyPAD namespace from 'PyPAD' to 'pypad'. * Changed the installation location of PyPAD scripts from '@libdir@/rivendell/PyPAD/' to '@libdir@/rivendell/pypad/'. +2019-01-08 Fred Gleason + * Renamed the 'pypad.Receiver::setCallback()' method to + 'pypad.Receiver::setPadCallback()'. diff --git a/apis/pypad/api/pypad.py b/apis/pypad/api/pypad.py index 3168d8bb..27cbd245 100644 --- a/apis/pypad/api/pypad.py +++ b/apis/pypad/api/pypad.py @@ -735,13 +735,13 @@ class Update(object): class Receiver(object): def __init__(self): - self.__callback=None + self.__pad_callback=None self.__timer_callback=None self.__timer_interval=None self.__config_parser=None def __pypad_Process(self,pad): - self.__callback(pad) + self.__pad_callback(pad) def __pypad_TimerProcess(self,config): self.__timer_callback(config) @@ -756,11 +756,11 @@ class Receiver(object): creds=self.__getDbCredentials() return MySQLdb.connect(creds[2],creds[0],creds[1],creds[3]) - def setCallback(self,callback): + def setPadCallback(self,callback): """ Set the processing callback. """ - self.__callback=callback + self.__pad_callback=callback def setTimerCallback(self,interval,callback): """ diff --git a/apis/pypad/scripts/pypad_ando.py b/apis/pypad/scripts/pypad_ando.py index 48f3df10..ff5b077a 100755 --- a/apis/pypad/scripts/pypad_ando.py +++ b/apis/pypad/scripts/pypad_ando.py @@ -83,6 +83,6 @@ try: except IndexError: eprint('pypad_ando.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.setTimerCallback(30,ProcessTimer) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_filewrite.py b/apis/pypad/scripts/pypad_filewrite.py index 8f5bfa4e..764d9b70 100755 --- a/apis/pypad/scripts/pypad_filewrite.py +++ b/apis/pypad/scripts/pypad_filewrite.py @@ -54,5 +54,5 @@ try: except IndexError: eprint('pypad_filewrite.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_icecast2.py b/apis/pypad/scripts/pypad_icecast2.py index eb4661cf..02dcff43 100755 --- a/apis/pypad/scripts/pypad_icecast2.py +++ b/apis/pypad/scripts/pypad_icecast2.py @@ -92,7 +92,7 @@ try: except IndexError: eprint('pypad_icecast2: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) iprint('Started') rcvr.start(sys.argv[1],int(sys.argv[2])) iprint('Stopped') diff --git a/apis/pypad/scripts/pypad_inno713.py b/apis/pypad/scripts/pypad_inno713.py index a6f30165..5698e876 100755 --- a/apis/pypad/scripts/pypad_inno713.py +++ b/apis/pypad/scripts/pypad_inno713.py @@ -95,5 +95,5 @@ try: except IndexError: eprint('pypad_inno713.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_liqcomp.py b/apis/pypad/scripts/pypad_liqcomp.py index cedab172..33ef4328 100755 --- a/apis/pypad/scripts/pypad_liqcomp.py +++ b/apis/pypad/scripts/pypad_liqcomp.py @@ -68,5 +68,5 @@ try: except IndexError: eprint('pypad_liqcomp.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_live365.py b/apis/pypad/scripts/pypad_live365.py index 3ae46241..7065bdcd 100755 --- a/apis/pypad/scripts/pypad_live365.py +++ b/apis/pypad/scripts/pypad_live365.py @@ -72,5 +72,5 @@ try: except IndexError: eprint('pypad_live365.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_serial.py b/apis/pypad/scripts/pypad_serial.py index 5fa69ea3..6f3eeb52 100755 --- a/apis/pypad/scripts/pypad_serial.py +++ b/apis/pypad/scripts/pypad_serial.py @@ -65,5 +65,5 @@ try: except IndexError: eprint('pypad_serial.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_shoutcast1.py b/apis/pypad/scripts/pypad_shoutcast1.py index c002ed0a..8de169ed 100755 --- a/apis/pypad/scripts/pypad_shoutcast1.py +++ b/apis/pypad/scripts/pypad_shoutcast1.py @@ -79,5 +79,5 @@ try: except IndexError: eprint('pypad_shoutcast1.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_spinitron.py b/apis/pypad/scripts/pypad_spinitron.py index 6e38221d..b18b3231 100755 --- a/apis/pypad/scripts/pypad_spinitron.py +++ b/apis/pypad/scripts/pypad_spinitron.py @@ -124,5 +124,5 @@ try: except IndexError: eprint('pypad_spinitron.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_spottrap.py b/apis/pypad/scripts/pypad_spottrap.py index 58463957..d8331848 100755 --- a/apis/pypad/scripts/pypad_spottrap.py +++ b/apis/pypad/scripts/pypad_spottrap.py @@ -67,5 +67,5 @@ try: except IndexError: eprint('pypad_spottrap.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_tunein.py b/apis/pypad/scripts/pypad_tunein.py index 5d13099f..cba1dd5f 100755 --- a/apis/pypad/scripts/pypad_tunein.py +++ b/apis/pypad/scripts/pypad_tunein.py @@ -98,7 +98,7 @@ try: except IndexError: eprint('pypad_tunein.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) iprint('Started') rcvr.start(sys.argv[1],int(sys.argv[2])) iprint('Stopped') diff --git a/apis/pypad/scripts/pypad_udp.py b/apis/pypad/scripts/pypad_udp.py index 97e7f968..a4cfc8d6 100755 --- a/apis/pypad/scripts/pypad_udp.py +++ b/apis/pypad/scripts/pypad_udp.py @@ -54,5 +54,5 @@ try: except IndexError: eprint('pypad_udp.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_urlwrite.py b/apis/pypad/scripts/pypad_urlwrite.py index 37add557..55154d10 100755 --- a/apis/pypad/scripts/pypad_urlwrite.py +++ b/apis/pypad/scripts/pypad_urlwrite.py @@ -65,5 +65,5 @@ try: except IndexError: eprint('pypad_urlwrite.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_walltime.py b/apis/pypad/scripts/pypad_walltime.py index 173b188a..779cffeb 100755 --- a/apis/pypad/scripts/pypad_walltime.py +++ b/apis/pypad/scripts/pypad_walltime.py @@ -65,5 +65,5 @@ try: except IndexError: eprint('pypad_walltime.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_xds.py b/apis/pypad/scripts/pypad_xds.py index 47a39cdd..42b016f0 100755 --- a/apis/pypad/scripts/pypad_xds.py +++ b/apis/pypad/scripts/pypad_xds.py @@ -100,5 +100,5 @@ try: except IndexError: eprint('pypad_xds.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/scripts/pypad_xmpad.py b/apis/pypad/scripts/pypad_xmpad.py index ac49c322..40889f1f 100755 --- a/apis/pypad/scripts/pypad_xmpad.py +++ b/apis/pypad/scripts/pypad_xmpad.py @@ -179,6 +179,6 @@ try: except IndexError: eprint('pypad_xmpad.py: USAGE: cmd ') sys.exit(1) -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) rcvr.setTimerCallback(30,ProcessTimer) rcvr.start(sys.argv[1],int(sys.argv[2])) diff --git a/apis/pypad/tests/filepath_test.py b/apis/pypad/tests/filepath_test.py index 81247532..efd365d3 100755 --- a/apis/pypad/tests/filepath_test.py +++ b/apis/pypad/tests/filepath_test.py @@ -68,7 +68,7 @@ rcvr=pypad.Receiver() # # Tell it to use the callback # -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) # # Start the receiver, giving it the hostname or IP address and TCP port of diff --git a/apis/pypad/tests/now_and_next.py b/apis/pypad/tests/now_and_next.py index a44f98ee..1b6aa63f 100755 --- a/apis/pypad/tests/now_and_next.py +++ b/apis/pypad/tests/now_and_next.py @@ -52,14 +52,14 @@ def ProcessPad(update): print("%03d:xxxx NEXT: [none]" % update.machine()) # -# Create an instance of 'pypadReceiver' +# Create an instance of 'pypad.Receiver' # rcvr=pypad.Receiver() # # Tell it to use the callback # -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) # # Start the receiver, giving it the hostname or IP address and TCP port of diff --git a/apis/pypad/tests/pad_test.py b/apis/pypad/tests/pad_test.py index 5eb37de9..e10a9992 100755 --- a/apis/pypad/tests/pad_test.py +++ b/apis/pypad/tests/pad_test.py @@ -141,7 +141,7 @@ rcvr=pypad.Receiver() # # Tell it to use the callback # -rcvr.setCallback(ProcessPad) +rcvr.setPadCallback(ProcessPad) # # Start the receiver, giving it the hostname or IP address and TCP port of