CS519 Final project Report 1

Date: Spet.30, 1998
Name of group: Phonation
Team Members: Ming Lu
Task: Once a fax is sent to the gateway, it'll be intercepted and sent to the recipient by MIME mail. If anything goes wrong, a warning message will be sent back to the sender.

Pseudocode:

Assumption:

Assume followings are given at the time of faxProcess () is called:
Int phoneNumberOfRecipient
Int phoneNumberOfSender
String faxContent

 Functions related:

Void sendWarningFax(String warningMsg)
{// This function send warning message to the fax sender in case of something wrong.

// 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){

SendWarningFax("Recipient Not in the network"); }
status=faxToGif(faxContentInGif,faxContent);
if(status<0) { sendWarningFax("Not a valid fax format"); }
status=MIMESend(recipientEmailAddr,faxContentInGif);
if(status<0){ sendWarningFax("Fax not delivered successfully"); }
else sendWarningFax("Fax has been delivered !");
}
Schedule:

                       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:

I need some documentation about the modem used by our project. Sections related to fax and signaling will be helpful. Reference :
      1)  RFC1521: MIME part one ( mechanism for specifying and describing the format of internet message bodies)
      2)  RFC 804: CCITT draft recommendation T.4
      3)  RFC2306: Tag Image File Format(TIFF) Profile for Facsimile
      4)  CCITT standard fax Images: ftp://ftp.funet.fi/pub/graphics/misc/test-images
      5)  GIF 87: GIF Graphics Interchange Format; A standard defines a mechanism for the storage and transmission of raster based graphics information --- Compuserve Incorporated, Columbus, Ohio
      6) GIF 89a: Graphics Interchange Format, version 89a --- Compuserve Incorporated, Columbus, Ohio