2002-08-29 03:52:52 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
2017-02-10 06:03:59 +03:00
|
|
|
// by the MIT License.
|
2002-08-29 03:52:52 +04:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
/*!
|
|
|
|
\file SupportingApps.h
|
|
|
|
SupportingApps class declarations
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MIME_SUPPORTING_APPS_H
|
|
|
|
#define _MIME_SUPPORTING_APPS_H
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class BMessage;
|
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
|
|
|
namespace Mime {
|
|
|
|
|
2013-05-08 01:15:36 +04:00
|
|
|
|
|
|
|
class DatabaseLocation;
|
|
|
|
|
|
|
|
|
2002-08-29 03:52:52 +04:00
|
|
|
class SupportingApps {
|
|
|
|
public:
|
2013-05-08 01:15:36 +04:00
|
|
|
SupportingApps(DatabaseLocation* databaseLocation);
|
2002-08-29 03:52:52 +04:00
|
|
|
~SupportingApps();
|
2013-05-08 01:15:36 +04:00
|
|
|
|
2002-08-29 03:52:52 +04:00
|
|
|
status_t GetSupportingApps(const char *type, BMessage *apps);
|
2002-09-09 12:12:03 +04:00
|
|
|
|
2002-08-29 03:52:52 +04:00
|
|
|
status_t SetSupportedTypes(const char *app, const BMessage *types, bool fullSync);
|
2002-09-09 12:12:03 +04:00
|
|
|
status_t DeleteSupportedTypes(const char *app, bool fullSync);
|
2002-08-29 03:52:52 +04:00
|
|
|
private:
|
|
|
|
status_t AddSupportingApp(const char *type, const char *app);
|
|
|
|
status_t RemoveSupportingApp(const char *type, const char *app);
|
|
|
|
|
|
|
|
status_t BuildSupportingAppsTable();
|
|
|
|
|
|
|
|
std::map<std::string, std::set<std::string> > fSupportedTypes; // app sig => set of supported types
|
|
|
|
std::map<std::string, std::set<std::string> > fSupportingApps; // mime type => set of supporting apps
|
2002-09-09 12:12:03 +04:00
|
|
|
std::map<std::string, std::set<std::string> > fStrandedTypes; // app sig => set of no longer supported types for whom the
|
|
|
|
// given app is still listed as a supporting app
|
2013-05-08 01:15:36 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DatabaseLocation* fDatabaseLocation;
|
2002-08-29 03:52:52 +04:00
|
|
|
bool fHaveDoneFullBuild;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Mime
|
|
|
|
} // namespace Storage
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
#endif // _MIME_SUPPORTING_APPS_H
|