/*----------------------------------------------------------------------------------------------------*/ int userinter() /**/ /*Inputs: takes in the numerical input which is used to select which program function is needed.*/ /*Outputs: the same as input integer so i can = 0 or > 0 if its zero program closes loop and exits program*/ /*Comments: request an integer so 1 = send function 2 = view function 0 = exit*/ /*----------------------------------------------------------------------------------------------------*/ /*------------------------------------------------*/ void Receive(void) /**/ /* Inputs: Receives emailed responses*/ /* Outputs: Once all new emails read, function returns to UI*/ /* Comments: If new email response has been received, passes information to ResponseToFile(). /*------------------------------------------------*/ /*....................................................................*/ int View responses(): /**/ /* input: User's decision.*/ /* output: Displays all, yes or no.*/ /* comments: User chooses to view responses 0,1 or 2. 0 for all, 1 for yes and 2 for no.*/ /*.....................................................................*/ /*------------------------------------------------------------------------------------------------------------*/ int Name(); /**/ /*Inputs: User will key in name and address by hitting keyboard.*/ /*Outputs: The name will be displayed.*/ /*Comments: First Input part done.*/ /*-----------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------*/ int Valid(char[], char[]); /**/ /*Inputs: Receive first and second inputs.*/ /*Outputs: Valid or invalid will be returned*/ /*Comments: If name and email address are valid and are not already present in the file, valid is returned. Otherwise invalid is returned.*/ /*------------------------------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------*/ int Send(); /**/ /*Inputs: The valid email address that had been matched in memory. */ /*Outputs: Invitation will be sent to the email address. */ /*Comments: Only valid data will be read and will be sent to email address. */ /*------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------*/ void Write(char[], char[]); /**/ /*Inputs: Valid name and email */ /*Outputs: None*/ /*Comments: Writes name and email address to file. Sets status integer to 0 (no answer received)*/ /*---------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------*/ void ResponseToFile(char[], int); /**/ /*Inputs: Name and response of guest /*Outputs: None*/ /*Comments: Finds name in file and sets status number to 1 or 2 based on whether person is attending or not. Called by Receive function. /*---------------------------------------------------------------------------------------------------------*/