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 <RegistrarThread.h> 15 #include <SupportDefs.h> 16 17 #include <list> 18 #include <utility> 19 20 struct entry_ref; 21 class BMessage; 22 23 namespace BPrivate { 24 namespace Storage { 25 namespace Mime { 26 27 class MimeUpdateThread : public RegistrarThread { 28 public: 29 MimeUpdateThread(const char *name, int32 priority, 30 BMessenger managerMessenger, const entry_ref *root, bool recursive, 31 int32 force, BMessage *replyee); 32 virtual ~MimeUpdateThread(); 33 34 virtual status_t InitCheck(); 35 36 protected: 37 virtual status_t ThreadFunction(); 38 virtual status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) = 0; 39 40 const entry_ref fRoot; 41 const bool fRecursive; 42 const int32 fForce; 43 BMessage *fReplyee; 44 45 bool DeviceSupportsAttributes(dev_t device); 46 47 private: 48 std::list< std::pair<dev_t, bool> > fAttributeSupportList; 49 50 status_t UpdateEntry(const entry_ref *ref); 51 52 status_t fStatus; 53 }; 54 55 } // namespace Mime 56 } // namespace Storage 57 } // namespace BPrivate 58 59 #endif // _MIME_UPDATE_THREAD_H 60