haiku/headers/private/storage/mime/SupportingApps.h
Tyler Dauwalder e3a2f2069e + Added SetSupportedTypes() test
+ Modified BMimeType::SetSupportedTypes functionality so it keeps track of
stranded types (i.e. previously supported types that have not had the now
unsupporting app signature removed from their supporting apps list yet due
to a false fullSync parameter) over consecutive SetSupportedTypes(...,
false) calls and updates all appropriate stranded types on the next
SetSupportedTypes(..., true) call.
+ Added fullSync parameter to BMimeType::DeleteSupportedTypes
+ Made BMimeType::Delete() do a DeleteSupportedTypes(..., true) call to
properly update the supporting apps lists when a mime type is deleted.
+ Added initial BMimeType::Get/SetSnifferRule
+ Updated BMimeType::CheckSnifferRule() to return B_BAD_VALUE when passed
a NULL rule string.
+ Brought CheckSnifferRule() tests up to date
+ Added lots of Mime::Database doxygen
+ Added any missing mime monitor notifications in Mime::Database
+ Possibly made some other changes as well... :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-09 08:12:03 +00:00

52 lines
1.5 KiB
C++

//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*!
\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 {
class SupportingApps {
public:
SupportingApps();
~SupportingApps();
status_t GetSupportingApps(const char *type, BMessage *apps);
status_t SetSupportedTypes(const char *app, const BMessage *types, bool fullSync);
status_t DeleteSupportedTypes(const char *app, bool fullSync);
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
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
bool fHaveDoneFullBuild;
};
} // namespace Mime
} // namespace Storage
} // namespace BPrivate
#endif // _MIME_SUPPORTING_APPS_H