int main() { QUEUE *head = NULL, *tail = NULL; enqueue(&head, &tail, (char*) "Prueba de dato numero uno"); enqueue(&head, &tail, (char*) "Prueba de dato numero dos"); enqueue(&head, &tail, (char*) "Prueba de dato numero tres"); fputs("About to print", stdout); printTableQueue(head); purgeQueue(&head, &tail); fputs("End of run", stdout); return (EXIT_SUCCESS); }
/** * Make facility DOWN. * * @details * Also discard all elements from queue and update counters. If this is unwanted, edit the proper function call within. * * @return Number of discarded tokens. */ unsigned int Facility::setDown() { // Purge current queue, update counters. Comment out if this is unwanted. isUp_ = false; return dropTokensInService() + purgeQueue(); }
/** * @brief Deletes the messages in a queue specified by the queue URL. * * @param queueUrl URL of the Amazon SQS queue to take action on. * * @return A pointer to a related response object. * * @note The caller is to take responsbility for the resulting pointer. * * @see SqsPurgeQueueResponse */ SqsPurgeQueueResponse * SqsClient::purgeQueue(const QString &queueUrl) { const SqsPurgeQueueRequest request(queueUrl); return purgeQueue(request); }