19cda9c99SIngo Weinhold //---------------------------------------------------------------------- 2*2ca13760SColdfirex // This software is part of the Haiku distribution and is covered 3b6f76ebeSAugustin Cavalier // by the MIT License. 49cda9c99SIngo Weinhold //--------------------------------------------------------------------- 59cda9c99SIngo Weinhold /*! 69cda9c99SIngo Weinhold \file SupportingApps.h 79cda9c99SIngo Weinhold SupportingApps class declarations 89cda9c99SIngo Weinhold */ 99cda9c99SIngo Weinhold 109cda9c99SIngo Weinhold #ifndef _MIME_SUPPORTING_APPS_H 119cda9c99SIngo Weinhold #define _MIME_SUPPORTING_APPS_H 129cda9c99SIngo Weinhold 139cda9c99SIngo Weinhold #include <SupportDefs.h> 149cda9c99SIngo Weinhold 159cda9c99SIngo Weinhold #include <map> 169cda9c99SIngo Weinhold #include <set> 179cda9c99SIngo Weinhold #include <string> 189cda9c99SIngo Weinhold 199cda9c99SIngo Weinhold class BMessage; 209cda9c99SIngo Weinhold 219cda9c99SIngo Weinhold namespace BPrivate { 229cda9c99SIngo Weinhold namespace Storage { 239cda9c99SIngo Weinhold namespace Mime { 249cda9c99SIngo Weinhold 25b94857b3SIngo Weinhold 26b94857b3SIngo Weinhold class DatabaseLocation; 27b94857b3SIngo Weinhold 28b94857b3SIngo Weinhold 299cda9c99SIngo Weinhold class SupportingApps { 309cda9c99SIngo Weinhold public: 31b94857b3SIngo Weinhold SupportingApps(DatabaseLocation* databaseLocation); 329cda9c99SIngo Weinhold ~SupportingApps(); 339cda9c99SIngo Weinhold 349cda9c99SIngo Weinhold status_t GetSupportingApps(const char *type, BMessage *apps); 359cda9c99SIngo Weinhold 369cda9c99SIngo Weinhold status_t SetSupportedTypes(const char *app, const BMessage *types, bool fullSync); 379cda9c99SIngo Weinhold status_t DeleteSupportedTypes(const char *app, bool fullSync); 389cda9c99SIngo Weinhold private: 399cda9c99SIngo Weinhold status_t AddSupportingApp(const char *type, const char *app); 409cda9c99SIngo Weinhold status_t RemoveSupportingApp(const char *type, const char *app); 419cda9c99SIngo Weinhold 429cda9c99SIngo Weinhold status_t BuildSupportingAppsTable(); 439cda9c99SIngo Weinhold 449cda9c99SIngo Weinhold std::map<std::string, std::set<std::string> > fSupportedTypes; // app sig => set of supported types 459cda9c99SIngo Weinhold std::map<std::string, std::set<std::string> > fSupportingApps; // mime type => set of supporting apps 469cda9c99SIngo Weinhold std::map<std::string, std::set<std::string> > fStrandedTypes; // app sig => set of no longer supported types for whom the 479cda9c99SIngo Weinhold // given app is still listed as a supporting app 48b94857b3SIngo Weinhold 49b94857b3SIngo Weinhold private: 50b94857b3SIngo Weinhold DatabaseLocation* fDatabaseLocation; 519cda9c99SIngo Weinhold bool fHaveDoneFullBuild; 529cda9c99SIngo Weinhold }; 539cda9c99SIngo Weinhold 549cda9c99SIngo Weinhold } // namespace Mime 559cda9c99SIngo Weinhold } // namespace Storage 569cda9c99SIngo Weinhold } // namespace BPrivate 579cda9c99SIngo Weinhold 589cda9c99SIngo Weinhold #endif // _MIME_SUPPORTING_APPS_H 59