Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

DCCActions.java 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (c) 2006-2010 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 com.dmdirc.addons.dcc.actions;
  23. import com.dmdirc.actions.interfaces.ActionMetaType;
  24. import com.dmdirc.actions.interfaces.ActionType;
  25. /**
  26. * DCC actions.
  27. *
  28. * @author chris
  29. */
  30. public enum DCCActions implements ActionType {
  31. /** DCC Chat Request. */
  32. DCC_CHAT_REQUEST(DCCEvents.DCC_CHAT_REQUEST, "DCC Chat Requested"),
  33. /** DCC Chat Request Sent. */
  34. DCC_CHAT_REQUEST_SENT(DCCEvents.DCC_CHAT_REQUEST_SENT, "DCC Chat Request Sent"),
  35. /** DCC Message from another person. */
  36. DCC_CHAT_MESSAGE(DCCEvents.DCC_CHAT_MESSAGE, "DCC Chat Message Recieved"),
  37. /** DCC Message to another person. */
  38. DCC_CHAT_SELFMESSAGE(DCCEvents.DCC_CHAT_SELFMESSAGE, "DCC Chat Message Sent"),
  39. /** DCC Chat Socket Closed. */
  40. DCC_CHAT_SOCKETCLOSED(DCCEvents.DCC_CHAT_SOCKETCLOSED, "DCC Chat Socket Closed"),
  41. /** DCC Chat Socket Opened. */
  42. DCC_CHAT_SOCKETOPENED(DCCEvents.DCC_CHAT_SOCKETOPENED, "DCC Chat Socket Opened"),
  43. /** DCC Send Socket Closed. */
  44. DCC_SEND_SOCKETCLOSED(DCCEvents.DCC_SEND_SOCKETCLOSED, "DCC Send Socket Closed"),
  45. /** DCC Send Socket Opened. */
  46. DCC_SEND_SOCKETOPENED(DCCEvents.DCC_SEND_SOCKETOPENED, "DCC Send Socket Opened"),
  47. /** DCC Send Data Transfered */
  48. DCC_SEND_DATATRANSFERED(DCCEvents.DCC_SEND_DATATRANSFERED, "DCC Send Socket Closed"),
  49. /** DCC Send Request. */
  50. DCC_SEND_REQUEST(DCCEvents.DCC_SEND_REQUEST, "DCC Chat Requested"),
  51. /** DCC Send Request Sent. */
  52. DCC_SEND_REQUEST_SENT(DCCEvents.DCC_SEND_REQUEST_SENT, "DCC Chat Request Sent");
  53. /** The type of this action. */
  54. private final ActionMetaType type;
  55. /** The name of this action. */
  56. private final String name;
  57. /**
  58. * Constructs a new core action.
  59. * @param type The type of this action
  60. * @param name The name of this action
  61. */
  62. DCCActions(final ActionMetaType type, final String name) {
  63. this.type = type;
  64. this.name = name;
  65. }
  66. /** {@inheritDoc} */
  67. @Override
  68. public ActionMetaType getType() {
  69. return type;
  70. }
  71. /** {@inheritDoc} */
  72. @Override
  73. public String getName() {
  74. return name;
  75. }
  76. }