Switch to side-by-side view

--- a/src/utils/appformime.h
+++ b/src/utils/appformime.h
@@ -37,9 +37,16 @@
         std::string command;
     };
 
+    /** Build/Get the db for the standard fdo directory */
     static DesktopDb* getDb();
-    static const string& getReason();
+
+    /** Constructor for a db based on a non-standard location */
+    DesktopDb(const string& dir);
+
     ~DesktopDb();
+
+    /** In case of error: what happened ? */
+    const string& getReason();
 
     /**
      * Get a list of applications able to process a given MIME type.
@@ -52,10 +59,25 @@
     bool appForMime(const std::string& mime, vector<AppDef> *apps, 
                     std::string *reason = 0);
 
+    /**
+     * Get all applications defs:
+     * @param[output] apps applications 
+     * @return true 
+     */
+    bool allApps(vector<AppDef> *apps);
+
+    typedef map<string, vector<DesktopDb::AppDef> > AppMap;
+
 private:
+    /** This is used by getDb() and builds a db for the standard location */
     DesktopDb();
+    void build(const string& dir);
     DesktopDb(const DesktopDb &);
     DesktopDb& operator=(const DesktopDb &);
+
+    AppMap m_appMap;
+    std::string m_reason;
+    bool m_ok;
 };