X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fchannel%2Fdebug_prompt.py;h=97a3ab2d832225511202a836aac6738f20ce6ccf;hb=e1e89610dc81f1a765d23e841129597a3b7c1182;hp=0adbece0cac52d8b44f2c1e6521fbccc2ee0b266;hpb=2bcd7b94d276c3f6ff4441e3bf05e7598177f251;p=theonering diff --git a/src/channel/debug_prompt.py b/src/channel/debug_prompt.py index 0adbece..97a3ab2 100644 --- a/src/channel/debug_prompt.py +++ b/src/channel/debug_prompt.py @@ -52,7 +52,7 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): self.close() def close(self): - _moduleLogger.info("Closing debug") + _moduleLogger.debug("Closing debug") tp.ChannelTypeText.Close(self) self.remove_from_connection() @@ -77,6 +77,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_reset_state_machine(self): + self._report_new_message("Reset the refreshing state machine") + def do_get_state(self, args): if args: self._report_new_message("No arguments supported") @@ -88,6 +91,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_get_state(self): + self._report_new_message("Print the current state the refreshing state machine is in") + def do_is_authed(self, args): if args: self._report_new_message("No arguments supported") @@ -99,6 +105,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_is_authed(self): + self._report_new_message("Print whether logged in to Google Voice") + def do_is_dnd(self, args): if args: self._report_new_message("No arguments supported") @@ -110,6 +119,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_is_dnd(self): + self._report_new_message("Print whether Do-Not-Disturb mode enabled on the Google Voice account") + def do_get_account_number(self, args): if args: self._report_new_message("No arguments supported") @@ -121,6 +133,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_get_account_number(self): + self._report_new_message("Print the Google Voice account number") + def do_get_callback_numbers(self, args): if args: self._report_new_message("No arguments supported") @@ -136,6 +151,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_get_callback_numbers(self): + self._report_new_message("Print a list of all configured callback numbers") + def do_get_callback_number(self, args): if args: self._report_new_message("No arguments supported") @@ -147,6 +165,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_get_callback_number(self): + self._report_new_message("Print the callback number currently enabled") + def do_call(self, args): if len(args) != 1: self._report_new_message("Must specify the phone number and only the phone nunber") @@ -158,6 +179,9 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): except Exception, e: self._report_new_message(str(e)) + def help_call(self): + self._report_new_message("\n".join(["call NUMBER", "Initiate a callback, Google forwarding the call to the callback number"])) + def do_send_sms(self, args): if 1 < len(args): self._report_new_message("Must specify the phone number and then message") @@ -169,3 +193,6 @@ class DebugPromptChannel(tp.ChannelTypeText, cmd.Cmd): self._conn.session.backend.send_sms(number, message) except Exception, e: self._report_new_message(str(e)) + + def help_send_sms(self): + self._report_new_message("\n".join(["send_sms NUMBER MESSAGE0 MESSAGE1 ...", "Send an sms to number NUMBER"]))