Finally fixed update_mime_info(). As Be's version it understands two

different "force" levels now and updates the app file info attributes
for shared object files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2006-01-28 19:41:07 +00:00
parent 1ee5d15ef8
commit 15424f3d37
10 changed files with 211 additions and 54 deletions
+13 -7
View File
@@ -1,7 +1,8 @@
//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*
* Copyright 2004-2006, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
/*!
\file Mime.h
Mime type C functions interface declarations.
@@ -37,11 +38,18 @@ enum icon_size {
B_MINI_ICON = 16
};
// values for the "force" parameter of update_mime_info() (Haiku only)
enum {
B_UPDATE_MIME_INFO_NO_FORCE = 0,
B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE = 1,
B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL = 2,
};
#ifdef __cplusplus
}
#endif
// OpenBeOS only!
// Haiku only!
#ifdef __cplusplus
class BBitmap;
@@ -56,5 +64,3 @@ status_t get_device_icon(const char *dev, BBitmap *icon, icon_size which);
#endif
#endif // _MIME_H
@@ -18,8 +18,9 @@ namespace Mime {
class CreateAppMetaMimeThread : public MimeUpdateThread {
public:
CreateAppMetaMimeThread(const char *name, int32 priority, BMessenger managerMessenger,
const entry_ref *root, bool recursive, bool force, BMessage *replyee);
CreateAppMetaMimeThread(const char *name, int32 priority,
BMessenger managerMessenger, const entry_ref *root, bool recursive,
int32 force, BMessage *replyee);
status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir);
};
@@ -26,8 +26,9 @@ namespace Mime {
class MimeUpdateThread : public RegistrarThread {
public:
MimeUpdateThread(const char *name, int32 priority, BMessenger managerMessenger,
const entry_ref *root, bool recursive, bool force, BMessage *replyee);
MimeUpdateThread(const char *name, int32 priority,
BMessenger managerMessenger, const entry_ref *root, bool recursive,
int32 force, BMessage *replyee);
virtual ~MimeUpdateThread();
virtual status_t InitCheck();
@@ -38,7 +39,7 @@ protected:
const entry_ref fRoot;
const bool fRecursive;
const bool fForce;
const int32 fForce;
BMessage *fReplyee;
bool DeviceSupportsAttributes(dev_t device);
@@ -18,8 +18,9 @@ namespace Mime {
class UpdateMimeInfoThread : public MimeUpdateThread {
public:
UpdateMimeInfoThread(const char *name, int32 priority, BMessenger managerMessenger,
const entry_ref *root, bool recursive, bool force, BMessage *replyee);
UpdateMimeInfoThread(const char *name, int32 priority,
BMessenger managerMessenger, const entry_ref *root, bool recursive,
int32 force, BMessage *replyee);
status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir);
};