7 * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
8 * Copyright (C) 2010, 2012, MinGW Project
11 * Declarations of the classes used to implement the package list
12 * viewers, for both CLI and GUI clients.
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.
33 class pkgDirectoryViewerEngine
35 /* A minimal abstract base class, through which directory
36 * traversal methods of the following "pkgDirectory" class
37 * gain access to an appropriate handler in a specialised
38 * directory viewer class, (or any other class which may
39 * provide directory traversal hooks). All such helper
40 * classes should derive from this base class, providing
41 * a "Dispatch" method as the directory traversal hook.
44 virtual void Dispatch( pkgXmlNode * ) = 0;
46 pkgDirectory *EnumerateComponents( pkgXmlNode * );
51 * The following class is required only when implementing the
52 * graphical user interface; it is heavily dependent on graphical
53 * elements of the MS-Windows API. Thus, we expose its declaration
54 * only when the including module expresses an intent to deploy
55 * such graphical elements, (as implied by prior inclusion of
56 * the guimain.h header, which this augments).
59 class pkgListViewMaker: public pkgDirectoryViewerEngine
61 /* A concrete specialization of the pkgDirectoryViewerEngine
62 * class, used to assemble the content of the records displayed
63 * in the list view pane of the graphical user interface.
66 pkgListViewMaker( HWND );
67 virtual void Dispatch( pkgXmlNode * );
68 virtual void MarkScheduledActions( pkgActionItem * );
69 virtual void UpdateListView( void );
74 inline bool GetItem( void );
75 void InsertItem( pkgXmlNode *, char * );
76 void UpdateItem( char *, bool = false );
80 #endif /* GUIMAIN_H */
84 /* A locally defined class, used to manage a list of package
85 * or component package references in the form of an unbalanced
86 * binary tree, such that an in-order traversal will produce
87 * an alpha-numerically sorted package list.
90 pkgDirectory( pkgXmlNode * );
91 pkgDirectory *Insert( const char *, pkgDirectory * );
92 void InOrder( pkgDirectoryViewerEngine * );
101 /* The following helper function is used to retrieve release availability
102 * and installation status attributes for any specified package, from the
103 * XML database, returning specifications for the latest available release
104 * and the installed release, if any, in the to_install and the to_remove
105 * selection fields of the passed pkgActionItem structure respectively.
107 EXTERN_C pkgXmlNode *pkgGetStatus( pkgXmlNode *, pkgActionItem * );
109 #endif /* PKGLIST_H: $RCSfile$: end of file */