Changeset 6347

Show
Ignore:
Timestamp:
06/19/08 08:33:01 (4 months ago)
Author:
eugene
Message:

Revised header inclusion. Cleaned up a little.

Location:
trunk/licq
Files:
23 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_buffer.h

    r6181 r6347  
    44#include <cstring> 
    55#include <map> 
    6 #include <vector> 
    76 
    87#include <boost/shared_array.hpp> 
  • trunk/licq/include/licq_chat.h

    r4950 r6347  
    33 
    44#include <deque> 
     5#include <list> 
    56 
    67#include "licq_packets.h" 
     8#include "licq_socket.h" 
    79class CICQDaemon; 
    810 
  • trunk/licq/include/licq_events.h

    r6282 r6347  
    22#define ICQEVENT_H 
    33 
    4 #include "pthread_rdwr.h" 
    5 #include "licq_constants.h" 
     4#include <pthread.h> 
     5 
    66#include "licq_message.h" 
    7  
    8 #include <stdlib.h> 
    9  
    107 
    118class CPacket; 
  • trunk/licq/include/licq_filetransfer.h

    r4950 r6347  
    5555 *-------------------------------------------------------------------------*/ 
    5656 
    57 #include <sys/time.h> 
    58 #include <cstring> 
     57#include <list> 
     58 
     59// Order of declaration is significant here! 
     60typedef std::list<char *> FileList; 
     61typedef std::list<const char *> ConstFileList; 
    5962 
    6063#include "licq_packets.h" 
     64#include "licq_socket.h" 
    6165class CICQDaemon; 
    6266 
     
    191195 
    192196typedef std::list<CFileTransferEvent *> FileTransferEventList; 
    193 typedef std::list<const char *> ConstFileList; 
    194 typedef std::list<char *> FileList; 
    195197typedef std::list<class CFileTransferManager *> FileTransferManagerList; 
    196  
    197198 
    198199class CFileTransferManager 
  • trunk/licq/include/licq_icqd.h

    r6335 r6347  
    77#define ICQD_H 
    88 
    9 #include <sys/select.h> 
    10 #include <sys/time.h> 
    11 #include <sys/types.h> 
    12 #include <unistd.h> 
    13  
    149#include <vector> 
    1510#include <list> 
    1611#include <map> 
    1712#include <string> 
    18 #include <algorithm> 
    19 #include <cstdarg> 
    20 #include <cstdio> 
    2113 
    2214#include "licq_events.h" 
    2315#include "licq_filetransfer.h" 
    2416#include "licq_onevent.h" 
    25 #include "licq_user.h" 
    2617#include "licq_plugind.h" 
    27 #include "licq_color.h" 
    2818#include "licq_protoplugind.h" 
    29  
    3019 
    3120class CProtoPlugin; 
     
    3726class ICQUser; 
    3827class CICQEventTag; 
     28class CICQColor; 
    3929class TCPSocket; 
    4030class SrvSocket; 
  • trunk/licq/include/licq_log.h

    r4714 r6347  
    22#define LOG_H 
    33 
    4 #include <stdarg.h> 
     4#include <cstdarg> 
     5#include <cstdio> 
    56#include <vector> 
    6 #include <stdio.h> 
    77#include <list> 
    88#include <pthread.h> 
  • trunk/licq/include/licq_message.h

    r6180 r6347  
    22#define MESSAGE_H 
    33 
    4 #include <cstdlib> 
    5 #include <cstdio> 
    64#include <ctime> 
    75#include <list> 
    86 
    9 #include "licq_buffer.h" 
    107#include "licq_constants.h" 
    118#include "licq_color.h" 
  • trunk/licq/include/licq_onevent.h

    r4526 r6347  
    33 
    44#include <pthread.h> 
    5 //#include "pthread_rdwr.h" 
    65 
    76class ICQUser; 
  • trunk/licq/include/licq_packets.h

    r6306 r6347  
    33 
    44#include "licq_user.h" 
    5 #include "licq_buffer.h" 
    6 #include "licq_socket.h" 
    75#include "licq_icq.h" 
    86 
     7class ICQUser; 
    98class CICQColor; 
     9class CBuffer; 
     10class INetSocket; 
    1011 
    1112// values of extra info to identify plugin request 
     
    3233unsigned short LengthField(const char *szField); 
    3334char *PipeInput(char *m_szMessage); 
    34  
    35 // 
    36 // These classes, CPX_*, are general classes for different packets that do the 
    37 // same function that may be sent through the server or directly to the client. 
    38 // This gives the direct and server packets a multiple inheritence. 
    39 // 
    40  
    41 //-----FileTransfer------------------------------------------------------------ 
    42 class CPX_FileTransfer 
    43 { 
    44 public: 
    45   CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 
    46   virtual ~CPX_FileTransfer(); 
    47  
    48   bool IsValid()    { return m_bValid; } 
    49   ConstFileList GetFileList()   { return m_lFileList; } 
    50   const char *GetFilename() { return m_szFilename; } 
    51   const char *GetDescription() { return m_szDesc; } 
    52   unsigned long GetFileSize()   { return m_nFileSize; } 
    53  
    54 protected: 
    55   CPX_FileTransfer(); 
    56  
    57   bool          m_bValid; 
    58   char          *m_szDesc; 
    59   char          *m_szFilename; 
    60   ConstFileList m_lFileList; 
    61   unsigned long m_nFileSize; 
    62 }; 
    63  
    64  
    6535 
    6636//=====Packet=================================================================== 
     
    10575   static char s_nMode; 
    10676}; 
     77 
     78// Order of inclusion is significant here! 
     79#include "licq_filetransfer.h" 
     80 
     81// 
     82// These classes, CPX_*, are general classes for different packets that do the 
     83// same function that may be sent through the server or directly to the client. 
     84// This gives the direct and server packets a multiple inheritence. 
     85// 
     86 
     87//-----FileTransfer------------------------------------------------------------ 
     88class CPX_FileTransfer 
     89{ 
     90public: 
     91  CPX_FileTransfer(ConstFileList &lFileList, const char *szFileName); 
     92  virtual ~CPX_FileTransfer(); 
     93 
     94  bool IsValid()    { return m_bValid; } 
     95  ConstFileList GetFileList()   { return m_lFileList; } 
     96  const char *GetFilename() { return m_szFilename; } 
     97  const char *GetDescription() { return m_szDesc; } 
     98  unsigned long GetFileSize()   { return m_nFileSize; } 
     99 
     100protected: 
     101  CPX_FileTransfer(); 
     102 
     103  bool          m_bValid; 
     104  char          *m_szDesc; 
     105  char          *m_szFilename; 
     106  ConstFileList m_lFileList; 
     107  unsigned long m_nFileSize; 
     108}; 
     109 
     110 
    107111 
    108112//=====ServerTCP=============================================================== 
  • trunk/licq/include/licq_plugin.h

    r4955 r6347  
    1313#include <pthread.h> 
    1414#include <list> 
    15 #include <cstdlib> 
    1615 
    1716#ifdef __cplusplus 
  • trunk/licq/include/licq_plugind.h

    r4904 r6347  
    33 
    44#include <pthread.h> 
    5 #include <cstdlib> 
    65#include <list> 
    76 
  • trunk/licq/include/licq_protoplugind.h

    r4904 r6347  
    55 
    66#include <pthread.h> 
    7 #include <cstdlib> 
    87#include <list> 
    98 
  • trunk/licq/include/licq_proxy.h

    r6181 r6347  
    66#endif 
    77 
    8 #include <sys/types.h> 
    9 #include <sys/socket.h> 
    108#include <netinet/in.h> 
    11 #include <unistd.h> 
    12 #include <strings.h> 
    13  
    14 #include "licq_constants.h" 
    159 
    1610// proxy types 
  • trunk/licq/include/licq_sar.h

    r4526 r6347  
    22#define SAR_H 
    33 
    4 #include <stdio.h> 
    54#include <vector> 
    65#include <pthread.h> 
  • trunk/licq/include/licq_socket.h

    r6181 r6347  
    66#endif 
    77 
    8 #include <sys/types.h> 
    9 #include <sys/socket.h> 
    10 #include <netinet/in.h> 
    118#include <arpa/inet.h> 
    12 #include <unistd.h> 
    13 #include <strings.h> 
    149#include <vector> 
    1510#include <list> 
     
    1712#include "pthread_rdwr.h" 
    1813 
    19 #include "licq_proxy.h" 
    2014#include "licq_buffer.h" 
    2115#include "licq_constants.h" 
     16 
     17class ProxyServer; 
    2218 
    2319char *inet_ntoa_r(struct in_addr in, char *buf); 
  • trunk/licq/include/licq_user.h

    r6338 r6347  
    22#define USER_H 
    33 
    4 #include <cstdlib> 
    5 #include <cstring> 
    6 #include <ctime> 
    74#include <list> 
    85#include <map> 
     
    118#include <vector> 
    129 
    13  
    1410#include "pthread_rdwr.h" 
    1511 
    16 #include "licq_message.h" 
     12#include "licq_buffer.h" 
    1713#include "licq_history.h" 
    1814#include "licq_file.h" 
     
    231227        } 
    232228 
    233 class ICQuser; 
     229class ICQUser; 
    234230class ICQOwner; 
    235231class LicqGroup; 
  • trunk/licq/include/licq_utility.h

    r4714 r6347  
    22#define UTILITY_H 
    33 
    4 #include <stdlib.h> 
    5 #include <stdio.h> 
    6 #include <string.h> 
     4#include <cstdio> 
    75#include <vector> 
    86 
  • trunk/licq/src/icqd-filetransfer.cpp

    r6271 r6347  
    1818#include <fcntl.h> 
    1919#include <string.h> 
     20#include <sys/time.h> 
    2021 
    2122// Localization 
  • trunk/licq/src/icqd-srv.cpp

    r6337 r6347  
    4242#include "licq_countrycodes.h" 
    4343#include "licq_protoplugind.h" 
     44#include "licq_proxy.h" 
    4445 
    4546using namespace std; 
  • trunk/licq/src/icqd.cpp

    r6325 r6347  
    4141#include "licq_packets.h" 
    4242#include "licq_plugind.h" 
     43#include "licq_proxy.h" 
    4344#include "licq_gpg.h"    // ## 
    4445#include "licq.h" 
  • trunk/licq/src/icqpacket.cpp

    r6314 r6347  
    3434 
    3535#include "licq_packets.h" 
     36#include "licq_socket.h" 
    3637#include "licq_icq.h" 
    3738#include "licq_translate.h" 
  • trunk/licq/src/protoplugind.cpp

    r4951 r6347  
    1111 
    1212#include <unistd.h> 
     13#include <cstdlib> 
    1314#include <cstring> 
    1415 
  • trunk/licq/src/socket.cpp

    r6181 r6347  
    4242#include "support.h" 
    4343#include "licq_icqd.h" 
     44#include "licq_proxy.h" 
    4445 
    4546#ifdef USE_OPENSSL