FtpPI.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2002,2003 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
00010 //
00011 
00012 #ifndef _FtpPI_h_DEFINED
00013 #define _FtpPI_h_DEFINED
00014 
00015 #include <OPENR/OList.h>
00016 #include "TCPConnection.h"
00017 #include "FtpConfig.h"
00018 #include "FtpDTP.h"
00019 #include "def.h"
00020 #include "entry.h"
00021 
00022 class FtpPI
00023 {
00024 public:
00025     FtpPI();
00026     virtual ~FtpPI() {}
00027 
00028     OStatus Initialize(const OID& myoid, const antStackRef& ipstack,
00029                        void* index, OList<Passwd, MAX_LOGIN> *pass);
00030 
00031     void ListenCont  (TCPEndpointListenMsg*  listenMsg);
00032     void SendCont    (TCPEndpointSendMsg*    sendMsg);
00033     void ReceiveCont (TCPEndpointReceiveMsg* receiveMsg);
00034     void CloseCont   (TCPEndpointCloseMsg*   closeMsg);
00035 
00036     void ListenContforDTP (TCPEndpointListenMsg*  listenMsg);
00037     void ConnectContforDTP(TCPEndpointConnectMsg* connectMsg);
00038     void SendContforDTP   (TCPEndpointSendMsg*    sendMsg);
00039     void ReceiveContforDTP(TCPEndpointReceiveMsg* receiveMsg);
00040     void CloseContforDTP  (TCPEndpointCloseMsg*   closeMsg);
00041 
00042     OStatus Close  ();
00043 
00044 private:
00045     OStatus Listen ();
00046     OStatus Send   (FTPReplyCode, char *format, ...);
00047     OStatus Receive();
00048 
00049     bool RequestComplete();
00050     bool RequestProcess ();
00051     bool CommandParser  (char **cmd, char **param);
00052 
00053     OID myOID;
00054     antStackRef ipstackRef;
00055     void* continuation;
00056     TCPConnection connection;
00057     FTPLoginState state;
00058     FtpDTP ftpDTP;
00059     IPAddress ipaddr;
00060 
00061     OList<Passwd, MAX_LOGIN> *passwd;
00062 };
00063 #endif /* _FtpPI_h_DEFINED */
00064 

Generated on Sun Dec 2 23:04:28 2007 for openSDK by  doxygen 1.3.9.1