releasing package apt version 1.0.9.1
[ntk/apt.git] / ftparchive / override.h
index 63f123c..c5cacc2 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: override.h,v 1.2 2001/02/20 07:03:18 jgg Exp $
+// $Id: override.h,v 1.4 2001/06/26 02:50:27 jgg Exp $
 /* ######################################################################
 
    Override
 #ifndef OVERRIDE_H
 #define OVERRIDE_H
 
-#ifdef __GNUG__
-#pragma interface "override.h"
-#endif
+
 
 #include <map>
 #include <string>
+
+using std::string;
+using std::map;
     
 class Override
 {
@@ -26,25 +27,25 @@ class Override
    struct Item
    {
       string Priority;
-      string Section;
       string OldMaint;
       string NewMaint;
-      
-      string SwapMaint(string Orig,bool &Failed);
+
+      map<string,string> FieldOverride;
+      string SwapMaint(string const &Orig,bool &Failed);
+      ~Item() {};
    };
    
    map<string,Item> Mapping;
    
-   inline Item *GetItem(string Package) 
+   inline Item *GetItem(string const &Package) 
    {
-      map<string,Item>::iterator I = Mapping.find(Package);
-      if (I == Mapping.end())
-        return 0;
-      return &I->second;
-   };
+      return GetItem(Package, "");
+   }
+   Item *GetItem(string const &Package, string const &Architecture);
    
-   bool ReadOverride(string File,bool Source = false);
+   bool ReadOverride(string const &File,bool const &Source = false);
+   bool ReadExtraOverride(string const &File,bool const &Source = false);
 };
-    
+
 #endif