* $Id$
*
* Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2009, 2010, 2011, MinGW Project
+ * Copyright (C) 2009, 2010, 2011, 2012, MinGW Project
*
*
* Public interface for the package directory management routines;
# endif
#endif
+/* Define an API for registering environment variables.
+ */
+EXTERN_C int pkgPutEnv( int, char* );
+
+#define PKG_PUTENV_DIRSEP_MSW (0x01)
+#define PKG_PUTENV_DIRSEP_POSIX (0x02)
+#define PKG_PUTENV_SCAN_VARNAME (0x04)
+#define PKG_PUTENV_NAME_TOUPPER (0x08)
+
+#define PKG_PUTENV_FLAGS_MASK (0x0F)
+
+/* Begin class declarations.
+ */
class pkgSpecs;
+class pkgDirectory;
class pkgXmlNode : public TiXmlElement
{
* be associated with a release.
*/
const char *GetContainerAttribute( const char*, const char* = NULL );
+
+ /* Any package may have associated scripts; the following
+ * method invokes them on demand.
+ */
+ inline int InvokeScript( const char *context )
+ {
+ /* The actual implementation is delegated to the following
+ * (private) overloaded method.
+ */
+ return InvokeScript( 0, context );
+ }
+
+ private:
+ /* Helpers used to implement the preceding InvokeScript() method.
+ */
+ int InvokeScript( int, const char* );
+ int DispatchScript( int, const char*, const char*, pkgXmlNode* );
};
enum { to_remove = 0, to_install, selection_types };
/* Methods for defining the selection criteria for
* packages to be processed.
*/
+ void ApplyBounds( pkgXmlNode *, const char * );
pkgXmlNode* SelectIfMostRecentFit( pkgXmlNode* );
const char* SetRequirements( pkgXmlNode*, pkgSpecs* );
inline void SelectPackage( pkgXmlNode *pkg, int opt = to_install )
pkgActionItem* actions;
public:
+ /* Method to interpret user preferences for mingw-get processing
+ * options, which are specified within profile.xml rather than on
+ * the command line.
+ */
+ void EstablishPreferences();
+
/* Method to synchronise the state of the local package manifest
* with the master copy held on the distribution server.
*/
*/
pkgXmlNode* FindPackageByName( const char*, const char* = NULL );
- /* Method to display information about packages.
+ /* Methods to retrieve and display information about packages.
*/
+ pkgDirectory *CatalogueAllPackages();
void DisplayPackageInfo( int, char** );
/* Method to resolve the dependencies of a specified package,