LibIRCClient 1.10 Used by Probotic
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.
Este repositório está arquivado. Você pode visualizar os arquivos e realizar clone, mas não poderá realizar push nem abrir issues e pull requests.

55 linhas
1.5KB

  1. /*
  2. * Copyright (C) 2004-2012 George Yunaev gyunaev@ulduzsoft.com
  3. *
  4. * This library is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU Lesser General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  12. * License for more details.
  13. */
  14. #ifndef INCLUDE_IRC_DCC_H
  15. #define INCLUDE_IRC_DCC_H
  16. /*
  17. * This structure keeps the state of a single DCC connection.
  18. */
  19. struct irc_dcc_session_s
  20. {
  21. irc_dcc_session_t * next;
  22. irc_dcc_t id;
  23. void * ctx;
  24. socket_t sock; /*!< DCC socket */
  25. int dccmode; /*!< Boolean value to differ chat vs send
  26. requests. Changes the cb behavior - when
  27. it is chat, data is sent by lines with
  28. stripped CRLFs. In file mode, the data
  29. is sent as-is */
  30. int state;
  31. time_t timeout;
  32. FILE * dccsend_file_fp;
  33. unsigned int received_file_size;
  34. unsigned int file_confirm_offset;
  35. struct sockaddr_in remote_addr;
  36. char incoming_buf[LIBIRC_DCC_BUFFER_SIZE];
  37. unsigned int incoming_offset;
  38. char outgoing_buf[LIBIRC_DCC_BUFFER_SIZE];
  39. unsigned int outgoing_offset;
  40. port_mutex_t mutex_outbuf;
  41. irc_dcc_callback_t cb;
  42. };
  43. #endif /* INCLUDE_IRC_DCC_H */