Inheritance diagram for CP_SMTP:
Public Types | |
enum | { kCP_SMTPPortNumber = 25 } |
enum | SMTPConnectState { kCP_SMTPClosed, kCP_SMTPConnected } |
Public Member Functions | |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> | |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> | |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
Getters | |
virtual CP_InternetResponse * | GetServerResponse () |
Progress | |
void | BroadcastProgress (CP_InternetProtocolProgress &inProtocolProgress) |
Getters | |
virtual CP_InternetResponse * | GetServerResponse () |
Progress | |
void | BroadcastProgress (CP_InternetProtocolProgress &inProtocolProgress) |
Getters | |
virtual CP_InternetResponse * | GetServerResponse () |
Progress | |
void | BroadcastProgress (CP_InternetProtocolProgress &inProtocolProgress) |
Getters | |
virtual CP_InternetResponse * | GetServerResponse () |
Progress | |
void | BroadcastProgress (CP_InternetProtocolProgress &inProtocolProgress) |
Constructor / Destructor | |
CP_SMTP (CP_Socket *inSocketConnection) | |
Constructor. | |
virtual | ~CP_SMTP () throw () |
Destructor. | |
Connection | |
void | Connect (const CP_String &inAddress, SInt16 inPortNumber=CP_SMTP::kCP_SMTPPortNumber) |
void | WaitForServerID () |
Commands | |
void | SendDATA () |
void | SendHELO (const CP_String &inAddress) |
void | SendQUIT () |
void | SendRSET () |
void | SendMAIL (const CP_String &inFrom) |
void | SendRCPT (const CP_String &inTo) |
void | SendRCPT (CP_Strings_Array *inList) |
Sending | |
void | SendOneMessage (CP_MailMessage &inMailMessage) |
void | SendMessageData (CP_MailMessage &inMailMessage) |
void | SendSMTPEncodeData (const CP_String &inMessageData) |
Getters | |
virtual CP_InternetResponse * | GetServerResponse () |
Progress | |
void | BroadcastProgress (CP_InternetProtocolProgress &inProtocolProgress) |
Static Public Member Functions | |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Member Functions | |
Misc | |
SInt32 | ReadLine (CP_Socket *inSocket, CP_String &inOutResult) |
Getters | |
bool | IsCommaDelimitedListOfSixOctets (char *p) |
void | SendCommand (CP_String &inCommand) |
void | SendCommandWithReply (CP_String &inCommand) |
void | SendData (CP_String &inData) |
void | SendData (char *inData, UInt32 inDataLength) |
Misc | |
SInt32 | ReadLine (CP_Socket *inSocket, CP_String &inOutResult) |
Getters | |
bool | IsCommaDelimitedListOfSixOctets (char *p) |
void | SendCommand (CP_String &inCommand) |
void | SendCommandWithReply (CP_String &inCommand) |
void | SendData (CP_String &inData) |
void | SendData (char *inData, UInt32 inDataLength) |
Misc | |
SInt32 | ReadLine (CP_Socket *inSocket, CP_String &inOutResult) |
Getters | |
bool | IsCommaDelimitedListOfSixOctets (char *p) |
void | SendCommand (CP_String &inCommand) |
void | SendCommandWithReply (CP_String &inCommand) |
void | SendData (CP_String &inData) |
void | SendData (char *inData, UInt32 inDataLength) |
Misc | |
SInt32 | ReadLine (CP_Socket *inSocket, CP_String &inOutResult) |
Getters | |
bool | IsCommaDelimitedListOfSixOctets (char *p) |
void | SendCommand (CP_String &inCommand) |
void | SendCommandWithReply (CP_String &inCommand) |
void | SendData (CP_String &inData) |
void | SendData (char *inData, UInt32 inDataLength) |
Misc | |
SInt32 | ReadLine (CP_Socket *inSocket, CP_String &inOutResult) |
Getters | |
bool | IsCommaDelimitedListOfSixOctets (char *p) |
void | SendCommand (CP_String &inCommand) |
void | SendCommandWithReply (CP_String &inCommand) |
void | SendData (CP_String &inData) |
void | SendData (char *inData, UInt32 inDataLength) |
Protected Attributes | |
SMTPConnectState | fConnectState |
CP_Socket * | fSocketConnection |
CP_InternetResponse * | fLastServerResponse |
CP_DataValueSignal | fProgressSignal |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
Static Protected Attributes | |
static FourCharCode | fObjectIDCount = 0 |
|
|
|
|
|
Constructor.
|
|
Constructor.
|
|
Connects to the SMTP server.
|
|
Waits for the server to respond with an ID.
|
|
Sends the DATA command to the server.
|
|
Sends the HELLO command to the server.
|
|
Sends the QUIT command to the server.
|
|
Sends the RSET command to the server.
|
|
Sends the MAIL command to the server.
|
|
Sends the RCPT command to the server.
|
|
Send the RCPT command to the server for each address in the passed in list.
|
|
Sends the passed in CP_MailMessage to the SMTP server.
|
|
|
|
Send some data encoded for proper transmission through SMTP servers.
|
|
Returns the last server response.
|
|
Broadcast our progress information to any objects that have added themselves as listeners to this object. This will send the signal kCP_Signal_InternetProgress which listeners should connect a slot to.
|
|
Receive the next line from our server. We keep receiving until the end of line is reached.
|
|
Return true if our passed in string is in the form of a 6 part address. (h1,h2,h3,h4,p1,p2)
|
|
Sends a command to the server, but does not wait for a response.
|
|
Send the command, and wait for a response. The response will be placed in the CP_InternetResponse object associated with this object.
|
|
Send data to our socket connection. inData needs to be formatted correctly since we just send the bytes.
|
|
Send data to our socket connection. inData needs to be formatted correctly since we just send the bytes.
|
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The CP_Socket object that communicates between CPLAT and the server. |
|
This object contains the last response for the server, each different protocol class will implement its own response class to handle server responses. |
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |