Removed mime update code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1271 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -34,6 +34,12 @@ namespace BPrivate {
|
||||
namespace Storage {
|
||||
namespace Mime {
|
||||
|
||||
// types of mime update functions that may be run asynchronously
|
||||
typedef enum {
|
||||
B_REG_UPDATE_MIME_INFO,
|
||||
B_REG_CREATE_APP_META_MIME,
|
||||
} mime_update_function;
|
||||
|
||||
class Database {
|
||||
public:
|
||||
Database();
|
||||
@@ -87,10 +93,6 @@ public:
|
||||
status_t DeleteSnifferRule(const char *type);
|
||||
status_t DeleteSupportedTypes(const char *type, bool fullSync);
|
||||
|
||||
// Asynchronous C function calls
|
||||
status_t UpdateMimeInfoAsync(const entry_ref *ref, bool recursive, bool force);
|
||||
status_t CleanupAfterAsyncThread(thread_id id);
|
||||
|
||||
private:
|
||||
// Functions to send monitor notifications
|
||||
status_t SendInstallNotification(const char *type);
|
||||
@@ -105,16 +107,12 @@ private:
|
||||
int32 action);
|
||||
status_t SendMonitorUpdate(BMessage &msg);
|
||||
|
||||
// Entry point functions for asynchronous update threads
|
||||
static int32 UpdateMimeInfoAsyncEntry(void *data);
|
||||
|
||||
status_t fCStatus;
|
||||
status_t fStatus;
|
||||
std::set<BMessenger> fMonitorMessengers;
|
||||
AssociatedTypes fAssociatedTypes;
|
||||
InstalledTypes fInstalledTypes;
|
||||
SnifferRules fSnifferRules;
|
||||
SupportingApps fSupportingApps;
|
||||
std::list<async_thread_data*> fAsyncThreads;
|
||||
};
|
||||
|
||||
} // namespace Mime
|
||||
|
||||
@@ -39,22 +39,6 @@ bool is_installed(const char *type);
|
||||
// to be shipped off to SetIcon*() and written to the database
|
||||
status_t get_icon_data(const BBitmap *icon, icon_size size, void **data, int32 *dataSize);
|
||||
|
||||
// Common struct used to manage ansynchronous update threads
|
||||
struct async_thread_data {
|
||||
public:
|
||||
async_thread_data(thread_id id = -1);
|
||||
bool should_exit() const;
|
||||
void post_exit_notification();
|
||||
|
||||
thread_id id;
|
||||
private:
|
||||
bool _should_exit;
|
||||
};
|
||||
|
||||
// Called by directly (synchronous calls) and indirectly (asynchronous calls)
|
||||
// by update_mime_info()
|
||||
int update_mime_info(entry_ref *ref, bool recursive, bool force, async_thread_data *data = NULL);
|
||||
|
||||
} // namespace Mime
|
||||
} // namespace Storage
|
||||
} // namespace BPrivate
|
||||
|
||||
Reference in New Issue
Block a user