summaryrefslogtreecommitdiff
path: root/src/operator-noop-pending.cc
blob: b13fdc1f22d443eda15e3073ff7333ca4bf929c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 *  @file  operator-noop-pending.cc
 *  @brief  Operator for the NOOP command, with pending extension
 *  @author Andreas Aardal Hanssen
 *  @date 2002-2005
 */

#include "depot.h"
#include "mailbox.h"
#include "operators.h"
#include "pendingupdates.h"
#include "recursivedescent.h"
#include "session.h"

#include <iostream>
#include <string>

using namespace Binc;

NoopPendingOperator::NoopPendingOperator(void) : NoopOperator() {}

NoopPendingOperator::~NoopPendingOperator(void) {}

Operator::ProcessResult NoopPendingOperator::process(Depot &depot, Request &command)
{
  Mailbox *mailbox = depot.getSelected();
  if (mailbox) {
    pendingUpdates(mailbox,
                   PendingUpdates::EXPUNGE | PendingUpdates::EXISTS | PendingUpdates::RECENT
                       | PendingUpdates::FLAGS,
                   true);
  }

  return OK;
}