SMTPClient.h

Go to the documentation of this file.
00001 /*
00002  *    Copyright 2005-2006 Intel Corporation
00003  * 
00004  *    Licensed under the Apache License, Version 2.0 (the "License");
00005  *    you may not use this file except in compliance with the License.
00006  *    You may obtain a copy of the License at
00007  * 
00008  *        http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  *    Unless required by applicable law or agreed to in writing, software
00011  *    distributed under the License is distributed on an "AS IS" BASIS,
00012  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *    See the License for the specific language governing permissions and
00014  *    limitations under the License.
00015  */
00016 
00017 #ifndef _OASYS_SMTP_CLIENT_H_
00018 #define _OASYS_SMTP_CLIENT_H_
00019 
00020 #include "../io/FdIOClient.h"
00021 #include "../io/TCPClient.h"
00022 #include "SMTP.h"
00023 
00024 namespace oasys {
00025 
00029 class SMTPClient : public TCPClient {
00030 public:
00032     SMTPClient(const char* logpath = "/oasys/smtp/client");
00033 
00036     int send_message(SMTPSender* sender);
00037     
00038 protected:
00039     BufferedInput  in_;
00040     BufferedOutput out_;
00041     SMTP           smtp_;
00042     bool           first_session_;
00043 };
00044 
00049 class SMTPFdClient {
00050 public:
00052     SMTPFdClient(int fd_in, int fd_out,
00053                  const char* logpath = "/oasys/smtp/client");
00054      
00057     int send_message(SMTPSender* sender);
00058      
00059 protected:
00060     FdIOClient     fdio_in_;
00061     FdIOClient     fdio_out_;
00062     BufferedInput  in_;
00063     BufferedOutput out_;
00064     SMTP           smtp_;
00065     bool           first_session_;
00066 };
00067 
00068 
00069 } // namespace oasys
00070 
00071 #endif /* _OASYS_SMTP_CLIENT_H_ */

Generated on Thu Jun 7 16:56:52 2007 for DTN Reference Implementation by  doxygen 1.5.1