Pseudocode:
// It can be done in one of the two ways:
// 1) send a warning signal using the standard signaling
system of phone network
// 2) send the sender a real fax, in which warningMsg
will be printed
}
Int numberOfPagesInFax(String &faxContent)
{// return how many pages there are in the fax
}
Int faxToGif( String &faxContentInGif[], String
& faxContent)
{// This function converts fax format (TIFF) image to
a sequence of GIF format images ,
//each image contains a fax page.
// It can be done in the steps :
// 1) convert TIFF format to PPM format
// 2) convert PPM format to GIF format
// Note : PPM is a very simple format of image, no compression
is used in this format.
// Using it as a bridge between TIFF format and GIF format
can make life easier.
}
Int MIMESent(String & recipientEmailAddr, String
& faxContentInGif [])
{ // This function will encode a sequence of GIF format
images to a MIME mail, then send to the recipient.
}
void faxProcess(int phoneNumberOfRecipient, String
& faxContent)
{ // This is the main processing function for fax, it'll
call all the functions above as well as the DirectoryService and Signaling
service
DirectoryService faxDir;
String recipientEmailAddr;
Int numberOfPages=numberOfPagesInFax(faxContent);
String faxContentInGif[numberOfPages];
Int status;
recipientEmailAddr= faxDir.getEmailAdd(phoneNumberOFRecipient);
If(recipientEmailAddr.length()==0){
1) Write the function MIMESend() by Oct.11
2) Write the function faxToGif() by Nov.1
3) Write the function sendWarningFax() by Nov.15
4) Integrated testing with the rest of the group using the time left.
Support needed from course stuff: