message.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* <!-- copyright */
  2. /*
  3. * aria2 - a simple utility for downloading files faster
  4. *
  5. * Copyright (C) 2006 Tatsuhiro Tsujikawa
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. */
  21. /* copyright --> */
  22. #ifndef _D_MESSAGE_H_
  23. #define _D_MESSAGE_H_
  24. #include "common.h"
  25. #define MSG_DOWNLOAD_COMPLETED _("CUID#%d - The download for one segment completed successfully.")
  26. #define MSG_NO_SEGMENT_AVAILABLE _("CUID#%d - No segment available.")
  27. #define MSG_CONNECTING_TO_SERVER _("CUID#%d - Connecting to %s:%d")
  28. #define MSG_SEGMENT_CHANGED _("CUID#%d - The segment changed. We send the request again with new Range header.")
  29. #define MSG_REDIRECT _("CUID#%d - Redirecting to %s")
  30. #define MSG_SENDING_REQUEST _("CUID#%d - Requesting:\n%s")
  31. #define MSG_RECEIVE_RESPONSE _("CUID#%d - Response received:\n%s")
  32. #define MSG_DOWNLOAD_ABORTED _("CUID#%d - Download aborted.")
  33. #define MSG_RESTARTING_DOWNLOAD _("CUID#%d - Restarting the download.")
  34. #define MSG_MAX_TRY _("CUID#%d - %d times attempted, but no success. Download aborted.")
  35. #define MSG_UNREGISTER_CUID _("CUID#%d - Unregistering cuid from segmentManager.")
  36. #define MSG_SEND_PEER_MESSAGE "CUID#%d - To: %s:%d %s"
  37. #define MSG_SEND_PEER_MESSAGE_WITH_INDEX "CUID#%d - To: %s:%d %s index=%d"
  38. #define MSG_SEND_PEER_MESSAGE_WITH_BITFIELD "CUID#%d - To: %s:%d %s %s"
  39. #define MSG_SEND_PEER_MESSAGE_WITH_INDEX_BEGIN_LENGTH "CUID#%d - To: %s:%d %s index=%d, begin=%d, length=%d"
  40. #define MSG_RECEIVE_PEER_MESSAGE "CUID#%d - From: %s:%d %s"
  41. #define MSG_GOT_NEW_PIECE _("CUID#%d - we got new piece. index=%d")
  42. #define MSG_GOT_WRONG_PIECE _("CUID#%d - we got wrong piece. index=%d")
  43. #define MSG_TRACKER_WARNING_MESSAGE _("Tracker returned warning message: %s")
  44. #define MSG_SEGMENT_FILE_EXISTS _("The segment file %s exists.")
  45. #define MSG_SEGMENT_FILE_DOES_NOT_EXIST _("The segment file %s does not exist.")
  46. #define MSG_SAVING_SEGMENT_FILE _("Saving the segment file %s")
  47. #define MSG_SAVED_SEGMENT_FILE _("The segment file was saved successfully.")
  48. #define MSG_LOADING_SEGMENT_FILE _("Loading the segment file %s.")
  49. #define MSG_LOADED_SEGMENT_FILE _("The segment file was loaded successfully.")
  50. #define EX_TIME_OUT _("Timeout.")
  51. #define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")
  52. #define EX_TOO_LARGE_CHUNK _("Too large chunk. size=%d")
  53. #define EX_INVALID_HEADER _("Invalid header.")
  54. #define EX_INVALID_RESPONSE _("Invalid response.")
  55. #define EX_NO_HEADER _("No header found.")
  56. #define EX_NO_STATUS_HEADER _("No status header.")
  57. #define EX_PROXY_CONNECTION_FAILED _("Proxy connection failed.")
  58. #define EX_CONNECTION_FAILED _("Connection failed.")
  59. #define EX_FILENAME_MISMATCH _("The requested filename and the previously registered one are not same. %s != %s")
  60. #define EX_BAD_STATUS _("The response status is not successful. status=%d")
  61. #define EX_TOO_LARGE_FILE _("Too large file size. size=%lld")
  62. #define EX_TRANSFER_ENCODING_NOT_SUPPORTED _("Transfer encoding %s is not supported.")
  63. #define EX_SSL_INIT_FAILURE _("SSL initialization failed.")
  64. #define EX_SIZE_MISMATCH _("Size mismatch %lld != %lld")
  65. #define EX_AUTH_FAILED _("Authorization failed.")
  66. #define EX_GOT_EOF _("Got EOF from the server.")
  67. #define EX_EOF_FROM_PEER _("Got EOF from peer.")
  68. #define EX_MULFORMED_META_INFO _("Malformed meta info.")
  69. #define EX_FILE_OPEN _("Failed to open the file %s, cause: %s")
  70. #define EX_FILE_WRITE _("Failed to write into the file %s, cause: %s")
  71. #define EX_FILE_READ _("Failed to read from the file %s, cause: %s")
  72. #define EX_FILE_SHA1SUM _("Failed to calculate SHA1 digest of or a part of the file %s, cause: %s")
  73. #define EX_FILE_SEEK _("Failed to seek the file %s, cause: %s")
  74. #define EX_FILE_OFFSET_OUT_OF_RANGE _("The offset is out of range, offset=%lld")
  75. #define EX_NOT_DIRECTORY _("%s is not a directory.")
  76. #define EX_MAKE_DIR _("Failed to make the directory %s, cause: %s")
  77. #define EX_SEGMENT_FILE_OPEN _("Failed to open the segment file %s, cause: %s")
  78. #define EX_SEGMENT_FILE_WRITE _("Failed to write into the segment file %s, cause: %s")
  79. #define EX_SEGMENT_FILE_READ _("Failed to read from the segment file %s, cause: %s")
  80. #define EX_SOCKET_OPEN _("Failed to open a socket, cause: %s")
  81. #define EX_SOCKET_SET_OPT _("Failed to set a socket option, cause: %s")
  82. #define EX_SOCKET_BIND _("Failed to bind a socket, cause: %s")
  83. #define EX_SOCKET_LISTEN _("Failed to listen to a socket, cause: %s")
  84. #define EX_SOCKET_ACCEPT _("Failed to accept a peer connection, cause: %s")
  85. #define EX_SOCKET_GET_NAME _("Failed to get the name of socket, cause: %s")
  86. #define EX_SOCKET_GET_PEER _("Failed to get the name of connected peer, cause: %s")
  87. #define EX_RESOLVE_HOSTNAME _("Failed to resolve the hostname %s, cause: %s")
  88. #define EX_SOCKET_CONNECT _("Failed to connect to the host %s, cause: %s")
  89. #define EX_SOCKET_CHECK_WRITABLE _("Failed to check whether the socket is writable, cause: %s")
  90. #define EX_SOCKET_CHECK_READABLE _("Failed to check whether the socket is readable, cause: %s")
  91. #define EX_SOCKET_SEND _("Failed to send data, cause: %s")
  92. #define EX_SOCKET_RECV _("Failed to receive data, cause: %s")
  93. #define EX_SOCKET_PEEK _("Failed to peek data, cause: %s")
  94. #endif // _D_MESSAGE_H_