/**
* @function ITs_email_startup
-* @description Called before each test, created email handle
+* @description Called before each test, creates email handle
* @parameter NA
* @return NA
*/
void ITs_email_startup(void)
{
- struct stat stBuff;
+ struct stat stBuff;
g_eEmailNotSupported=false;
- g_eEmailMismatch =false;
+ g_eEmailMismatch =false;
if ( stat(ERR_LOG, &stBuff) == 0 )
{
remove(ERR_LOG);
FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Messaging_Email_p\\n", __LINE__, API_NAMESPACE);
#endif
//Create Email Message Handle
-
- g_bIsEmailSendFeatureSupported = TCTCheckSystemInfoFeatureSupported(EMAIL_FEATURE, API_NAMESPACE) ;
+
+ g_bIsEmailSendFeatureSupported = TCTCheckSystemInfoFeatureSupported(EMAIL_FEATURE, API_NAMESPACE);
int nRet = email_create_message(&g_hEmail);
g_main_loop_unref(g_pEmailMainLoop);
g_pEmailMainLoop = NULL;
}
-
+
FPRINTF("[Line : %d][%s] Callback Time-out\\n", __LINE__, API_NAMESPACE);
return false;
}
{
FPRINTF("[Line : %d][%s] Callback invoked: email_message_sent_callback \\n", __LINE__, API_NAMESPACE);
g_bCallbackOccurred = true;
-
+
if ( email == NULL )
{
FPRINTF("[Line : %d][%s] email is NULL in callback email_message_sent_callback\\n", __LINE__, API_NAMESPACE);
* @passcase If adds and removes the attachment to the email message successfully
* @failcase If fails to add and remove attachment to the email message
* @precondition NA
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_add_remove_attach_p(void)
{
/**** Clears All Attachments of the Email Message ****/
nRet = email_remove_all_attachments(g_hEmail);
PRINT_RESULT_CLEANUP(EMAILS_ERROR_NONE, nRet, "email_remove_all_attachments", EmailGetError(nRet),FREE_MEMORY(pszImagePath));
-
+
FREE_MEMORY(pszImagePath);
return 0;
* @passcase If adds and removes the recipient to the email message successfully
* @failcase If fails to add and remove recipient to the email message
* @precondition NA
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_add_remove_recipient_p(void)
{
* @passcase If creates and destroys the email message handle
* @failcase If fails to create and destroy the email message handle
* @precondition NA
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_create_destroy_message_p(void)
{
* @scenario Creates an email message\n
* Saves the email message in outbox\n
* Destroys the email message
-* @apicovered email_save_message
+* @apicovered email_save_message
* @passcase If saves the email message successfully
* @failcase If fails to save the email message
* @precondition NA
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_save_message_p(void)
{
* @scenario Creates an email message\n
* Sends the email message\n
* Destroys the email message
-* @apicovered email_save_message, email_send_message, email_set_message_sent_cb, email_unset_message_sent_cb
+* @apicovered email_save_message, email_send_message, email_set_message_sent_cb, email_unset_message_sent_cb
* @passcase If sends an email message successfully
* @failcase If fails to send the email message
* @precondition An email account should be manually added to the device before executing this test
return 1;
}
- PRINT_RESULT_CLEANUP(EMAILS_ERROR_NONE, nRet, "email_set_message_sent_cb", EmailGetError(nRet), email_unset_message_sent_cb(g_hEmail));
+ PRINT_RESULT_CLEANUP(EMAILS_ERROR_NONE, nRet, "email_send_message", EmailGetError(nRet), email_unset_message_sent_cb(g_hEmail));
int nEmailTimeoutId = 0;
RUN_POLLING_LOOP;
if ( !g_bCallbackOccurred )
{
- FPRINTF("[Line : %d][%s] email_set_message_sent_cb failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+ FPRINTF("[Line : %d][%s] email_send_message failed to invoke callback\\n", __LINE__, API_NAMESPACE);
email_unset_message_sent_cb(g_hEmail);
return 1;
}
if ( !g_bEmailSentSuccess )
{
- FPRINTF("[Line : %d][%s] email_set_message_sent_cb invoked callback with email_sending_e = false\\n", __LINE__, API_NAMESPACE);
+ FPRINTF("[Line : %d][%s] email_send_message invoked callback with email_sending_e = false\\n", __LINE__, API_NAMESPACE);
email_unset_message_sent_cb(g_hEmail);
return 1;
}
* @passcase If sends an email message successfully
* @failcase If fails to send the email message
* @precondition An email account should be manually added to the device before executing this test
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_send_message_without_attachment_p(void)
{
PRINT_RESULT_CLEANUP(EMAILS_ERROR_NONE, nRet, "email_send_message", EmailGetError(nRet), email_unset_message_sent_cb(g_hEmail));
- int nEmailTimeoutId = 0;
+ int nEmailTimeoutId = 0;
RUN_POLLING_LOOP;
if ( !g_bCallbackOccurred )
{
- FPRINTF("[Line : %d][%s] email_set_message_sent_cb failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+ FPRINTF("[Line : %d][%s] email_send_message failed to invoke callback\\n", __LINE__, API_NAMESPACE);
email_unset_message_sent_cb(g_hEmail);
return 1;
}
if ( !g_bEmailSentSuccess )
{
- FPRINTF("[Line : %d][%s] email_set_message_sent_cb invoked callback with email_sending_e = false\\n", __LINE__, API_NAMESPACE);
+ FPRINTF("[Line : %d][%s] email_send_message invoked callback with email_sending_e = false\\n", __LINE__, API_NAMESPACE);
email_unset_message_sent_cb(g_hEmail);
return 1;
}
PRINT_RESULT(EMAILS_ERROR_NONE, nRet, "email_unset_message_sent_cb", EmailGetError(nRet));
g_bCallbackOccurred = false;
-
+
//Send an email message
nRet = email_send_message(g_hEmail, true);
PRINT_RESULT(EMAILS_ERROR_NONE, nRet, "email_send_message", EmailGetError(nRet));
* @passcase If sets the subject of email message successfully
* @failcase If fails to set the subject of email message
* @precondition NA
-* @postcondition NA
+* @postcondition NA
*/
int ITc_email_set_subject_p(void)
{