1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 //--------------------------------------------------------------------- 5 /*! 6 \file MimeUpdateThread.h 7 MimeUpdateThread interface declaration 8 */ 9 10 #ifndef _MIME_UPDATE_THREAD_H 11 #define _MIME_UPDATE_THREAD_H 12 13 #include <Entry.h> 14 #include <SupportDefs.h> 15 16 #include <list> 17 #include <utility> 18 19 #include "RegistrarThread.h" 20 21 struct entry_ref; 22 class BMessage; 23 24 namespace BPrivate { 25 namespace Storage { 26 namespace Mime { 27 28 class MimeUpdateThread : public RegistrarThread { 29 public: 30 MimeUpdateThread(const char *name, int32 priority, 31 BMessenger managerMessenger, const entry_ref *root, bool recursive, 32 int32 force, BMessage *replyee); 33 virtual ~MimeUpdateThread(); 34 35 virtual status_t InitCheck(); 36 37 protected: 38 virtual status_t ThreadFunction(); 39 virtual status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) = 0; 40 41 const entry_ref fRoot; 42 const bool fRecursive; 43 const int32 fForce; 44 BMessage *fReplyee; 45 46 bool DeviceSupportsAttributes(dev_t device); 47 48 private: 49 std::list< std::pair<dev_t, bool> > fAttributeSupportList; 50 51 status_t UpdateEntry(const entry_ref *ref); 52 53 status_t fStatus; 54 }; 55 56 } // namespace Mime 57 } // namespace Storage 58 } // namespace BPrivate 59 60 #endif // _MIME_UPDATE_THREAD_H 61