7 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8 * Copyright (C) 2009, 2010, 2011, 2012, MinGW Project
11 * This header provides manifest definitions for the action codes,
12 * which are used by the installer engine's task scheduler.
15 * This is free software. Permission is granted to copy, modify and
16 * redistribute this software, under the provisions of the GNU General
17 * Public License, Version 3, (or, at your option, any later version),
18 * as published by the Free Software Foundation; see the file COPYING
19 * for licensing details.
21 * Note, in particular, that this software is provided "as is", in the
22 * hope that it may prove useful, but WITHOUT WARRANTY OF ANY KIND; not
23 * even an implied WARRANTY OF MERCHANTABILITY, nor of FITNESS FOR ANY
24 * PARTICULAR PURPOSE. Under no circumstances will the author, or the
25 * MinGW Project, accept liability for any damages, however caused,
26 * arising from the use of this software.
49 #define ACTION_MASK 0x0F
51 #define ACTION_NONE (unsigned long)(action_none)
52 #define ACTION_REMOVE (unsigned long)(action_remove)
53 #define ACTION_INSTALL (unsigned long)(action_install)
54 #define ACTION_UPGRADE (unsigned long)(action_upgrade)
55 #define ACTION_LIST (unsigned long)(action_list)
56 #define ACTION_SHOW (unsigned long)(action_show)
57 #define ACTION_UPDATE (unsigned long)(action_update)
58 #define ACTION_LICENCE (unsigned long)(action_licence)
59 #define ACTION_SOURCE (unsigned long)(action_source)
61 #define STRICTLY_GT (ACTION_MASK + 1)
62 #define STRICTLY_LT (STRICTLY_GT << 1)
64 #define ACTION_PRIMARY (STRICTLY_LT << 1)
66 /* Attributes used to identify when a removal action
67 * may break dependencies for other installed packages.
69 #define ACTION_REMOVE_OK (ACTION_PRIMARY << 1)
70 #define ACTION_PREFLIGHT (ACTION_PRIMARY << 2 | ACTION_REMOVE_OK)
72 /* Attributes used to identify when a package installation
73 * or upgrade cannot be successfully installed or upgraded,
74 * due to a previously failing download.
76 #define ACTION_DOWNLOAD (ACTION_PRIMARY << 3)
77 #define ACTION_DOWNLOAD_OK (ACTION_DOWNLOAD | ACTION_REMOVE_OK)
79 /* Flag set by pkgActionItem::SelectIfMostRecentFit(),
80 * to indicate viability of the last package evaluated,
81 * irrespective of whether it is selected, or not.
83 #define ACTION_MAY_SELECT (ACTION_PRIMARY << 4)
86 /* A convenience macro, to facilitate declaration of functions
87 * which must exhibit extern "C" bindings, in a manner which is
88 * compatible with inclusion in either C or C++ source.
91 # define EXTERN_C extern "C"
97 EXTERN_C const char *action_name( unsigned long );
98 EXTERN_C int action_code( const char* );
100 #endif /* PKGTASK_H: $RCSfile$: end of file */