Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

CoreActionType.java 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright (c) 2006-2007 Chris Smith, Shane Mc Cormack, Gregory Holmes
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  20. * SOFTWARE.
  21. */
  22. package uk.org.ownage.dmdirc.actions;
  23. /**
  24. * An enumeration of actions that are raised by the core.
  25. * @author chris
  26. */
  27. public enum CoreActionType implements ActionType {
  28. UNKNOWN_COMMAND(CoreActionMetaType.UNKNOWN_COMMAND, "Unknown command entered"),
  29. SERVER_CONNECTED(CoreActionMetaType.SERVER_EVENT, "Server connected"),
  30. SERVER_BACK(CoreActionMetaType.SERVER_EVENT, "Marked as 'back'"),
  31. SERVER_AWAY(CoreActionMetaType.SERVER_EVENT_WITH_ARG, "Marked as 'away'"),
  32. SERVER_GOTPING(CoreActionMetaType.SERVER_PING, "Received server ping reply"),
  33. SERVER_NOPING(CoreActionMetaType.SERVER_PING, "Missed server ping reply"),
  34. QUERY_OPENED(CoreActionMetaType.QUERY_EVENT, "Query window opened"),
  35. QUERY_CLOSED(CoreActionMetaType.QUERY_EVENT, "Query window closed"),
  36. QUERY_MESSAGE(CoreActionMetaType.QUERY_EVENT_WITH_ARG, "Private message received"),
  37. QUERY_ACTION(CoreActionMetaType.QUERY_EVENT_WITH_ARG, "Private action received"),
  38. QUERY_SELF_MESSAGE(CoreActionMetaType.QUERY_EVENT_WITH_ARG, "Private message sent"),
  39. QUERY_SELF_ACTION(CoreActionMetaType.QUERY_EVENT_WITH_ARG, "Private action sent"),
  40. CHANNEL_OPENED(CoreActionMetaType.CHANNEL_EVENT, "Channel window opened"),
  41. CHANNEL_CLOSED(CoreActionMetaType.CHANNEL_EVENT, "Channel window closed"),
  42. CHANNEL_GOTNAMES(CoreActionMetaType.CHANNEL_EVENT, "Channel names reply received"),
  43. CHANNEL_GOTTOPIC(CoreActionMetaType.CHANNEL_EVENT, "Channel topic received"),
  44. CHANNEL_SELF_MESSAGE(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Channel message sent"),
  45. CHANNEL_SELF_ACTION(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Channel action sent"),
  46. CHANNEL_MESSAGE(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Channel message received"),
  47. CHANNEL_ACTION(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Channel action received"),
  48. CHANNEL_JOIN(CoreActionMetaType.CHANNEL_SOURCED_EVENT, "Someone joined a channel"),
  49. CHANNEL_PART(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Someone left a channel"),
  50. CHANNEL_QUIT(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Someone quit IRC"),
  51. CHANNEL_KICK(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_VICTIM, "Someone kicked someone"),
  52. CHANNEL_USERAWAY(CoreActionMetaType.CHANNEL_SOURCED_EVENT, "Someone is marked as 'away'"),
  53. CHANNEL_USERBACK(CoreActionMetaType.CHANNEL_SOURCED_EVENT, "Someone is marked as 'back'"),
  54. CHANNEL_MODECHANGE(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Someone changed channel modes"),
  55. CHANNEL_NICKCHANGE(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Someone changed nicknames"),
  56. CHANNEL_TOPICCHANGE(CoreActionMetaType.CHANNEL_SOURCED_EVENT_WITH_ARG, "Someone changed channel topic");
  57. /** The type of this action. */
  58. private final ActionMetaType type;
  59. /** The name of this action. */
  60. private final String name;
  61. /**
  62. * Constructs a new core action.
  63. * @param type The type of this action
  64. */
  65. CoreActionType(final ActionMetaType type, final String name) {
  66. this.type = type;
  67. this.name = name;
  68. }
  69. /** {@inheritDoc} */
  70. public ActionMetaType getType() {
  71. return type;
  72. }
  73. /** {@inheritDoc} */
  74. public String getName() {
  75. return name;
  76. }
  77. /** {@inheritDoc} */
  78. public String toString() {
  79. return getName();
  80. }
  81. }