1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * Pan - A Newsreader for Gtk+
4  * Copyright (C) 2002-2006  Charles Kerr <charles@rebelbase.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef _Health_h_
21 #define _Health_h_
22 
23 namespace pan
24 {
25   /**
26    * Possible health states of a Task.
27    *
28    * @ingroup tasks
29    */
30   enum Health
31   {
32     /** The task's health is fine. */
33     OK,
34 
35     /** The task has failed because of a bad connection.
36         The queue should leave this task as-is so that it
37         can retry when the network clears up. */
38     ERR_NETWORK,
39 
40     /** The server has rejected a command sent by this task.
41         For example, an expired article can't be retrieved
42         or an article can't be posted due to no permissions.
43         The queue should stop the task (but let other tasks
44         continue) and let the user decide how to proceed. */
45     ERR_COMMAND,
46 
47     /** The task has failed because of some local
48         environment problem.
49         Further tasks are likely to fail for the
50         same reason, so the queue should go offline
51         until the user intervenes to fix the problem. */
52     ERR_LOCAL,
53 
54     /** Handle disk full by setting the queue offline */
55     ERR_NOSPACE
56   };
57 }
58 
59 #endif
60