MimeUpdateThread class, which is a RegistrarThread subclass that
implements the functionality common to both mime update calls (update_mime_info() and create_app_meta_mime()), namely walking through the filesystem and performing updates. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1266 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
//----------------------------------------------------------------------
|
||||
// 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>
|
||||
|
||||
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;
|
||||
|
||||
private:
|
||||
status_t UpdateEntry(const entry_ref *ref);
|
||||
|
||||
status_t fStatus;
|
||||
};
|
||||
|
||||
} // namespace Mime
|
||||
} // namespace Storage
|
||||
} // namespace BPrivate
|
||||
|
||||
#endif // _MIME_UPDATE_THREAD_H
|
||||
Reference in New Issue
Block a user