uip_shell.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /**
  2. * \file
  3. * Interface for the Contiki shell.
  4. * \author Adam Dunkels <adam@dunkels.com>
  5. *
  6. * Some of the functions declared in this file must be implemented as
  7. * a shell back-end in the architecture specific files of a Contiki
  8. * port.
  9. */
  10. /*
  11. * Copyright (c) 2003, Adam Dunkels.
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions
  16. * are met:
  17. * 1. Redistributions of source code must retain the above copyright
  18. * notice, this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the distribution.
  22. * 3. The name of the author may not be used to endorse or promote
  23. * products derived from this software without specific prior
  24. * written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  27. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  28. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  30. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  32. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  34. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  35. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  36. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * This file is part of the Contiki desktop OS.
  39. *
  40. * $Id: shell.h,v 1.1 2006/06/07 09:43:54 adam Exp $
  41. *
  42. */
  43. #ifndef __SHELL_H__
  44. #define __SHELL_H__
  45. /**
  46. * Initialize the shell.
  47. *
  48. * Called when the shell front-end process starts. This function may
  49. * be used to start listening for signals.
  50. */
  51. void shell_init(void);
  52. /**
  53. * Start the shell back-end.
  54. *
  55. * Called by the front-end when a new shell is started.
  56. */
  57. void shell_start(void);
  58. /**
  59. * Process a shell command.
  60. *
  61. * This function will be called by the shell GUI / telnet server whan
  62. * a command has been entered that should be processed by the shell
  63. * back-end.
  64. *
  65. * \param command The command to be processed.
  66. */
  67. void shell_input(char *command);
  68. /**
  69. * Quit the shell.
  70. *
  71. */
  72. void shell_quit(char *);
  73. /**
  74. * Print a string to the shell window.
  75. *
  76. * This function is implemented by the shell GUI / telnet server and
  77. * can be called by the shell back-end to output a string in the
  78. * shell window. The string is automatically appended with a linebreak.
  79. *
  80. * \param str1 The first half of the string to be output.
  81. * \param str2 The second half of the string to be output.
  82. */
  83. void shell_output(char *str1, char *str2);
  84. /**
  85. * Print a prompt to the shell window.
  86. *
  87. * This function can be used by the shell back-end to print out a
  88. * prompt to the shell window.
  89. *
  90. * \param prompt The prompt to be printed.
  91. *
  92. */
  93. void shell_prompt(char *prompt);
  94. #endif /* __SHELL_H__ */