/******************************************************************** * FUNCTION y_starter_processDone_send * * Send a y_starter_processDone notification * Called by your code when notification event occurs * ********************************************************************/ void y_starter_processDone_send ( const xmlChar *processStatus, const xmlChar *etc) { agt_not_msg_t *notif; val_value_t *parmval; status_t res = NO_ERR; if (LOGDEBUG) { log_debug("\nGenerating <processDone> notification"); } notif = agt_not_new_notification(processDone_obj); if (notif == NULL) { log_error("\nError: malloc failed, cannot send " "<processDone> notification"); return; } /* add processStatus to payload */ parmval = agt_make_leaf( processDone_obj, y_starter_N_processStatus, processStatus, &res); if (parmval == NULL) { log_error( "\nError: make leaf failed (%s), cannot send " "<processDone> notification", get_error_string(res)); } else { agt_not_add_to_payload(notif, parmval); } /* add etc to payload */ parmval = agt_make_leaf( processDone_obj, y_starter_N_etc, etc, &res); if (parmval == NULL) { log_error( "\nError: make leaf failed (%s), cannot send " "<processDone> notification", get_error_string(res)); } else { agt_not_add_to_payload(notif, parmval); } agt_not_queue_notification(notif); } /* y_starter_processDone_send */
/******************************************************************** * FUNCTION y_toaster_toastDone_send * * Send a y_toaster_toastDone notification * Called by your code when notification event occurs * ********************************************************************/ void y_toaster_toastDone_send ( const xmlChar *toastStatus) { agt_not_msg_t *notif; val_value_t *parmval; status_t res; if (!agt_notifications_enabled()) { if (LOGDEBUG) { log_debug("\nDropping <toastDone> notification"); } return; } res = NO_ERR; if (LOGDEBUG) { log_debug("\nGenerating <toastDone> notification"); } notif = agt_not_new_notification(toastDone_obj); if (notif == NULL) { log_error("\nError: malloc failed, cannot send <toastDone> notification"); return; } /* add toastStatus to payload */ parmval = agt_make_leaf( toastDone_obj, y_toaster_N_toastStatus, toastStatus, &res); if (parmval == NULL) { log_error( "\nError: make leaf failed (%s), cannot send <toastDone> notification", get_error_string(res)); } else { agt_not_add_to_payload(notif, parmval); } agt_not_queue_notification(notif); } /* y_toaster_toastDone_send */