config.h | config.h | |||
---|---|---|---|---|
/* include/config.h. Generated by configure. */ | /* include/config.h. Generated by configure. */ | |||
/* include/config.h.in. Generated from configure.in by autoheader. */ | /* include/config.h.in. Generated from configure.in by autoheader. */ | |||
/* Define to 1 if you have the `gethostbyname_r' function. */ | /* Define to 1 if you have the `gethostbyname_r' function. */ | |||
#define HAVE_GETHOSTBYNAME_R 1 | #define HAVE_GETHOSTBYNAME_R 1 | |||
/* Define to 1 if you have the `inet_ntoa' function. */ | ||||
#define HAVE_INET_NTOA 1 | ||||
/* Define to 1 if you have the <inttypes.h> header file. */ | /* Define to 1 if you have the <inttypes.h> header file. */ | |||
#define HAVE_INTTYPES_H 1 | #define HAVE_INTTYPES_H 1 | |||
/* Define to 1 if you have the `localtime_r' function. */ | ||||
#define HAVE_LOCALTIME_R 1 | ||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and | /* Define to 1 if your system has a GNU libc compatible `malloc' function, and | |||
to 0 otherwise. */ | to 0 otherwise. */ | |||
#define HAVE_MALLOC 1 | #define HAVE_MALLOC 1 | |||
/* Define to 1 if you have the <memory.h> header file. */ | /* Define to 1 if you have the <memory.h> header file. */ | |||
#define HAVE_MEMORY_H 1 | #define HAVE_MEMORY_H 1 | |||
/* Define to 1 if you have the `socket' function. */ | ||||
#define HAVE_SOCKET 1 | ||||
/* Define to 1 if `stat' has the bug that it succeeds when given the | /* Define to 1 if `stat' has the bug that it succeeds when given the | |||
zero-length file name argument. */ | zero-length file name argument. */ | |||
/* #undef HAVE_STAT_EMPTY_STRING_BUG */ | /* #undef HAVE_STAT_EMPTY_STRING_BUG */ | |||
/* Define to 1 if stdbool.h conforms to C99. */ | /* Define to 1 if stdbool.h conforms to C99. */ | |||
#define HAVE_STDBOOL_H 1 | #define HAVE_STDBOOL_H 1 | |||
/* Define to 1 if you have the <stdint.h> header file. */ | /* Define to 1 if you have the <stdint.h> header file. */ | |||
#define HAVE_STDINT_H 1 | #define HAVE_STDINT_H 1 | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 9 lines changed or added | |||
libirc_dcc.h | libirc_dcc.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
* This library is free software; you can redistribute it and/or modify it | * This library is free software; you can redistribute it and/or modify it | |||
* under the terms of the GNU Lesser General Public License as published by | * under the terms of the GNU Lesser General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or (at yo ur | * the Free Software Foundation; either version 2 of the License, or (at yo ur | |||
* option) any later version. | * option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, but WITH OUT | * This library is distributed in the hope that it will be useful, but WITH OUT | |||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |||
* License for more details. | * License for more details. | |||
* | * | |||
* $Id: libirc_dcc.h,v 1.1.1.1 2004/09/08 11:49:16 gyunaev Exp $ | * $Id: libirc_dcc.h,v 1.3 2004/09/14 19:50:09 gyunaev Exp $ | |||
*/ | */ | |||
#ifndef INCLUDE_IRC_DCC_H | #ifndef INCLUDE_IRC_DCC_H | |||
#define INCLUDE_IRC_DCC_H | #define INCLUDE_IRC_DCC_H | |||
#ifndef IN_INCLUDE_LIBIRC_H | #ifndef IN_INCLUDE_LIBIRC_H | |||
#error This file should not be included directly, include just libir client.h | #error This file should not be included directly, include just libir client.h | |||
#endif | #endif | |||
/* | /* | |||
* This structure keeps the state of a single DCC connection. | * This structure keeps the state of a single DCC connection. | |||
*/ | */ | |||
struct irc_dcc_session_s | struct irc_dcc_session_s | |||
{ | { | |||
irc_dcc_session_t * next; | irc_dcc_session_t * next; | |||
irc_dcc_t id; | irc_dcc_t id; | |||
void * ctx; | void * ctx; | |||
int sock; /*!< DCC socket */ | socket_t sock; /*!< DCC socket */ | |||
int dccmode; /*!< Boolean value t o differ chat vs send | int dccmode; /*!< Boolean value t o differ chat vs send | |||
requests. Changes the cb behavior - whe n | requests. Changes the cb behavior - whe n | |||
it is chat, data is sent by lines with | it is chat, data is sent by lines with | |||
stripped CRLFs. In file mode, the data | stripped CRLFs. In file mode, the data | |||
is sent as-is */ | is sent as-is */ | |||
int state; | int state; | |||
time_t timeout; | time_t timeout; | |||
int fd; // RENAME IT | FILE * dccsend_file_fp; | |||
int received_file_size; | unsigned int received_file_size; | |||
unsigned int file_confirm_offset; | unsigned int file_confirm_offset; | |||
struct sockaddr_in remote_addr; | struct sockaddr_in remote_addr; | |||
char incoming_buf[LIBIRC_DCC_BUFFER_SIZE]; | char incoming_buf[LIBIRC_DCC_BUFFER_SIZE]; | |||
unsigned int incoming_offset; | unsigned int incoming_offset; | |||
char outgoing_buf[LIBIRC_DCC_BUFFER_SIZE]; | char outgoing_buf[LIBIRC_DCC_BUFFER_SIZE]; | |||
unsigned int outgoing_offset; | unsigned int outgoing_offset; | |||
port_mutex_t mutex_outbuf; | ||||
#if defined (ENABLE_THREADS) | ||||
pthread_mutex_t mutex_outbuf; | ||||
#endif | ||||
irc_dcc_callback_t cb; | irc_dcc_callback_t cb; | |||
}; | }; | |||
#endif /* INCLUDE_IRC_DCC_H */ | #endif /* INCLUDE_IRC_DCC_H */ | |||
End of changes. 4 change blocks. | ||||
8 lines changed or deleted | 5 lines changed or added | |||
libirc_params.h | libirc_params.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
* This library is free software; you can redistribute it and/or modify it | * This library is free software; you can redistribute it and/or modify it | |||
* under the terms of the GNU Lesser General Public License as published by | * under the terms of the GNU Lesser General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or (at yo ur | * the Free Software Foundation; either version 2 of the License, or (at yo ur | |||
* option) any later version. | * option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, but WITH OUT | * This library is distributed in the hope that it will be useful, but WITH OUT | |||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |||
* License for more details. | * License for more details. | |||
* | * | |||
* $Id: libirc_params.h,v 1.1.1.1 2004/09/08 11:49:17 gyunaev Exp $ | * $Id: libirc_params.h,v 1.3 2004/09/14 19:50:09 gyunaev Exp $ | |||
*/ | */ | |||
#ifndef INCLUDE_IRC_PARAMS_H | #ifndef INCLUDE_IRC_PARAMS_H | |||
#define INCLUDE_IRC_PARAMS_H | #define INCLUDE_IRC_PARAMS_H | |||
#ifndef IN_INCLUDE_LIBIRC_H | #ifndef IN_INCLUDE_LIBIRC_H | |||
#error This file should not be included directly, include just libir cclient.h | #error This file should not be included directly, include just libir cclient.h | |||
#endif | #endif | |||
#define LIBIRC_VERSION_HIGH 0x0000 | #define LIBIRC_VERSION_HIGH 0x0000 | |||
#define LIBIRC_VERSION_LOW 0x0002 | #define LIBIRC_VERSION_LOW 0x0003 | |||
#define LIBIRC_BUFFER_SIZE 1024 | #define LIBIRC_BUFFER_SIZE 1024 | |||
#define LIBIRC_DCC_BUFFER_SIZE 1024 | #define LIBIRC_DCC_BUFFER_SIZE 1024 | |||
#define LIBIRC_STATE_INIT 0 | #define LIBIRC_STATE_INIT 0 | |||
#define LIBIRC_STATE_LISTENING 1 | #define LIBIRC_STATE_LISTENING 1 | |||
#define LIBIRC_STATE_CONNECTING 2 | #define LIBIRC_STATE_CONNECTING 2 | |||
#define LIBIRC_STATE_CONNECTED 3 | #define LIBIRC_STATE_CONNECTED 3 | |||
#define LIBIRC_STATE_DISCONNECTED 4 | #define LIBIRC_STATE_DISCONNECTED 4 | |||
#define LIBIRC_STATE_CONFIRM_SIZE 5 // Used only by DCC send to confirm the amount of sent data | #define LIBIRC_STATE_CONFIRM_SIZE 5 // Used only by DCC send to confirm the amount of sent data | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
libirc_session.h | libirc_session.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
* This library is free software; you can redistribute it and/or modify it | * This library is free software; you can redistribute it and/or modify it | |||
* under the terms of the GNU Lesser General Public License as published by | * under the terms of the GNU Lesser General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or (at yo ur | * the Free Software Foundation; either version 2 of the License, or (at yo ur | |||
* option) any later version. | * option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, but WITH OUT | * This library is distributed in the hope that it will be useful, but WITH OUT | |||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |||
* License for more details. | * License for more details. | |||
* | * | |||
* $Id: libirc_session.h,v 1.1.1.1 2004/09/08 11:49:17 gyunaev Exp $ | * $Id: libirc_session.h,v 1.3 2004/09/14 19:50:09 gyunaev Exp $ | |||
*/ | */ | |||
#ifndef INCLUDE_IRC_SESSION_H | #ifndef INCLUDE_IRC_SESSION_H | |||
#define INCLUDE_IRC_SESSION_H | #define INCLUDE_IRC_SESSION_H | |||
#ifndef IN_INCLUDE_LIBIRC_H | #ifndef IN_INCLUDE_LIBIRC_H | |||
#error This file should not be included directly, include just libir cclient.h | #error This file should not be included directly, include just libir cclient.h | |||
#endif | #endif | |||
#include "libirc_params.h" | #include "libirc_params.h" | |||
skipping to change at line 41 | skipping to change at line 41 | |||
int dcc_timeout; | int dcc_timeout; | |||
int options; | int options; | |||
int lasterror; | int lasterror; | |||
char incoming_buf[LIBIRC_BUFFER_SIZE]; | char incoming_buf[LIBIRC_BUFFER_SIZE]; | |||
unsigned int incoming_offset; | unsigned int incoming_offset; | |||
char outgoing_buf[LIBIRC_BUFFER_SIZE]; | char outgoing_buf[LIBIRC_BUFFER_SIZE]; | |||
unsigned int outgoing_offset; | unsigned int outgoing_offset; | |||
port_mutex_t mutex_session; | ||||
#if defined (ENABLE_THREADS) | socket_t sock; | |||
pthread_mutex_t mutex_session; | ||||
#endif | ||||
int sock; | ||||
int state; | int state; | |||
int motd_received; | int motd_received; | |||
char * server; | char * server; | |||
char * server_password; | char * server_password; | |||
char * realname; | char * realname; | |||
char * username; | char * username; | |||
char * nick; | char * nick; | |||
struct in_addr local_addr; | struct in_addr local_addr; | |||
irc_dcc_t dcc_last_id; | irc_dcc_t dcc_last_id; | |||
irc_dcc_session_t * dcc_sessions; | irc_dcc_session_t * dcc_sessions; | |||
port_mutex_t mutex_dcc; | ||||
#if defined (ENABLE_THREADS) | ||||
pthread_mutex_t mutex_dcc; | ||||
#endif | ||||
irc_callbacks_t callbacks; | irc_callbacks_t callbacks; | |||
}; | }; | |||
#endif /* INCLUDE_IRC_SESSION_H */ | #endif /* INCLUDE_IRC_SESSION_H */ | |||
End of changes. 4 change blocks. | ||||
10 lines changed or deleted | 4 lines changed or added | |||
libircclient.h | libircclient.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
* This library is free software; you can redistribute it and/or modify it | * This library is free software; you can redistribute it and/or modify it | |||
* under the terms of the GNU Lesser General Public License as published by | * under the terms of the GNU Lesser General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or (at yo ur | * the Free Software Foundation; either version 2 of the License, or (at yo ur | |||
* option) any later version. | * option) any later version. | |||
* | * | |||
* This library is distributed in the hope that it will be useful, but WITH OUT | * This library is distributed in the hope that it will be useful, but WITH OUT | |||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |||
* License for more details. | * License for more details. | |||
* | * | |||
* $Id: libircclient.h,v 1.1.1.1 2004/09/08 11:49:17 gyunaev Exp $ | * $Id: libircclient.h,v 1.2 2004/09/14 19:50:09 gyunaev Exp $ | |||
*/ | */ | |||
/*! | /*! | |||
* \file libircclient.h | * \file libircclient.h | |||
* \author Georgy Yunaev | * \author Georgy Yunaev | |||
* \version 1.0 | * \version 1.0 | |||
* \date 09.2004 | * \date 09.2004 | |||
* \brief This file defines all prototypes and functions to use libirc. | * \brief This file defines all prototypes and functions to use libirc. | |||
* | * | |||
* libirc is a small but powerful library, which implements client-server I RC | * libirc is a small but powerful library, which implements client-server I RC | |||
skipping to change at line 48 | skipping to change at line 48 | |||
* - Compatible with RFC 1459 and most IRC clients. | * - Compatible with RFC 1459 and most IRC clients. | |||
* - Free, licensed under LGPL license. | * - Free, licensed under LGPL license. | |||
* | * | |||
* Note that to use libirc, only libirc.h should be included into your | * Note that to use libirc, only libirc.h should be included into your | |||
* program. Do not include other libirc_* headers. | * program. Do not include other libirc_* headers. | |||
*/ | */ | |||
#ifndef INCLUDE_LIBIRC_H | #ifndef INCLUDE_LIBIRC_H | |||
#define INCLUDE_LIBIRC_H | #define INCLUDE_LIBIRC_H | |||
#include <sys/select.h> /* fd_set */ | #if !defined (WIN32) | |||
#include <netinet/in.h> /* sockaddr_in */ | #include <sys/select.h> /* fd_set */ | |||
#include <netinet/in.h> /* sockaddr_in */ | ||||
#else | ||||
#include <winsock.h> | ||||
#endif | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/*! \brief A libirc IRC session. | /*! \brief A libirc IRC session. | |||
* | * | |||
* This structure describes an IRC session. Its members are internal to | * This structure describes an IRC session. Its members are internal to | |||
* libirc, and should not be used directly. | * libirc, and should not be used directly. | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 7 lines changed or added | |||