--- parser3/src/classes/smtp/Attic/smtp.h 2001/11/05 11:46:23 1.5 +++ parser3/src/classes/smtp/Attic/smtp.h 2003/03/24 10:31:18 1.11.2.4.2.2 @@ -1,17 +1,17 @@ /** @file Parser: SMTP sender decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: smtp.h,v 1.5 2001/11/05 11:46:23 paf Exp $ + Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ -#include +static const char* IDENT_SMTP_H="$Date: 2003/03/24 10:31:18 $"; + -#include "pa_pool.h" #include "pa_string.h" +#include + ////////////////////////////////////////////////////////////////////////////// #define SOCKET_BUFFER_SIZE 512 @@ -26,7 +26,7 @@ ////////////////////////////////////////////////////////////////////////////// /// SIMPLE MAIL TRANSPORT PROTOCOL Win32 realization -class SMTP : public Pooled { +class SMTP: public PA_Object { char *in_buffer; char *out_buffer; unsigned int in_index; @@ -55,34 +55,34 @@ class SMTP : public Pooled { CHAR HomePage[100]; CHAR text[500]; - const String& origin_string; - public: - SMTP(Pool& pool, const String& aorigin_string); + SMTP(); + override ~SMTP(); // smtp.C - void Send(const char *, const char *, const char *, char *, char *); + void Send(const char* , const char* , const char* , char *, char *); BOOL MakeSmtpHeader(char *, char *, char *, char *); - void prepare_message(char *, char *, const char *, const char *); - void open_socket(const char *, const char *); + void prepare_message(char *, char *, const char* , const char* ); + void open_socket(const char* , const char* ); int get_line(void); - void SendSmtpError(const char *); - void transform_and_send_edit_data(const char *); - void send_data(const char *); - void ConnectToHost(const char *, const char *); + void SendSmtpError(const char* ); + void transform_and_send_edit_data(const char* ); + void send_data(const char* ); + void ConnectToHost(const char* , const char* ); int GetBuffer(int); int GetChar(int, char *); - void SendLine(const char *, unsigned long); - void SendBuffer(const char *, unsigned long); + void SendLine(const char* , unsigned long); + void SendBuffer(const char* , unsigned long); void FlushBuffer(); BOOL CloseConnect(); // comms.C - int IsAddressARawIpaddress(const char *); - int ResolveService(const char *, int *); - int ResolveHostname(const char *, struct sockaddr_in *); + int IsAddressARawIpaddress(const char* ); + int ResolveService(const char* , int *); + int ResolveHostname(const char* , struct sockaddr_in *); int GetAndSetTheSocket(SOCKET *); int GetConnection(SOCKET, struct sockaddr_in *); void MiscSocketSetup(SOCKET, fd_set *, struct timeval *); }; +DECLARE_OBJECT_PTR(SMTP); \ No newline at end of file