1 /* 2 * Copyright 2013, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold <ingo_weinhold@gmx.de> 7 */ 8 #ifndef DATABASE_DIRECTORY_H 9 #define DATABASE_DIRECTORY_H 10 11 12 #include <MergedDirectory.h> 13 14 15 namespace BPrivate { 16 namespace Storage { 17 namespace Mime { 18 19 20 class DatabaseLocation; 21 22 23 class DatabaseDirectory : public BMergedDirectory { 24 public: 25 DatabaseDirectory(); 26 virtual ~DatabaseDirectory(); 27 28 status_t Init(DatabaseLocation* databaseLocation, 29 const char* superType = NULL); 30 31 protected: 32 virtual bool ShallPreferFirstEntry(const entry_ref& entry1, 33 int32 index1, const entry_ref& entry2, 34 int32 index2); 35 36 private: 37 bool _IsValidMimeTypeEntry(const entry_ref& entry); 38 }; 39 40 41 } // namespace Mime 42 } // namespace Storage 43 } // namespace BPrivate 44 45 46 #endif // DATABASE_DIRECTORY_H 47