OSDN Git Service

Support assignment of DEBUGLEVEL at configure time.
[mingw/mingw-get.git] / src / pkgtask.h
1 #ifndef PKGTASK_H
2 /*
3  * pkgtask.h
4  *
5  * $Id$
6  *
7  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8  * Copyright (C) 2009, 2010, 2011, MinGW Project
9  *
10  *
11  * This header provides manifest definitions for the action codes,
12  * which are used by the installer engine's task scheduler.
13  *
14  *
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.
20  *
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.
27  *
28  */
29 #define PKGTASK_H  1
30
31 enum
32 {
33   action_none = 0,
34
35   action_remove,
36   action_install,
37   action_upgrade,
38
39   action_list,
40   action_show,
41
42   action_update,
43
44   end_of_actions
45 };
46
47 #define ACTION_MASK             0x0F
48
49 #define ACTION_NONE             (unsigned long)(action_none)
50 #define ACTION_REMOVE           (unsigned long)(action_remove)
51 #define ACTION_INSTALL          (unsigned long)(action_install)
52 #define ACTION_UPGRADE          (unsigned long)(action_upgrade)
53 #define ACTION_LIST             (unsigned long)(action_list)
54 #define ACTION_SHOW             (unsigned long)(action_show)
55 #define ACTION_UPDATE           (unsigned long)(action_update)
56
57 #define STRICTLY_GT             (ACTION_MASK + 1)
58 #define STRICTLY_LT             (STRICTLY_GT << 1)
59
60 #define ACTION_PRIMARY          (STRICTLY_LT << 1)
61
62 /* Attributes used to identify when a removal action
63  * may break dependencies for other installed packages.
64  */
65 #define ACTION_REMOVE_OK        (ACTION_PRIMARY << 1)
66 #define ACTION_PREFLIGHT        (ACTION_PRIMARY << 2 | ACTION_REMOVE_OK)
67
68 /* Attributes used to identify when a package installation
69  * or upgrade cannot be successfully installed or upgraded,
70  * due to a previously failing download.
71  */
72 #define ACTION_DOWNLOAD         (ACTION_PRIMARY << 3)
73 #define ACTION_DOWNLOAD_OK      (ACTION_DOWNLOAD | ACTION_REMOVE_OK)
74
75 #ifndef EXTERN_C
76 # ifdef __cplusplus
77 #  define EXTERN_C extern "C"
78 # else
79 #  define EXTERN_C
80 # endif
81 #endif
82
83 EXTERN_C const char *action_name( unsigned long );
84 EXTERN_C int action_code( const char* );
85
86 #endif /* PKGTASK_H: $RCSfile$: end of file */