2002-09-29 11:05:39 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
/*!
|
|
|
|
\file MimeUpdateThread.h
|
|
|
|
MimeUpdateThread interface declaration
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MIME_UPDATE_THREAD_H
|
|
|
|
#define _MIME_UPDATE_THREAD_H
|
|
|
|
|
|
|
|
#include <Entry.h>
|
|
|
|
#include <RegistrarThread.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
2002-10-01 11:26:11 +04:00
|
|
|
#include <list>
|
|
|
|
#include <pair.h>
|
|
|
|
|
2002-09-29 11:05:39 +04:00
|
|
|
struct entry_ref;
|
|
|
|
class BMessage;
|
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
|
|
|
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);
|
|
|
|
virtual ~MimeUpdateThread();
|
|
|
|
|
|
|
|
virtual status_t InitCheck();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual status_t ThreadFunction();
|
|
|
|
virtual status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) = 0;
|
|
|
|
|
|
|
|
const entry_ref fRoot;
|
|
|
|
const bool fRecursive;
|
|
|
|
const bool fForce;
|
|
|
|
BMessage *fReplyee;
|
2002-10-01 11:26:11 +04:00
|
|
|
|
|
|
|
bool DeviceSupportsAttributes(dev_t device);
|
2002-09-29 11:05:39 +04:00
|
|
|
|
|
|
|
private:
|
2002-10-01 11:26:11 +04:00
|
|
|
std::list< std::pair<dev_t, bool> > fAttributeSupportList;
|
|
|
|
|
2002-09-29 11:05:39 +04:00
|
|
|
status_t UpdateEntry(const entry_ref *ref);
|
|
|
|
|
|
|
|
status_t fStatus;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Mime
|
|
|
|
} // namespace Storage
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
2002-10-07 02:45:06 +04:00
|
|
|
#endif // _MIME_UPDATE_THREAD_H
|